5 Commits
Author SHA1 Message Date
Trapa-EurekaandClaude Opus 5 d810c81cf3 feat(core): persistence invariants, config/boundary validation, migration smoke test and correlation IDs (#10198)
Adds test harnesses for tenant isolation, TypeORM/MikroORM parity, persistence invariants and idempotency; startup validation for DB config; Nx plugin/core boundary rules; a fresh-database migration smoke test; and a correlation id carried from HTTP requests into docs queue jobs and logs.

Testing (packages/core/src/lib/core/testing):
- tenant-isolation: an in-memory tenant-aware repository, fixtures and strict assertions (a non-empty page, every row in the caller's tenant). Applied to EmployeeService and OrganizationProjectService.
- orm-conformance and persistence-invariants: suites that run the same checks under TypeORM and MikroORM (run-both-orms.sh uses yarn nx).
- idempotency: assertion helpers and specs for token cleanup (positive control), employee notifications and the Zapier timer webhook.
- database/migration-smoke.spec.ts: runs the full migration chain on a fresh better-sqlite3 database. It is excluded from the default core jest run; run it with `nx run core:test-migration-smoke`.

Idempotency:
- EmployeeNotificationService.create() takes an opt-in `absorbRedelivery`. With it set, an identical unread, unarchived notification under 60 s old (same receiver, entity, type, sender, title and message) is returned instead of inserted, and a missing key or a failed lookup inserts as usual. The event handler does not enable it (the in-process EventBus never redelivers), so every caller inserts one row per event as before.
- ZapierWebhookService skips resending a webhook that already succeeded for the same subscription, action and time log within 5 minutes. The key is reserved while in flight, failed deliveries stay retryable, pruning stops at the first unexpired entry, and the cache is capped at 10,000 entries.

Config (packages/config):
- An unknown DB_TYPE fails fast with the list of supported values; an empty DB_TYPE still means better-sqlite3; mongodb throws an Error.
- Pool and timeout variables are parsed with Number.parseInt semantics, only for postgres and mysql. They throw only where tarn already refused to start and warn otherwise. SQLite ignores them and still prints the startup values.

Observability:
- RequestContextMiddleware accepts an inbound x-correlation-id of 1-128 visible ASCII characters (otherwise it generates a UUIDv4) and echoes it on the response. CORS allows and exposes X-Correlation-Id. RequestContext.currentCorrelationId() is added.
- The docs queue carries the correlation id through job payloads (including bulk reindex) into pipeline outcome, error, dead-letter and enqueue-failure logs.

Boundaries and build:
- Every project gets a type tag. The ESLint depConstraints stop type:core depending on plugins, and plugins may depend only on core, shared libs and the known extension points (ai-chat, job-proposal, integration-ai, job-*-ui).
- core declares @gauzy/scheduler (package.json and implicitDependencies); the webapp Dockerfile copies scheduler's package.json.
- The integration-zapier jest config can import @gauzy/core (transformIgnorePatterns, allowJs, isolatedModules).
- Fixes the stale @nrwl/nx eslint-disable id in the e2e roles-permissions steps and the broken @gauzy/core mock in the docs document-scope spec.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 23:35:52 +02:00
b161467904 chore: update Angular to v21 (#9390)
* @rahul-rocket chore(deps): chore(deps): bump @angular/core from ^20.2.4 to 21.1.2

* fix(ui): update missing jest.preset.js

* fix(nx-migrations): migrate nx from 21.5.1 to 22.4.4

* chore(deps): bump jest-preset-angular to 16.0.0

* chore(deps): bump @nebular/* packages to 17.0.0 for Angular 21 compatibility

* chore(deps): upgrade all packages to Angular 21 and compatible dependencies

* chore(deps): upgrade all packages to Angular 21 and compatible dependencies

* fix(nx-migrations): migrate nx from 21.5.1 to 22.4.4

* Update yarn.lock

* Update yarn.lock

* fix(nx-migrations): migrate nx from 21.5.1 to 22.4.4

* fix(nx-migrations): migrate nx from 21.5.1 to 22.4.4

Replace 'jest-preset-angular/setup-jest' imports with the new 'setupZoneTestEnv' function.

* @nx/jest: replace-removed-matcher-aliases-v22-3

Replace removed matcher aliases in Jest v30 with their corresponding matcher

* chore(deps): @angular/common and @angular/core peerDependencies to ^21.1.0

* Update package.json

* fix(nx-migrations): migrate nx from 21.5.1 to 22.4.4

* chore(deps): bump @nebular/theme from ^16.0.0 to ^17.0.0

* chore(deps): upgrade all packages to Angular 21

* chore(deps): upgrade all packages to Angular 21

* fix(build): update helmet import to support 8.x default export

* fix(build): resolve TypeScript errors and improve code quality

- Fix TemplateRef type conflicts caused by duplicate @angular/core packages (ngx-permissions)
- Change moment imports from namespace to default imports for ESM compatibility
- Convert constructor injection to inject() function in multiple components
- Add OnPush change detection strategy to WindowLayoutComponent
- Make CountdownConfirmationComponent standalone
- Update LayoutWithDraggableObject to use any[] for draggableObject type

* fix(build): fix moment & timezone namespace packages

* fix(build): add jest config for missing packages

* chore(deps): bump swiper from 8.3.1 to 12.1.0

* fix(build): update swiper module and syntax

* Update time-tracking.component.ts

* chore(deps): downgrade `node-polyfill-webpack-plugin` from 4.1.0 to 1.1.4

* fix(deps): resolve browserslist "Unknown version 143 of and_chr" error

Add caniuse-lite and browserslist to yarn resolutions to force all

* fix(nx-migrations): migrate nx from 21.5.1 to 22.4.4

* fix(deps): standardize Angular 21.0.0 versions across all packages and fix compatibility issues

- Fix @angular/* packages to use exact version 21.0.0 (remove caret ^) across all apps, packages, and plugins
- Add @angular/cdk resolution to 21.0.0 to force consistent version

* fix(build): `ui-config` replace env files module issue

* fix(build): `ui-config` replace env files module issue

* fix(build): replace all TemplateRef<HTMLElement> with TemplateRef<any>

* Update package.json

* Update apps\agent\tsconfig.json

* chore(deps): upgrade packages to latest version

* Update yarn.lock

* Update yarn.lock

* fix(build): apply AI suggestion by bot agent reviewers

* fix(build): apply AI suggestion by bot agent reviewers

* fix(nx-migrations): migrate nx from 21.5.1 to 22.4.4

* chore(deps): bump @nestjs/common and @nestjs/core to 11.1.14

* fix(build): replace all TemplateRef<HTMLElement> with TemplateRef<any>

* fix(plugins): apply AI suggestion by bot agent reviewers

* Update yarn.lock

* chore(deps): bump packages

* Update yarn.lock

* chore(deps): bump packages

* chore(deps): bump packages

* fix(plugins): replace 'jest-preset-angular/setup-jest' imports with the new 'setupZoneTestEnv'

* fix(plugins): apply AI suggestion by bot agent reviewers

* fix(cspell): typo spelling :-)

* fix(plugins): apply AI suggestion by bot agent reviewers

* fix: fontawesome icon change version to FA 7

* refactor(ui-core): migrate dashboard directives to standalone

* refactor(ui-core): migrate pipes/directives to standalone

* fix(plugins): apply AI suggestion by bot agent reviewers

* fix(plugins): apply AI suggestion by bot agent reviewers

* chore(deps): bump packages

* refactor(ui-core): migrate directives to standalone

* fix(plugins): apply AI suggestion by bot agent reviewers

---------

Co-authored-by: Ruslan Konviser <evereq@gmail.com>
Co-authored-by: syns2191 <sutralian@gmail.com>
2026-02-20 09:52:34 +01:00
Ruslan Konviser 9804ca0754 fix: builds 2026-02-01 15:24:22 +01:00
Rahul R. 9fac5b43cc fix: update x migration using migrations.json 2026-01-06 16:52:17 +05:30
b65962343a Merge (#8598)
* chore: regenerate @gauzy/plugin library using updated Nx generator

* chore: regenerate @gauzy/common library using updated Nx generator

* chore: regenerate @gauzy/config library using updated Nx generator

* chore: regenerate @gauzy/auth library using updated Nx generator

* chore: regenerate @gauzy/common-angular library using updated Nx generator

* chore: regenerate @gauzy/plugin-changelog library using updated Nx generator

* chore: regenerate @gauzy/plugin-integration-ai-ui library by Nx generator

* chore: regenerate integration-github library using updated Nx generator

* chore: regenerate @gauzy/core library using updated Nx generator

* chore(deps): bump chalk version from 4.1.2 to ^5.3.0

* chore(deps): downgrade chalk version from ^5.3.0 to ^4.1.0

* fix: nx build core

* chore: regenerate @gauzy/plugin-sentry library using updated Nx generator

* chore: regenerate @gauzy/plugin-product-reviews by NX generator

* chore: regenerate @gauzy/plugin-knowledge-base by NX generator

* chore(deps): removed tslint & rimraf unused packages

* chore: regenerate @gauzy/plugin-job-search by NX generator

* chore: regenerate @gauzy/plugin-job-proposal by NX generator

* chore: regenerate @gauzy/plugin-jitsu-analytics by NX generator

* fix(moment): resolve ESM/CJS import conflict by adjusting moment import syntax

* chore: regenerate @gauzy/plugin-integration-hubstaff by NX generator

* chore: regenerate @gauzy/plugin-integration-jira by NX generator

* refactor: regenerate @gauzy/plugin-integration-upwork by NX generator

* refactor: regenerate @gauzy/plugin-integration-wakatime by NX generator

* fix(moment): adjust import syntax to resolve compatibility issues

* refactor: regenerate @gauzy/ui-config by NX generator

* refactor: regenerate @gauzy/ui-core by NX generator

* refactor: regenerate @gauzy/plugin-integration-* by NX generator

* refactor: regenerate @gauzy/plugin-integration-* by NX generator

* refactor: regenerate @gauzy/plugin-integration-* by NX generator

* refactor: regenerate @gauzy/plugin-integration-* by NX generator

* fix(scripts): update build script for libs to use Nx build command

* fix(deepscan): removed unused imports

* fix(deepscan): removed unused imports

* fix(deepscan): removed unused imports

* chore(libraries): Add public-api files for all libraries

* fix(moment-import): resolve conflicting import statements for moment

* chore(paths): Add path mapping for @gauzy/plugin-integration-ai in tsconfig

* refactor: regenerate @gauzy/desktop-libs by NX generator

* refactor: regenerate @gauzy/desktop-window by NX generator

* fix: resolve conflicting import styles for moment.js

* chore: bump image-size version from 1.0.2 to 1.1.1

* fix: resolve import conflict for 'csv-parser' with consistent import style

* feat: add dynamic watch script for NX projects

* fix(api): update project.json assets path

* refactor: regenerate @gauzy/desktop-ui-lib by NX generator

* chore(dependencies): Move tslib from peerDependencies to dependencies

* refactor(package): Rename package from desktop-libs to desktop-lib

* chore: move desktop-api from packages to apps folder

* chore(desktop): add missing jest.config.ts file for desktop application

* chore(package): added "engines" field for Node.js and Yarn version

* chore(deps): bump @angular-builders/custom-webpack from ^16.0.1 to ^17.0.0

* refactor(config): replace deprecated 'browserTarget' with 'buildTarget' for gauzy application

* chore(deps): bump rxjs from 7.4.0 to 7.8.0

* chore(deps): bump typescript from 5.1.6 to 5.4.5

* refactor: regenerate @gauzy/core by NX generator

* Update packages/core/package.json

* fix: dynamically resolve migrations directory for both src and dist environments

* fix(api): resolve issues with NX API server configuration

* fix(api): resolve issues with NX API server configuration

* fix(api): correct asset public path

* fix(api): correct asset public path for seeds

* fix(api): correct asset public path for seeds

* fix(deepscan): removed unused imports

* fix(deepscan): removed unused imports

* fix: migration configuration settings for dist/src

* fix(deepscan): removed unused imports

* chore(nx): migrate @nx/workspace to version 19.8.10

* chore(nx): migrate @nx/workspace to version 20.1.3

* chore(deps): update packages to support Angular v18

* chore: regenerate @gauzy/desktop app using Nx generator

* chore: regenerate @gauzy/api app using Nx generator

* chore(deps): update packages to support Angular v18

* chore(deps): update packages to support Angular v18

* refactor: regenerate @gauzy/plugin-integration-* by NX generator

* chore(deps): update packages to support Angular v18

* fix(package.json): correct main entry points to ./src/index.js

* fix(package.json): correct main entry points to ./src/index.js

* refactor: regenerate packages libs using NX generator

* wip: building desktop application for windows

* wip: building desktop application for windows

* fix: building desktop apps for windows

* fix: standardize moment.js imports to avoid conflicts

* fix: standardize moment.js imports to avoid conflicts

* chore(deps): bump electron-util from 0.17.2 to 0.18.1

* chore(deps): bump electron-util from 0.17.2 to 0.18.1

* chore(tsconfig): enable `esModuleInterop` in tsconfig.lib.json

* chore(tsconfig): enable `esModuleInterop` in tsconfig.lib.json

* feat: add nx-electron package for Electron app integration

* refactor: regenerate @gauzy/desktop-timer by NX generator

* refactor: regenerate @gauzy/gauzy-server by NX generator

* fix(apps): add missing polyfills.ts

* chore(deps): bump electron from 30.0.1 to 33.2.1

* chore(deps): bump @types/electro from 1.6.10 to 1.6.12

* fix: server build

* feat: update better sqlite and elctron builder

* chore(deps): bump better-sqlite3 from 9.5.0 to 11.6.0

* chore(tsconfig): enable `esModuleInterop` in tsconfig.lib.json

* update build:gauzy-server script in package.json

* chore(build): update ui-core build scripts to include ui-config build dependency

* hore(nx): update implicitDependencies configuration for better build order tracking

* chore(deps): downgrade electron, electron-builder and better-sqlite3

* update better-sqlite3 version from 11.6.0 to 9.6.0 in yarn.lock

* fix: circular dependecies

* fix: project.json: modify build and test targets, add config target

* fix: ng-package.json: changed styleIncludePaths

* fix: circular dependecies: moved social links from auth module to constants, refactored auth module imports and providers, and updated social links component to import from constants.

* fix: project.json: modify index, main, and polyfills settings, and remove aot, vendorChunk, and buildOptimizer options.

* fix: tsconfig files, relaxed TypeScript strict mode, and refactored app constants to use injector.get(GAUZY_ENV) instead of environment

* swap 'index' and 'browser' properties in project.json

* fix ng-package.json and tsconfig.json files in integration-ai-ui package.

* remove implicit dependencies and update output formats in integration-ai-ui project.json

* fix: file paths in index.ts and package.json to include 'browser' directory

* rename "gauzy-server-api" to "gauzy-api-server" in project.json.

* fix: electron-builder version from 33.2.1 to 30.0.1 in various build scripts

* fix(apps): desktop-timer for windows

* chore(deps): pin better-sqlite3 to version 9.6.0

* fix(apps): desktop-timer for windows

* fix(apps): desktop-timer for windows

* refactor(desktop-ui-lib): updated include style paths

* fix(apps): desktop-timer for windows

* fix(apps): api build issue

* fix(apps): desktop-timer for windows

* fix(apps): desktop for windows

* fix: package.json, nx.json, and project.json files with various changes to scripts, configurations, and dependencies.

* feat: add node modules to files

* fix: ignore html

* feat: add new entries points

* fix: static file ui dir path

* fix: package json build

* fix: base href in build option

* fix: blank window

* fix(contracts): resolve merge conflicts and ensure consistency in package

* fix: merged changes from conflicting branches.

* fix: merged changes from conflicting branches.

* fix(deepscan): removed unused imports

* fix(cspell): typo spelling :-)

* fix(apps): full desktop for windows

* fix(apps): full desktop for windows

* feat: create screening task entity and repositories

* feat: create Postgres migration

* feat: add MySQL migration

* wip(apps): desktop server for windows

* feat: generate SQLite migration

* fix(apps): desktop server for windows

* feat: create screening task service

* fix: improve task statuses added cancelled status

* feat: update screening issue method

* feat: task finders, include isScreening filter

* feat: screening task commands

* feat: screening task controller

* refactor(apps): API custom webpack configuration

* refactor(apps): Desktop API custom webpack configuration

* fix(apps): server API for windows

* fix: merged changes from conflicting branches.

* chore: update allowedCommonJsDependencies in build configuration

* chore(deps): bump tsconfig-paths from 3.9.0 to 4.2.0

* chore: add resolve alias generation for Nx libraries

* fix: create screening task add prefix and task number

* fix: resolve migration `yarn run migration:generate` command

* fix: resolve seeder `yarn run seed:all` command

* chore: update `tsconfig-paths-webpack-plugin` to version ^4.2.0 across the workspace

* fix: ui-config dist package resolve path

* refactor: updated custom webpack config

* [Bug] Issue in Opening Appointment bug

* Fix:Issue in Opening Appointment bug

* Fix: Unable to Pick a Date and Time for Appointment

* Remove console log

* chore: add CHANGELOG.md for packages

* fix: update outputPath configuration for packages

* fix: resolve duplicate and inconsistent package references in dependencies

* Fix: Users Can Add Duplicate Employment Types

* Fix: Users Can Add Duplicate Employment Types

* chore: remove "exports" field from package.json

* Fix: Users Can Add Duplicate Departments

* fix: update outputPath configuration for desktop packages

* fix(apps): full desktop for windows

* fix(deps): add missing dependencies

* chore(nx): migrate @nx/workspace to version 20.1.4

* fix(nx): resolve mixed path separators causing project graph conflict

* chore(nx): disable cache for pacages executor

* Fix: Duplicate departments

* chore: remove unused common-angular package

- Deleted the `common-angular` package as it is no longer required.

* chore: remove unused common-angular package

* fix: desktop server issues

* chore(nx): enable cache for packages executor

* chore(nx): enable cache for packages executor

* fix(database): correct migration directory path resolution

* chore: add workspace package references and update dependencies

* chore: update start:api:core script to use NX run command

* chore: add workspace package references and update dependencies

* Fix: Name duplication

* chore: improve logging and structure for start and stop methods

* chore: remove @gauzy/ui-config dependency

* chore(deps): resolve conflicting @types/google.maps versions

* chore(deps): resolve duplicate @types/jest versions

* chore: add 'google.maps' and 'node' types to tsconfig

* Fix: Unable to remove selection when user use “Select All” Option in “Invite Employee” Popup Window

* Fix: Work End Date Can Be Set Before Work Start Date

* Remove console log

* chore(deps): bump copy-webpack-plugin from 9.0.1 to 12.0.2

* feat(build): integrate copy-webpack-plugin for package copying

* fix(build): ensure cross-platform compatibility for packageRoot paths

* fix(build): recursively collect and copy nested packages

* refactor(migrations): simplify migration path resolution

* fix(workspace): update package paths to use built distributions

* refactor: prioritize .env over .env.local

* refactor: move 'serve' configuration under 'options' for project.json

* fix(deepscan): removed unused imports

* fix(workspace): update package paths to use built distributions

* [Feat] Improve Employee Setting (#8585)

* feat: improve employee setting entity and migration

* fix(deepscan): unused import

* feat: add employee setting subscriber

* feat: employee setting create and update services

* feat: employee setting commands

* feat: employee setting API

* fix: employee setting creation

* fix: include tenant in base entity enum

* fix: postgres migration for employee setting

* fix: SQLite employee setting migration

* fix: SQLite and MySQL employee setting migration

* fix: employee setting migration

* fix: setting type storing int values

* fix: env vars

* fix: .env.local

* chore(nx): add defaultCollection configuration for @nstudio/xplat

* Fix: Filters Not Working on “Time Off” Screen

* Format code

* fix(cspell): typo spelling :-)

---------

Co-authored-by: Rahul R. <rahulrathore576@gmail.com>
Co-authored-by: Kifungo A <45813955+adkif@users.noreply.github.com>
Co-authored-by: GloireMutaliko21 <mufunyig@gmail.com>
Co-authored-by: Rahul R. <41804588+rahul-rocket@users.noreply.github.com>
Co-authored-by: samuelmbabhazi <samuelmbabhazi42@gmail.com>
Co-authored-by: syns2191 <sutralian@gmail.com>
Co-authored-by: Gloire Mutaliko (Salva) <86450367+GloireMutaliko21@users.noreply.github.com>
2024-12-20 08:30:49 +01:00