-
Notifications
You must be signed in to change notification settings - Fork 82
feat(webui): Migrate to npm workspace; Update taskfile and the package scripts accordingly. #1119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9ca2d54
b501260
e27d62e
99095de
bdfe59d
bf9fae1
f4757af
7106e72
b3db4a8
1b50904
487376a
4b4834d
37687cc
01ef445
85c557c
50b9efc
f29b93c
b31bebc
dbcf7ff
71aab74
b502c30
9d0b7bb
7b5a8f1
d786687
6533417
3b9a852
b97cd7c
be9ebee
d8cb843
f28b6f7
8945f8a
6da8f5e
a476023
2550522
21041bb
be60997
e5b2888
73e87be
0ab3bdb
902f198
a3e36f4
51ccf03
0ca50ed
9741b66
97de7ea
817aab5
44451b7
9e81337
4026fe9
bb868d9
5873146
3fee734
171089d
fb79e16
3039ab1
5e148d1
68880a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -843,7 +843,7 @@ def start_webui( | |
get_clp_home() / "var" / "www" / "webui" / "client" / "settings.json" | ||
) | ||
server_settings_json_path = ( | ||
get_clp_home() / "var" / "www" / "webui" / "server" / "dist" / "server" / "settings.json" | ||
get_clp_home() / "var" / "www" / "webui" / "server" / "dist" / "settings.json" | ||
) | ||
|
||
validate_webui_config(clp_config, client_settings_json_path, server_settings_json_path) | ||
|
@@ -964,7 +964,7 @@ def start_webui( | |
|
||
node_cmd = [ | ||
str(CONTAINER_CLP_HOME / "bin" / "node-22"), | ||
str(container_webui_dir / "server" / "dist" / "server" / "src" / "main.js"), | ||
str(container_webui_dir / "server" / "dist" / "src" / "main.js"), | ||
] | ||
Comment on lines
965
to
968
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainEntrypoint path updated to dist/src/main.js; confirm server build emits this file Pointing node to server/dist/src/main.js matches the ESM layout change. Please ensure the server’s tsconfig/build scripts emit main.js under dist/src and that any Docker image or packaging step copies it (and its sourcemap if needed). If you have a local build, quickly sanity‑check: 🏁 Script executed: #!/bin/bash
# After building the server locally, confirm the entrypoint exists:
test -f components/webui/server/dist/src/main.js && echo "OK: main.js exists" || (echo "Missing dist/src/main.js"; exit 1) Length of output: 118 Server entrypoint missing: critical fix required The verification script indicates that Please address the issue by either:
Next steps:
🤖 Prompt for AI Agents
|
||
cmd = container_cmd + node_cmd | ||
subprocess.run(cmd, stdout=subprocess.DEVNULL, check=True) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shall we update the "name" to be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe this change hasn't been pushed? |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,5 +1,5 @@ | ||||||
{ | ||||||
"name": "webui-client", | ||||||
"name": "@webui/client", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Good rename to scoped package; consider marking the package as private. The new name Outside-the-hunk example (apply near the top of the manifest): {
"name": "@webui/client",
"private": true,
...
} 🤖 Prompt for AI Agents
|
||||||
"version": "0.1.0", | ||||||
"description": "", | ||||||
"main": "src/main.tsx", | ||||||
|
@@ -18,9 +18,10 @@ | |||||
"@emotion/styled": "^11.14.0", | ||||||
"@monaco-editor/react": "^4.7.0", | ||||||
"@mui/joy": "^5.0.0-beta.51", | ||||||
"@sinclair/typebox": "^0.34.25", | ||||||
"@sinclair/typebox": "^0.34.38", | ||||||
"@tanstack/react-query": "^5.81.5", | ||||||
"@tanstack/react-query-devtools": "^5.81.5", | ||||||
"@webui/common": "*", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Replace wildcard dependency on @webui/common with a pinned workspace range. Using Apply one of the following (recommended first):
- "@webui/common": "*",
+ "@webui/common": "^0.1.0",
- "@webui/common": "*",
+ "@webui/common": "workspace:*", 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
"antd": "^5.24.5", | ||||||
"axios": "^1.7.9", | ||||||
"chart.js": "^4.4.9", | ||||||
|
@@ -43,8 +44,8 @@ | |||||
"@types/react-dom": "^19.0.4", | ||||||
"@types/react-syntax-highlighter": "^15.5.13", | ||||||
"@vitejs/plugin-react": "^4.3.4", | ||||||
"eslint-config-yscope": "latest", | ||||||
"typescript": "~5.6.2", | ||||||
"eslint-config-yscope": "1.1.1", | ||||||
"typescript": "~5.7.3", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainConfirm TS version alignment across workspace. 🏁 Script executed: #!/bin/bash
rg -n --hidden --glob '!node_modules' -e '"typescript"\s*:\s*"[^"]+"' -g '*package.json' -C1 Length of output: 667 Align TypeScript specifier across all packages "typescript": "^5.7.3" to "typescript": "~5.7.3" so all workspaces use the same operator and avoid duplicate installs. 🤖 Prompt for AI Agents
|
||||||
"vite": "^6.3.5" | ||||||
} | ||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import {CLP_QUERY_ENGINES} from "../../../common/index.js"; | ||
import {CLP_QUERY_ENGINES} from "@webui/common"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainFix module resolution for @webui/common (import/no-unresolved). ESLint can’t resolve the workspace package. Ensure the client declares and resolves the workspace dependency and that lint runs against the correct TS project.
Run this script to confirm the wiring: 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== Check client depends on @webui/common =="
jq -r '.dependencies["@webui/common"], .devDependencies["@webui/common"]' components/webui/client/package.json 2>/dev/null
echo "== Check common package exposes exports and types =="
jq '{name, main, module, types, exports}' components/webui/common/package.json
echo "== Confirm tsconfig path for client (module resolution) =="
jq '.compilerOptions | {moduleResolution, baseUrl, paths, types}' components/webui/client/tsconfig.json
echo "== Print ESLint config resolver hints (if present) =="
# These files are common; adapt if your repo uses a different path
for f in .eslintrc.cjs .eslintrc.js components/webui/client/.eslintrc.cjs components/webui/.eslintrc.cjs; do
[ -f "$f" ] && { echo "--- $f ---"; cat "$f"; }
done Length of output: 616 🏁 Script executed: #!/bin/bash
set -u -o pipefail
echo "== Check client depends on @webui/common =="
jq -r '.dependencies["@webui/common"], .devDependencies["@webui/common"]' components/webui/client/package.json 2>/dev/null || echo "not found"
echo
echo "== Check common package exposes exports and types =="
jq '{name: .name, main: .main, module: .module, types: .types, exports: .exports}' components/webui/common/package.json 2>/dev/null || echo "failed to parse common/package.json"
echo
echo "== Confirm tsconfig path for client (module resolution) =="
jq '.compilerOptions | {moduleResolution: .moduleResolution, baseUrl: .baseUrl, paths: .paths, types: .types}' components/webui/client/tsconfig.json 2>/dev/null || echo "failed to parse client/tsconfig.json"
echo
echo "== Print ESLint resolver settings (if present) =="
for f in .eslintrc.cjs .eslintrc.js components/webui/client/.eslintrc.cjs components/webui/.eslintrc.cjs; do
if [ -f "$f" ]; then
echo "--- $f ---"
sed -n '1,200p' "$f"
echo
fi
done Length of output: 1732 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== Check existence and permissions of tsconfig.json =="
ls -l components/webui/client/tsconfig.json || { echo "tsconfig.json not found"; exit 1; }
echo
echo "== Print first 200 lines of tsconfig.json =="
sed -n '1,200p' components/webui/client/tsconfig.json Length of output: 729 Configure ESLint for TypeScript project resolution in client The client already declares Actions:
These changes will allow ESLint to resolve workspace packages correctly and eliminate the 🧰 Tools🪛 GitHub Actions: clp-lint[error] 1-1: ESLint: Unable to resolve path to module '@webui/common' (import/no-unresolved) 🤖 Prompt for AI Agents
|
||
|
||
import {settings} from "../settings"; | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ import {useEffect} from "react"; | |
import { | ||
PRESTO_SEARCH_SIGNAL, | ||
SEARCH_SIGNAL, | ||
} from "@common/index.js"; | ||
} from "@webui/common"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainimport/no-unresolved for @webui/common breaks type-aware lint; fix ESLint resolver and workspace install order The unresolved import causes a cascade of “error typed value” diagnostics; once resolution is fixed, those vanish. Ensure ESLint resolves workspace packages and runs after workspace install. Actions:
If you keep a root ESLint config, add: // .eslintrc.cjs (at repository or components/webui root)
module.exports = {
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
},
typescript: {
- // default
+ alwaysTryTypes: true,
+ project: [
+ 'components/webui/common/tsconfig.json',
+ 'components/webui/client/tsconfig/tsconfig.app.json',
+ 'components/webui/server/tsconfig.json'
+ ],
},
},
},
}; Also ensure CI runs npm/pnpm/yarn install from the workspace root before linting the client/server packages. 🏁 Script executed: #!/bin/bash
# Verify workspace + resolver prerequisites in-tree.
set -euo pipefail
echo "Checking that @webui/common is a workspace package and named correctly…"
rg -n '"name":\s*"@webui/common"' components/webui/common/package.json
echo "Checking that workspaces are declared at the root…"
rg -n '"workspaces"' package.json || rg -n '"workspaces"' components/webui/package.json || true
echo "Searching for ESLint resolver configuration…"
rg -n "'import/resolver'|\"import/resolver\"" -C2 --glob '**/.eslintrc.*' || true Length of output: 882 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Searching for ESLint resolver configuration in all ESLint config files (including hidden)…"
rg -n "'import/resolver'|\"import/resolver\"" -C2 -uu --glob "**/.eslintrc.*" Length of output: 443 #!/bin/bash
set -euo pipefail
echo "1. Show workspace definitions in components/webui/package.json"
sed -n '1,200p' components/webui/package.json
echo -e "\n2. Find all tsconfig JSON files under components/webui"
find components/webui -type f -iname 'tsconfig*.json'
echo -e "\n3. Locate any ESLint config files in the repo"
find . -type f \( -iname '.eslintrc*' -o -iname 'eslint.config.*' -o -iname '.eslintignore' \) 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "1. Checking for root-level package.json:"
find . -maxdepth 1 -type f -name "package.json" -print
echo -e "\n2. Showing first 30 lines of root package.json (if present):"
find . -maxdepth 1 -type f -name "package.json" -exec sed -n '1,30p' {} \;
echo -e "\n3. Checking for pnpm or Yarn workspace config at root:"
find . -maxdepth 1 -type f \( -name "pnpm-workspace.yaml" -o -name "yarn.workspaces" \) -print
echo -e "\n4. Showing first 30 lines of components/webui/package.json:"
sed -n '1,30p' components/webui/package.json
echo -e "\n5. Locating ESLint config files in the repository:"
find . -type f \( -iname ".eslintrc*" -o -iname "eslint.config.*" \) -print
echo -e "\n6. Finding all tsconfig JSON files under components/webui:"
find components/webui -type f -iname "tsconfig*.json" Length of output: 2068 Update ESLint resolver configuration and CI install path Your workspace is correctly set up under • Add import resolver settings to your ESLint configs export default {
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
},
typescript: {
alwaysTryTypes: true,
project: [
// adjust paths relative to components/webui
'./common/tsconfig.json',
'./client/tsconfig/tsconfig.app.json',
'./server/tsconfig.json',
],
},
},
},
// …your existing rules/plugins
}; • Ensure CI installs dependencies from the monorepo root ( steps:
- run: cd components/webui && npm ci
- run: cd components/webui && npm run lint:check After this, 🧰 Tools🪛 GitHub Actions: clp-lint[error] 6-6: ESLint: Unable to resolve path to module '@webui/common' (import/no-unresolved) 🤖 Prompt for AI Agents
|
||
import {notification} from "antd"; | ||
|
||
import useSearchStore from "./index"; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import CommonConfig from "eslint-config-yscope/CommonConfig.mjs"; | ||
import StylisticConfigArray from "eslint-config-yscope/StylisticConfigArray.mjs"; | ||
import TsConfigArray from "eslint-config-yscope/TsConfigArray.mjs"; | ||
|
||
|
||
const EslintConfig = [ | ||
{ | ||
ignores: [ | ||
"dist/", | ||
"node_modules/", | ||
], | ||
}, | ||
CommonConfig, | ||
...TsConfigArray, | ||
...StylisticConfigArray, | ||
]; | ||
|
||
|
||
export default EslintConfig; |
davemarco marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,26 @@ | ||
{ | ||
"type": "module" | ||
"name": "@webui/common", | ||
"version": "0.1.0", | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.js", | ||
"types": "./dist/index.d.ts" | ||
} | ||
}, | ||
Comment on lines
+4
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVerify export resolution and artefacts exist Double‑check that exports point to real files after build. Run: 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "common/package.json exports:"
jq '.exports' components/webui/common/package.json
echo "Listing dist artefacts..."
ls -la components/webui/common/dist/ || true
test -f components/webui/common/dist/index.js && echo "OK: dist/index.js" || echo "MISSING: dist/index.js"
test -f components/webui/common/dist/index.d.ts && echo "OK: dist/index.d.ts" || echo "MISSING: dist/index.d.ts" Length of output: 616 Dist directory missing – exports are broken The • No Please ensure the build process outputs these files (or adjust the export paths accordingly) before publishing this package. 🤖 Prompt for AI Agents
|
||
"scripts": { | ||
"build": "tsc", | ||
"build:watch": "npm run build -- -w --preserveWatchOutput", | ||
"lint:check": "eslint . --max-warnings 0", | ||
"lint:fix": "npm run lint:check -- --fix" | ||
}, | ||
"author": "YScope Inc. <dev@yscope.com>", | ||
"license": "Apache-2.0", | ||
"type": "module", | ||
"dependencies": { | ||
"@sinclair/typebox": "^0.34.38" | ||
}, | ||
"devDependencies": { | ||
"eslint-config-yscope": "1.1.1", | ||
"typescript": "^5.7.3" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,3 +1,6 @@ | ||||||||||||||||||||||||||
import {Type} from "@sinclair/typebox"; | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
/** | ||||||||||||||||||||||||||
* Unique ID for each active unique query. Multiple clients can subscribe to the same ID if the | ||||||||||||||||||||||||||
* queries are identical. The ID is also used to represent the socket room, and MongoDB | ||||||||||||||||||||||||||
|
@@ -61,6 +64,7 @@ interface ServerToClientEvents { | |||||||||||||||||||||||||
/** | ||||||||||||||||||||||||||
* Empty but required by Socket IO. | ||||||||||||||||||||||||||
*/ | ||||||||||||||||||||||||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||||||||||||||||||||||||||
interface InterServerEvents { | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
Comment on lines
+67
to
69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Replace empty interface with a type alias to satisfy linters (Biome) and remove the disable. An empty interface is equivalent to {} and is flagged by Biome. Prefer a type alias and drop the eslint-disable line. Apply this diff: -// eslint-disable-next-line @typescript-eslint/no-empty-object-type
-interface InterServerEvents {
-}
+// Empty by design; Socket.IO requires a map of inter-server events (none used here).
+type InterServerEvents = Record<string, never>; 📝 Committable suggestion
Suggested change
🧰 Tools🪛 Biome (2.1.2)[error] 67-69: An empty interface is equivalent to {}. Safe fix: Use a type alias instead. (lint/suspicious/noEmptyInterface) 🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|
@@ -144,20 +148,30 @@ interface PrestoSearchResult extends PrestoRowObject { | |||||||||||||||||||||||||
_id: string; | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
/** | ||||||||||||||||||||||||||
* Test TypeBox schema for testing dependency. | ||||||||||||||||||||||||||
*/ | ||||||||||||||||||||||||||
// eslint-disable-next-line no-warning-comments | ||||||||||||||||||||||||||
// TODO: Will be removed once shared server/client route types are migrated into common. | ||||||||||||||||||||||||||
const TestTypeBoxSchema = Type.Object({ | ||||||||||||||||||||||||||
type: Type.String(), | ||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||
Comment on lines
+154
to
+158
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Mark TestTypeBoxSchema as temporary with @deprecated instead of disabling warning comments. This keeps intent clear for consumers and avoids “warning-comments” suppressions. Apply this diff: -// eslint-disable-next-line no-warning-comments
-// TODO: Will be removed once shared server/client route types are migrated into common.
-const TestTypeBoxSchema = Type.Object({
+/**
+ * @deprecated Temporary helper to validate dependency wiring.
+ * Will be removed once shared server/client route types are migrated into @webui/common.
+ */
+const TestTypeBoxSchema = Type.Object({
type: Type.String(),
}); 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
export { | ||||||||||||||||||||||||||
CLP_QUERY_ENGINES, | ||||||||||||||||||||||||||
PRESTO_SEARCH_SIGNAL, | ||||||||||||||||||||||||||
SEARCH_SIGNAL, | ||||||||||||||||||||||||||
TestTypeBoxSchema, | ||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||
export type { | ||||||||||||||||||||||||||
PrestoRowObject, | ||||||||||||||||||||||||||
PrestoSearchResult, | ||||||||||||||||||||||||||
SearchResultsMetadataDocument, | ||||||||||||||||||||||||||
ClientToServerEvents, | ||||||||||||||||||||||||||
Err, | ||||||||||||||||||||||||||
InterServerEvents, | ||||||||||||||||||||||||||
PrestoRowObject, | ||||||||||||||||||||||||||
PrestoSearchResult, | ||||||||||||||||||||||||||
QueryId, | ||||||||||||||||||||||||||
Response, | ||||||||||||||||||||||||||
SearchResultsMetadataDocument, | ||||||||||||||||||||||||||
ServerToClientEvents, | ||||||||||||||||||||||||||
SocketData, | ||||||||||||||||||||||||||
QueryId | ||||||||||||||||||||||||||
}; |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,34 @@ | ||||||||||||||||||||||||
{ | ||||||||||||||||||||||||
"compilerOptions": { | ||||||||||||||||||||||||
"esModuleInterop": true, | ||||||||||||||||||||||||
"lib": [ | ||||||||||||||||||||||||
"DOM", | ||||||||||||||||||||||||
"ES2022", | ||||||||||||||||||||||||
], | ||||||||||||||||||||||||
"target": "ES2022", | ||||||||||||||||||||||||
"module": "esnext", | ||||||||||||||||||||||||
"moduleResolution": "bundler", | ||||||||||||||||||||||||
"declaration": true, | ||||||||||||||||||||||||
"declarationMap": true, | ||||||||||||||||||||||||
"outDir": "dist", | ||||||||||||||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||
"allowUnreachableCode": false, | ||||||||||||||||||||||||
"allowUnusedLabels": false, | ||||||||||||||||||||||||
"alwaysStrict": true, | ||||||||||||||||||||||||
"exactOptionalPropertyTypes": true, | ||||||||||||||||||||||||
"noFallthroughCasesInSwitch": true, | ||||||||||||||||||||||||
"noImplicitAny": true, | ||||||||||||||||||||||||
"noImplicitOverride": true, | ||||||||||||||||||||||||
"noImplicitReturns": true, | ||||||||||||||||||||||||
"noImplicitThis": true, | ||||||||||||||||||||||||
"noPropertyAccessFromIndexSignature": true, | ||||||||||||||||||||||||
"noUncheckedIndexedAccess": true, | ||||||||||||||||||||||||
"noUncheckedSideEffectImports": true, | ||||||||||||||||||||||||
"noUnusedLocals": true, | ||||||||||||||||||||||||
"noUnusedParameters": true, | ||||||||||||||||||||||||
"strict": true, | ||||||||||||||||||||||||
"useUnknownInCatchVariables": true, | ||||||||||||||||||||||||
}, | ||||||||||||||||||||||||
"include": [ | ||||||||||||||||||||||||
"src/**/*" | ||||||||||||||||||||||||
] | ||||||||||||||||||||||||
} | ||||||||||||||||||||||||
Comment on lines
+30
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Exclude build artefacts to avoid accidental re-compilation Keep TypeScript from traversing generated output or dependencies. "include": [
"src/**/*"
- ]
+ ],
+ "exclude": ["dist", "node_modules"] 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Path correction to server settings.json looks right; verify dist packaging includes it
You removed the redundant "server" segment and now target .../webui/server/dist/settings.json. This aligns with the workspace/dist reshuffle. Please double‑check the server build produces and packages settings.json at dist root so this path won’t 404 at runtime.
Run:
🏁 Script executed:
Length of output: 2569
Ensure server build includes settings.json in dist
It looks like the server’s
package.json
defines the build step as just runningtsc
, with no provision to copy non-TS assets. Since TypeScript compilation alone won’t emit JSON files,settings.json
won’t end up underdist/
, causing a 404 at runtime whenstart_clp.py
points to…/server/dist/settings.json
.Please address this by:
components/webui/server/package.json
) to copysettings.json
intodist/
.Example:
…
}
In components/clp-package-utils/clp_package_utils/scripts/start_clp.py around
lines 845-846, the script expects server/dist/settings.json but the server build
only runs tsc and doesn't emit non-TS assets; update
components/webui/server/package.json build script to copy settings.json into
dist (or add a postbuild step or use a build tool to include JSON assets), or
configure tsconfig/build pipeline to include JSON files in the emitted output,
then run the build and verify components/webui/server/dist/settings.json exists
so start_clp.py will not 404.