mirror of
https://github.com/ever-co/ever-gauzy.git
synced 2026-10-02 01:54:50 +08:00
* refactor(desktop-ui): convert components and directives to standalone Migrate numerous components, directives, and pipes within the desktop UI library to Angular's standalone architecture. This update involves: - Removing 'standalone: false' from component and directive decorators. - Adding necessary dependencies to the 'imports' array of individual standalone components. - Moving declarations from NgModule metadata to the 'imports' array. - Updating test suites to use 'imports' instead of 'declarations' for standalone components. * refactor: remove redundant modules in favor of standalone components Clean up the codebase by removing several intermediate Angular modules, including DesktopDirectiveModule, NoDataMessageModule, and PaginationModule. Components and directives are now imported directly into consuming modules, streamlining the dependency structure and supporting the transition to standalone components. * refactor(ui): migrate templates to angular control flow syntax Update various components to use the new @if and @for control flow syntax instead of *ngIf and *ngFor structural directives. This change also removes unnecessary NgIf and NgFor imports from the component metadata. * perf(desktop-ui): use loadComponent for lazy loading routes Replace static component imports with dynamic imports using the loadComponent property in routing configurations. This optimization enables lazy loading for these components, which helps reduce the initial bundle size and improves the application's startup time. * refactor: streamline component imports and remove unused modules * refactor(desktop-ui-lib): update component imports and clean up modules Add PipeModule to various recap components to provide necessary pipes. Remove several standalone components from NgModule declarations and exports as they are now managed via lazy loading or direct component imports. Clean up and reorder imports across affected files for consistency. * refactor(time-tracker): remove form value accessor and clean up imports Remove the NG_VALUE_ACCESSOR implementation and provider from the TimeTrackerComponent. Clean up redundant component references in TimeTrackerModule and reorganize imports for better maintainability. * refactor(desktop-timer): migrate to standalone application architecture Migrate the desktop-timer application from a module-based architecture to a standalone application architecture using Angular's bootstrapApplication API. - Delete AppModule and move its logic to main.ts. - Update AppRoutingModule to use loadComponent for route-level lazy loading of components from @gauzy/desktop-ui-lib. - Refactor RecapModule and SettingsModule to remove unnecessary component declarations and exports. - Consolidate application providers and third-party module initializations in the bootstrap process. * refactor(desktop-timer): convert AppComponent to standalone and simplify refresh Convert the root AppComponent to a standalone component and add the RouterOutlet to its imports. Simplify the initialization logic by removing manual token checks before starting the token refresh service. * refactor(desktop-ui-lib): replace LanguageModule with TranslateModule Replace the internal LanguageModule with TranslateModule from @ngx-translate/core in the recap and task-table modules. Additionally, import PipeModule in GauzyFiltersComponent to ensure required pipes are available. * refactor(desktop): migrate to standalone bootstrapping Remove AppModule and transition to the bootstrapApplication API in main.ts. This includes moving all providers and imported modules from the deleted app.module.ts into the bootstrap configuration, and replacing BrowserAnimationsModule with provideAnimations. * refactor(desktop): implement lazy loading and standalone component Update the routing configuration to use lazy loading for all component routes in app-routing.module.ts. Refactor AppComponent to support standalone imports and simplify the token refresh service initialization logic. * refactor(agent): migrate to standalone bootstrap api Remove the AppModule and use the bootstrapApplication function to initialize the app. Convert AppComponent to a standalone component and consolidate providers and module configurations in main.ts. * perf(agent): use lazy loading for routes and simplify token refresh Implement lazy loading for all routes in the agent application using the `loadComponent` syntax. This improves the initial bundle size and startup performance by loading component code only when needed. Additionally, simplify the initialization of the token refresh service in `AppComponent` by removing the manual check for existing tokens, allowing the service to handle its own internal state logic. * style(server): fix indentation in app component spec Correct the whitespace and indentation in the app component specification file to align with the project's formatting standards. * refactor: migrate server applications to standalone bootstrapping Remove AppModule from both server and server-api applications and transition to the Angular standalone bootstrap API. Provider configurations are moved to main.ts using bootstrapApplication and importProvidersFrom. * perf(routing): use lazy loading for desktop ui components Replace static component imports with dynamic imports using the loadComponent property in both server and server-api routing modules. This optimization reduces the initial bundle size and improves application startup performance by loading components from the @gauzy/desktop-ui-lib only when needed. * refactor(app): update component to use standalone imports for RouterOutlet * refactor(routing): update auth routes to use consistent lazy loading and guards * feat(build): add quick build script for mac agent * refactor(routing): add AuthGuard to server-dashboard route for enhanced security * feat(desktop): initialize TranslateModule in bootstrap process Configure the ngx-translate TranslateModule within the application bootstrap logic. This setup includes the HttpLoaderFactory and HttpClient dependencies to enable internationalization support. * build(gauzy): add nebular default theme styles Include the @nebular/theme prebuilt default CSS file in the project styles configuration to ensure UI components render correctly. * refactor(apps): simplify bootstrap process and update providers Streamline the bootstrap process for server and server-api applications by removing unused Nebular and feature modules. Configure the TranslateModule with HttpLoaderFactory and add Store to the application providers. Additionally, remove the AuthConnectionGuard from routing configurations and update global style paths in project.json.
156 lines
4.1 KiB
JSON
156 lines
4.1 KiB
JSON
{
|
|
"name": "gauzy-api-server",
|
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
"projectType": "application",
|
|
"prefix": "gauzy",
|
|
"sourceRoot": "apps/server-api/src",
|
|
"tags": [],
|
|
"implicitDependencies": [],
|
|
"generators": {
|
|
"@nx/angular:component": {
|
|
"style": "scss"
|
|
}
|
|
},
|
|
"targets": {
|
|
"build": {
|
|
"executor": "@angular-builders/custom-webpack:browser",
|
|
"outputs": ["{options.outputPath}"],
|
|
"options": {
|
|
"customWebpackConfig": {
|
|
"path": "apps/server-api/config/custom-webpack.config.js"
|
|
},
|
|
"outputPath": "dist/apps/gauzy-api-server",
|
|
"index": "apps/server-api/src/index.html",
|
|
"main": "apps/server-api/src/main.ts",
|
|
"polyfills": "apps/server-api/src/polyfills.ts",
|
|
"tsConfig": "apps/server-api/tsconfig.app.json",
|
|
"aot": true,
|
|
"stylePreprocessorOptions": {
|
|
"includePaths": ["apps/server-api/src/assets/styles", "packages/ui-core/static/styles"]
|
|
},
|
|
"assets": [
|
|
"apps/server-api/src/favicon.ico",
|
|
"apps/server-api/src/assets",
|
|
{
|
|
"glob": "**/*",
|
|
"input": "apps/server-api/src/",
|
|
"ignore": ["**/*.ts"],
|
|
"output": ""
|
|
}
|
|
],
|
|
"styles": [
|
|
"node_modules/@nebular/theme/styles/prebuilt/default.css",
|
|
"node_modules/bootstrap/dist/css/bootstrap.css",
|
|
"node_modules/typeface-exo/index.css",
|
|
"node_modules/roboto-fontface/css/roboto/roboto-fontface.css",
|
|
"node_modules/ionicons/dist/scss/ionicons.scss",
|
|
"node_modules/@fortawesome/fontawesome-free/css/all.css",
|
|
"node_modules/socicon/css/socicon.css",
|
|
"node_modules/@ali-hm/angular-tree-component/css/angular-tree-component.css",
|
|
"node_modules/leaflet/dist/leaflet.css",
|
|
"node_modules/@ng-select/ng-select/themes/default.theme.css",
|
|
"apps/server-api/src/assets/styles/styles.scss",
|
|
"packages/ui-core/static/styles/styles.scss"
|
|
],
|
|
"scripts": [],
|
|
"allowedCommonJsDependencies": [
|
|
"dayjs",
|
|
"localforage",
|
|
"moment",
|
|
"moment-duration-format",
|
|
"moment-range",
|
|
"moment-timezone",
|
|
"rfdc",
|
|
"rxjs",
|
|
"rxjs/operators",
|
|
"slugify"
|
|
]
|
|
},
|
|
"configurations": {
|
|
"production": {
|
|
"fileReplacements": [
|
|
{
|
|
"replace": "apps/server-api/src/environments/environment.ts",
|
|
"with": "apps/server-api/src/environments/environment.prod.ts"
|
|
},
|
|
{
|
|
"replace": "packages/ui-config/src/lib/environments/environment.ts",
|
|
"with": "packages/ui-config/src/lib/environments/environment.prod.ts"
|
|
}
|
|
],
|
|
"optimization": true,
|
|
"sourceMap": true,
|
|
"namedChunks": false,
|
|
"extractLicenses": true,
|
|
"vendorChunk": false,
|
|
"buildOptimizer": true,
|
|
"budgets": [
|
|
{
|
|
"type": "initial",
|
|
"maximumWarning": "100mb",
|
|
"maximumError": "150mb"
|
|
},
|
|
{
|
|
"type": "anyComponentStyle",
|
|
"maximumWarning": "1000kb",
|
|
"maximumError": "2000kb"
|
|
}
|
|
],
|
|
"outputHashing": "all"
|
|
},
|
|
"development": {
|
|
"optimization": false,
|
|
"sourceMap": true,
|
|
"namedChunks": true,
|
|
"extractLicenses": false,
|
|
"vendorChunk": true,
|
|
"buildOptimizer": false,
|
|
"budgets": [
|
|
{
|
|
"type": "initial",
|
|
"maximumWarning": "100mb",
|
|
"maximumError": "150mb"
|
|
},
|
|
{
|
|
"type": "anyComponentStyle",
|
|
"maximumWarning": "1000kb",
|
|
"maximumError": "2000kb"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"defaultConfiguration": "development"
|
|
},
|
|
"serve": {
|
|
"executor": "@angular-devkit/build-angular:dev-server",
|
|
"configurations": {
|
|
"production": {
|
|
"buildTarget": "server-api:build:production"
|
|
},
|
|
"development": {
|
|
"buildTarget": "server-api:build:development"
|
|
}
|
|
},
|
|
"defaultConfiguration": "development",
|
|
"continuous": true
|
|
},
|
|
"extract-i18n": {
|
|
"executor": "@angular-devkit/build-angular:extract-i18n",
|
|
"options": {
|
|
"buildTarget": "server-api:build"
|
|
}
|
|
},
|
|
"lint": {
|
|
"executor": "@nx/eslint:lint"
|
|
},
|
|
"test": {
|
|
"executor": "@nx/jest:jest",
|
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
|
"options": {
|
|
"jestConfig": "apps/server-api/jest.config.ts",
|
|
"tsConfig": "apps/server-api/tsconfig.spec.json"
|
|
}
|
|
}
|
|
}
|
|
}
|