Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 25 additions & 21 deletions core-web/apps/dotcms-ui/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@
"projectType": "application",
"sourceRoot": "apps/dotcms-ui/src",
"prefix": "dot",
"tags": [],
"implicitDependencies": ["dotcms-webcomponents"],
"targets": {
"build": {
"executor": "@nx/angular:browser-esbuild",
"executor": "@angular-devkit/build-angular:application",
"outputs": ["{options.outputPath.base}"],
"options": {
"baseHref": "./",
"outputPath": "dist/apps/dotcms-ui",
"outputPath": {
"base": "dist/apps/dotcms-ui",
"browser": ""
},
"index": "apps/dotcms-ui/src/index.html",
"main": "apps/dotcms-ui/src/main.ts",
"polyfills": "apps/dotcms-ui/src/polyfills.ts",
"browser": "apps/dotcms-ui/src/main.ts",
"polyfills": ["apps/dotcms-ui/src/polyfills.ts"],
"tsConfig": "apps/dotcms-ui/tsconfig.app.json",
"inlineStyleLanguage": "scss",
"allowedCommonJsDependencies": [
"lodash",
"dragula",
Expand Down Expand Up @@ -73,9 +76,7 @@
"stylePreprocessorOptions": {
"includePaths": ["libs/dotcms-scss/angular"]
},
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
Expand All @@ -93,8 +94,6 @@
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
Expand All @@ -109,27 +108,31 @@
]
},
"development": {
"deployUrl": "/dotAdmin/",
"outputPath": "../../tomcat9/webapps/ROOT/dotAdmin",
"baseHref": "",
"baseHref": "/dotAdmin/",
"optimization": false,
"sourceMap": true,
"namedChunks": true,
"vendorChunk": true,
"buildOptimizer": false
"extractLicenses": false,
"fileReplacements": [],
"outputHashing": "none",
"budgets": [],
"externalDependencies": ["date-fns/locale"]
}
},
"defaultConfiguration": "production",
"dependsOn": ["^build"]
},
"serve": {
"dependsOn": ["dotcms-webcomponents:build"],
"executor": "@angular-devkit/build-angular:dev-server",
"dependsOn": [],
"options": {
"proxyConfig": "apps/dotcms-ui/proxy-dev.conf.mjs",
"buildTarget": "dotcms-ui:build:development"
},
"continuous": true
"buildTarget": "dotcms-ui:build:development",
"hmr": true,
"liveReload": false,
"watch": true
}
},
"extract-i18n": {
"executor": "@angular-devkit/build-angular:extract-i18n",
Expand All @@ -146,8 +149,7 @@
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/dotcms-ui/jest.config.ts",
"passWithNoTests": false,
"tsConfig": "apps/dotcms-ui/tsconfig.spec.json"
"passWithNoTests": false
}
},
"storybook": {
Expand Down Expand Up @@ -179,5 +181,7 @@
}
}
}
}
},
"tags": [],
"implicitDependencies": ["dotcms-webcomponents"]
}
24 changes: 17 additions & 7 deletions core-web/apps/dotcms-ui/proxy-dev.conf.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
/* eslint-env es6 */
/* eslint-disable */
export default [
// 1. Dedicated WebSocket Proxy (Must be first)
{
context: ['/api/ws'],
target: 'http://localhost:8080',
ws: true,
secure: false,
changeOrigin: true,
logLevel: 'debug'
},
// 2. Main API Proxy
{
context: [
'/api',
'/api', // Note: /api/ws will be caught by the rule above first
'/c/portal',
'/html',
'/dwr',
Expand All @@ -20,16 +30,16 @@ export default [
'/JSONTags',
'/api/vtl',
'/tinymce',
'/ext'
'/ext',
'/image'
],
target: 'http://localhost:8080',
secure: false,
changeOrigin: true, // Essential for Firefox compatibility
changeOrigin: true,
logLevel: 'debug',
timeout: 300000, // 5 minute timeout for large file uploads
proxyTimeout: 300000, // Proxy-specific timeout for large file uploads
ws: true, // Enable WebSocket proxying for real-time features
// CRITICAL: followRedirects must be false to avoid 10MB body limit from follow-redirects library
timeout: 300000,
proxyTimeout: 300000,
ws: false, // Explicitly disable WS here to avoid EPIPE errors on HTTP requests
followRedirects: false,
headers: {
Connection: 'keep-alive'
Expand Down
6 changes: 5 additions & 1 deletion core-web/apps/dotcms-ui/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
"types": [],
"target": "ES2022",
"useDefineForClassFields": false,
"moduleResolution": "bundler"
"module": "es2022",
"moduleResolution": "bundler",
"resolvePackageJsonExports": true,
"incremental": true,
"esModuleInterop": true
},
"files": ["src/main.ts", "src/polyfills.ts"],
"exclude": ["**/*.stories.ts", "**/*.stories.js"]
Expand Down
3 changes: 2 additions & 1 deletion core-web/apps/dotcms-ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
],
"compilerOptions": {
"target": "ES2022",
"lib": ["es2022", "dom", "dom.iterable"]
"lib": ["es2022", "dom", "dom.iterable"],
"esModuleInterop": true
}
}
5 changes: 4 additions & 1 deletion core-web/nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e", "build-storybook"],
"parallel": 1
"parallel": 3
}
}
},
Expand Down Expand Up @@ -234,5 +234,8 @@
"version": {
"preVersionCommand": "yarn nx run-many -t build"
}
},
"serve": {
"dependsOn": []
}
}
8 changes: 4 additions & 4 deletions core-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@
<!-- Validate that dist paths resolve correctly within core-web -->
<!-- This prevents referencing dist folders outside the repository, ensuring reproducible builds -->
<property name="core.web.basedir" value="${project.basedir}"/>

<!-- Verify that dist path resolves to within core-web directory -->
<!-- Using project.basedir ensures paths are relative to pom.xml location -->
<property name="dist.path" value="${core.web.basedir}/dist"/>

<!-- Ensure dist path is a subdirectory of core-web (basic sanity check) -->
<condition property="dist.path.valid">
<contains string="${dist.path}" substring="${core.web.basedir}"/>
</condition>
<fail unless="dist.path.valid" message="ERROR: dist path (${dist.path}) does not resolve within core-web (${core.web.basedir}). This could cause non-reproducible builds by referencing external folders."/>

<!-- If multi-module project directory is available, validate core-web is within repo -->
<condition property="repo.root.available">
<isset property="maven.multiModuleProjectDirectory"/>
Expand All @@ -106,7 +106,7 @@
</and>
</condition>
<fail if="should.fail.repo.check" message="ERROR: core-web project.basedir (${core.web.basedir}) is outside repository root (${maven.multiModuleProjectDirectory}). This indicates a path resolution issue that could cause non-reproducible builds."/>

<echo message="Validated dist paths are scoped to core-web: ${core.web.basedir}"/>
</target>
</configuration>
Expand Down
6 changes: 3 additions & 3 deletions core-web/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1796,9 +1796,9 @@
integrity sha512-i1L7noDNxtFyL5DmZafWy1wRVhGehQmzZaz1HiN5e7iylJMSZR7ekOV7NsIqa5qBldlLrsKv4HbgFUVlQrz8Mw==

"@bufbuild/protobuf@^2.5.0":
version "2.10.1"
resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-2.10.1.tgz#012f6d7d110f8c45198c7e6a96cb217c45d0c696"
integrity sha512-ckS3+vyJb5qGpEYv/s1OebUHDi/xSNtfgw1wqKZo7MR9F2z+qXr0q5XagafAG/9O0QPVIUfST0smluYSTpYFkg==
version "2.10.2"
resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-2.10.2.tgz#d7c063301f2a33095fc202f06bf3cce0c138dfcd"
integrity sha512-uFsRXwIGyu+r6AMdz+XijIIZJYpoWeYzILt5yZ2d3mCjQrWUTVpVD9WL/jZAbvp+Ed04rOhrsk7FiTcEDseB5A==

"@chevrotain/cst-dts-gen@11.0.3":
version "11.0.3"
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -671,4 +671,4 @@ yauzl@^2.10.0:
zod@^3.24.1:
version "3.25.76"
resolved "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz"
integrity sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==
integrity sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==