diff --git a/.cspell.json b/.cspell.json index ecaabad6060..eba7db40f5c 100644 --- a/.cspell.json +++ b/.cspell.json @@ -393,7 +393,9 @@ "Desterrro", "Chetan", "chetan", - "Yostorono" + "Yostorono", + "sarif", + "SARIF" ], "useGitignore": true, "ignorePaths": [ diff --git a/.env.docker b/.env.docker index 12cb10ba211..6c4c7bce821 100644 --- a/.env.docker +++ b/.env.docker @@ -30,8 +30,8 @@ CLIENT_BASE_URL=http://localhost:4200 #set to Website Platform PLATFORM_WEBSITE_URL=https://gauzy.co -# DB_TYPE: sqlite | postgres -DB_TYPE=sqlite +# DB_TYPE: sqlite | postgres | better-sqlite3 +DB_TYPE=better-sqlite3 DB_SYNCHRONIZE=false # Below are PostgreSQL Connection Parameters diff --git a/.env.local b/.env.local index ec2482079a2..884af5c44f7 100644 --- a/.env.local +++ b/.env.local @@ -30,8 +30,8 @@ CLIENT_BASE_URL=http://localhost:4200 #set to Website Platform PLATFORM_WEBSITE_URL=https://gauzy.co -# DB_TYPE: sqlite | postgres -DB_TYPE=sqlite +# DB_TYPE: sqlite | postgres | better-sqlite3 +DB_TYPE=better-sqlite3 DB_SYNCHRONIZE=false # Below are PostgreSQL Connection Parameters diff --git a/.env.sample b/.env.sample index 449079d46f0..1f686561b6f 100644 --- a/.env.sample +++ b/.env.sample @@ -15,8 +15,8 @@ CLIENT_BASE_URL=http://localhost:4200 #set to Website Platform PLATFORM_WEBSITE_URL=https://gauzy.co -# DB_TYPE: sqlite | postgres -DB_TYPE=sqlite +# DB_TYPE: sqlite | postgres | better-sqlite3 +DB_TYPE=better-sqlite3 # PostgreSQL Connection Parameters # DB_HOST=localhost diff --git a/apps/api/src/plugin-config.ts b/apps/api/src/plugin-config.ts index d64b7f8cb35..e8e41d6c54b 100644 --- a/apps/api/src/plugin-config.ts +++ b/apps/api/src/plugin-config.ts @@ -129,5 +129,26 @@ function getDbConfig(): DataSourceOptions { logger: 'file', // Removes console logging, instead logs all queries in a file ormlogs.log synchronize: process.env.DB_SYNCHRONIZE === 'true' ? true : false, // We are using migrations, synchronize should be set to false. }; + case 'better-sqlite3': + const betterSqlitePath = + process.env.DB_PATH || + path.join( + path.resolve('.', ...['apps', 'api', 'data']), + 'gauzy.sqlite3' + ); + + return { + type: dbType, + database: betterSqlitePath, + logging: 'all', + logger: 'file', // Removes console logging, instead logs all queries in a file ormlogs.log + synchronize: process.env.DB_SYNCHRONIZE === 'true', // We are using migrations, synchronize should be set to false. + prepareDatabase: (db) => { + if (!process.env.IS_ELECTRON) { + // Enhance performance + db.pragma('journal_mode = WAL'); + } + } + }; } } diff --git a/apps/desktop-timer/src/index.ts b/apps/desktop-timer/src/index.ts index 531a200cb64..f8e20fffb69 100644 --- a/apps/desktop-timer/src/index.ts +++ b/apps/desktop-timer/src/index.ts @@ -392,7 +392,7 @@ app.on('ready', async () => { if (!settings) { launchAtStartup(true, false); } - if (provider.dialect === 'sqlite') { + if (['sqlite', 'better-sqlite'].includes(provider.dialect)) { try { const res = await knex.raw(`pragma journal_mode = WAL;`); console.log(res); @@ -600,46 +600,13 @@ ipcMain.on('restart_and_update', () => { ipcMain.on('check_database_connection', async (event, arg) => { try { - const provider = arg.db; - let databaseOptions; - if (provider === 'postgres' || provider === 'mysql') { - databaseOptions = { - client: provider === 'postgres' ? 'pg' : 'mysql', - connection: { - host: arg[provider].dbHost, - user: arg[provider].dbUsername, - password: arg[provider].dbPassword, - database: arg[provider].dbName, - port: arg[provider].dbPort, - }, - }; - } else { - databaseOptions = { - client: 'sqlite3', - connection: { - filename: sqlite3filename, - }, - }; - } - const dbConn = require('knex')(databaseOptions); - await dbConn.raw('select 1+1 as result'); + const driver = await provider.check(arg); event.sender.send('database_status', { status: true, - message: - provider === 'postgres' - ? TranslateService.instant( - 'TIMER_TRACKER.DIALOG.CONNECTION_DRIVER', - { driver: 'PostgresSQL' } - ) - : provider === 'mysql' - ? TranslateService.instant( - 'TIMER_TRACKER.DIALOG.CONNECTION_DRIVER', - { driver: 'MySQL' } - ) - : TranslateService.instant( - 'TIMER_TRACKER.DIALOG.CONNECTION_DRIVER', - { driver: 'SQLite' } - ), + message: TranslateService.instant( + 'TIMER_TRACKER.DIALOG.CONNECTION_DRIVER', + { driver } + ), }); } catch (error) { event.sender.send('database_status', { diff --git a/apps/desktop/src/index.ts b/apps/desktop/src/index.ts index 924616e924a..47161e5ebed 100644 --- a/apps/desktop/src/index.ts +++ b/apps/desktop/src/index.ts @@ -233,7 +233,10 @@ async function startServer(value, restart = false) { if (value.db === 'sqlite') { process.env.DB_PATH = sqlite3filename; process.env.DB_TYPE = 'sqlite'; - } else { + }else if(value.db === 'better-sqlite') { + process.env.DB_PATH = sqlite3filename; + process.env.DB_TYPE = 'better-sqlite3'; + }else { process.env.DB_TYPE = 'postgres'; process.env.DB_HOST = value['postgres']?.dbHost; process.env.DB_PORT = value['postgres']?.dbPort; @@ -462,7 +465,7 @@ app.on('ready', async () => { splashScreen = new SplashScreen(pathWindow.timeTrackerUi); await splashScreen.loadURL(); splashScreen.show(); - if (provider.dialect === 'sqlite') { + if (['sqlite', 'better-sqlite'].includes(provider.dialect)) { try { const res = await knex.raw(`pragma journal_mode = WAL;`) console.log(res); @@ -698,34 +701,12 @@ ipcMain.on('restart_and_update', () => { ipcMain.on('check_database_connection', async (event, arg) => { try { - const provider = arg.db; - let databaseOptions; - if (provider === 'postgres') { - databaseOptions = { - client: 'pg', - connection: { - host: arg[provider].dbHost, - user: arg[provider].dbUsername, - password: arg[provider].dbPassword, - database: arg[provider].dbName, - port: arg[provider].dbPort - } - }; - } else { - databaseOptions = { - client: 'sqlite', - connection: { - filename: sqlite3filename, - }, - }; - } - const dbConn = require('knex')(databaseOptions); - await dbConn.raw('select 1+1 as result'); + const driver = await provider.check(arg); event.sender.send('database_status', { status: true, message: TranslateService.instant( 'TIMER_TRACKER.DIALOG.CONNECTION_DRIVER', - { driver: provider === 'postgres' ? 'PostgresSQL' : 'SQLite' } + { driver } ) }); } catch (error) { diff --git a/apps/gauzy/src/app/@core/auth/auth-strategy.service.ts b/apps/gauzy/src/app/@core/auth/auth-strategy.service.ts index 60aa48f9ee0..0e7b0c3b0c5 100644 --- a/apps/gauzy/src/app/@core/auth/auth-strategy.service.ts +++ b/apps/gauzy/src/app/@core/auth/auth-strategy.service.ts @@ -3,7 +3,7 @@ import { NbAuthResult, NbAuthStrategy } from '@nebular/auth'; import { ActivatedRoute } from '@angular/router'; import { catchError, filter, map, switchMap } from 'rxjs/operators'; import { Injectable } from '@angular/core'; -import { IUser, IAuthResponse } from '@gauzy/contracts'; +import { IUser, IAuthResponse, IUserLoginInput } from '@gauzy/contracts'; import { distinctUntilChange, isNotEmpty } from '@gauzy/common-angular'; import { NbAuthStrategyClass } from '@nebular/auth/auth.options'; import { AuthService } from '../services/auth.service'; @@ -102,7 +102,7 @@ export class AuthStrategy extends NbAuthStrategy { rememberMe(data?: any) { const rememberMe = !!data.rememberMe; if (rememberMe) { - this.cookieService.set('email', data.email); + this.cookieService.set('email', data.email?.trim()); this.cookieService.set('rememberMe', 'true'); } else { this.cookieService.delete('rememberMe'); @@ -130,7 +130,7 @@ export class AuthStrategy extends NbAuthStrategy { lastName: fullName ? fullName.split(' ').slice(-1).join(' ') : null, - email, + email: email?.trim(), tenant, tags, }, @@ -296,7 +296,8 @@ export class AuthStrategy extends NbAuthStrategy { } } - public login(loginInput): Observable { + public login(loginInput: IUserLoginInput): Observable { + loginInput.email = loginInput.email?.trim(); return this.authService.login(loginInput).pipe( map((res: IAuthResponse) => { let user, token, refresh_token; diff --git a/apps/gauzy/src/app/@core/services/auth.service.ts b/apps/gauzy/src/app/@core/services/auth.service.ts index daeda500f7e..86e5534a90d 100644 --- a/apps/gauzy/src/app/@core/services/auth.service.ts +++ b/apps/gauzy/src/app/@core/services/auth.service.ts @@ -18,10 +18,7 @@ import { API_PREFIX } from '../constants/app.constants'; @Injectable() export class AuthService { - - constructor( - private readonly http: HttpClient - ) { } + constructor(private readonly http: HttpClient) {} isAuthenticated(): Promise { return firstValueFrom( @@ -33,7 +30,7 @@ export class AuthService { return this.http.post(`${API_PREFIX}/auth/email/verify`, body); } - login(loginInput): Observable { + login(loginInput: IUserLoginInput): Observable { return this.http.post( `${API_PREFIX}/auth/login`, loginInput @@ -45,9 +42,14 @@ export class AuthService { * @param input - IUserLoginInput containing email and password. * @returns Promise representing the response from the server. */ - signinWorkspaces(input: IUserLoginInput): Observable { + signinWorkspaces( + input: IUserLoginInput + ): Observable { try { - return this.http.post(`${API_PREFIX}/auth/signin.workspaces`, input); + return this.http.post( + `${API_PREFIX}/auth/signin.workspaces`, + input + ); } catch (error) { console.log('Error while signin workspaces: %s', error?.message); // Handle errors appropriately (e.g., log, throw, etc.) @@ -89,13 +91,13 @@ export class AuthService { hasRole(roles: RolesEnum[]): Observable { return this.http.get(`${API_PREFIX}/auth/role`, { - params: toParams({ roles }) + params: toParams({ roles }), }); } hasPermissions(...permissions: PermissionsEnum[]): Observable { return this.http.get(`${API_PREFIX}/auth/permissions`, { - params: toParams({ permissions }) + params: toParams({ permissions }), }); } @@ -108,7 +110,7 @@ export class AuthService { refreshToken(refresh_token: string): Promise { return firstValueFrom( this.http.post(`${API_PREFIX}/auth/refresh-token`, { - refresh_token: refresh_token + refresh_token: refresh_token, }) ); } diff --git a/apps/gauzy/src/app/@shared/directives/index.ts b/apps/gauzy/src/app/@shared/directives/index.ts index 919035cfd5c..bddabe95279 100755 --- a/apps/gauzy/src/app/@shared/directives/index.ts +++ b/apps/gauzy/src/app/@shared/directives/index.ts @@ -5,6 +5,7 @@ import { OutsideDirective } from './outside.directive'; import { UnderConstructionDirective } from './under-construction.directive'; import { ReadMoreDirective } from './read-more'; import { TimeTrackingAuthorizedDirective } from './time-tracking-authorized-directive'; +import { NoSpaceEdgesDirective } from './no-space-edges.directive'; export const DIRECTIVES = [ AutocompleteOffDirective, @@ -13,5 +14,6 @@ export const DIRECTIVES = [ ReadMoreDirective, TimeTrackingAuthorizedDirective, OutsideDirective, - UnderConstructionDirective + UnderConstructionDirective, + NoSpaceEdgesDirective, ]; diff --git a/apps/gauzy/src/app/@shared/directives/no-space-edges.directive.ts b/apps/gauzy/src/app/@shared/directives/no-space-edges.directive.ts new file mode 100644 index 00000000000..deceba0bbc9 --- /dev/null +++ b/apps/gauzy/src/app/@shared/directives/no-space-edges.directive.ts @@ -0,0 +1,13 @@ +import { Directive, ElementRef, HostListener } from '@angular/core'; + +@Directive({ + selector: '[noSpaceEdges]', +}) +export class NoSpaceEdgesDirective { + constructor(private el: ElementRef) {} + + @HostListener('input', ['$event.target.value']) + onInput(value: string) { + this.el.nativeElement.value = value.trim(); + } +} diff --git a/apps/gauzy/src/app/@shared/regex/regex-patterns.const.ts b/apps/gauzy/src/app/@shared/regex/regex-patterns.const.ts index 403661f554b..eeafa71ca2f 100644 --- a/apps/gauzy/src/app/@shared/regex/regex-patterns.const.ts +++ b/apps/gauzy/src/app/@shared/regex/regex-patterns.const.ts @@ -2,5 +2,6 @@ export const patterns = { websiteUrl: /^((?:https?:\/\/)[^./]+(?:\.[^./]+)+(?:\/.*)?)$/, imageUrl: /^(http)?s?:?(\/\/[^"']*\.(?:png|jpg|jpeg|gif|png|svg))/, email: /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/, - host: /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]).)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$/ + host: /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]).)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$/, + passwordNoSpaceEdges: /^(?!\s).*[^\s]$/, }; diff --git a/apps/gauzy/src/app/@theme/components/header/selectors/date-range-picker/date-range-picker.component.ts b/apps/gauzy/src/app/@theme/components/header/selectors/date-range-picker/date-range-picker.component.ts index 6f8d78f0c09..378716463e6 100644 --- a/apps/gauzy/src/app/@theme/components/header/selectors/date-range-picker/date-range-picker.component.ts +++ b/apps/gauzy/src/app/@theme/components/header/selectors/date-range-picker/date-range-picker.component.ts @@ -59,7 +59,7 @@ export class DateRangePickerComponent extends TranslationBaseComponent implement displayFormat: 'DD.MM.YYYY', // could be 'YYYY-MM-DDTHH:mm:ss.SSSSZ' format: 'DD.MM.YYYY', // default is format value direction: 'ltr', - firstDay: dayOfWeekAsString(this.store.selectedOrganization.startWeekOn) || moment.localeData().firstDayOfWeek() + firstDay: dayOfWeekAsString(this.store.selectedOrganization?.startWeekOn) || moment.localeData().firstDayOfWeek() }; get locale(): LocaleConfig { return this._locale; diff --git a/apps/gauzy/src/app/@theme/styles/_overrides.scss b/apps/gauzy/src/app/@theme/styles/_overrides.scss index 9eb32455bc6..a2736a37323 100644 --- a/apps/gauzy/src/app/@theme/styles/_overrides.scss +++ b/apps/gauzy/src/app/@theme/styles/_overrides.scss @@ -39,6 +39,11 @@ body { } @mixin nb-overrides() { + p.caption.status-danger { + margin-bottom: 0; + margin-top: 0.3rem; + } + nb-route-tabset .route-tab.active .tab-link { background: var(--gauzy-card-2); margin-bottom: 1px; diff --git a/apps/gauzy/src/app/auth/auth.module.ts b/apps/gauzy/src/app/auth/auth.module.ts index e9343ee4c9e..a294af9415a 100644 --- a/apps/gauzy/src/app/auth/auth.module.ts +++ b/apps/gauzy/src/app/auth/auth.module.ts @@ -29,6 +29,7 @@ import { NgxResetPasswordComponent } from "./reset-password/reset-password.compo import { NgxFaqModule } from '../@shared/faq'; import { ConfirmEmailModule } from './confirm-email'; import { ElectronService } from '../@core/auth/electron.service'; +import { SharedModule } from '../@shared/shared.module'; @NgModule({ imports: [ @@ -48,10 +49,11 @@ import { ElectronService } from '../@core/auth/electron.service'; NbFormFieldModule, NbSelectModule, NbLayoutModule, - ThemeModule, - ThemeSelectorModule, + ThemeModule, + ThemeSelectorModule, NgxFaqModule, - ConfirmEmailModule + ConfirmEmailModule, + SharedModule, ], declarations: [ NgxLoginComponent, @@ -61,8 +63,8 @@ import { ElectronService } from '../@core/auth/electron.service'; NgxRegisterSideSingleFeatureComponent, NgxAuthComponent, NgxRegisterComponent, - NgxResetPasswordComponent + NgxResetPasswordComponent, ], - providers: [ElectronService] + providers: [ElectronService], }) export class NgxAuthModule {} diff --git a/apps/gauzy/src/app/auth/login/login.component.html b/apps/gauzy/src/app/auth/login/login.component.html index 363a06649c3..1acd870ad55 100644 --- a/apps/gauzy/src/app/auth/login/login.component.html +++ b/apps/gauzy/src/app/auth/login/login.component.html @@ -71,6 +71,7 @@

{{ 'LOGIN_PAGE.TITLE' | translate }}

[(ngModel)]="user.email" #email="ngModel" name="email" + noSpaceEdges id="input-email" pattern=".+@.+\..+" [placeholder]="'LOGIN_PAGE.PLACEHOLDERS.EMAIL' | translate" @@ -112,6 +113,7 @@

{{ 'LOGIN_PAGE.TITLE' | translate }}

fullWidth [(ngModel)]="user.password" #password="ngModel" + [pattern]="passwordNoSpaceEdges" name="password" [type]="showPassword ? 'text' : 'password'" id="input-password" @@ -154,6 +156,9 @@

{{ 'LOGIN_PAGE.TITLE' | translate }}

+

+ {{ 'LOGIN_PAGE.VALIDATION.PASSWORD_NO_SPACE_EDGES' | translate }} +

Register id="input-email" name="email" pattern=".+@.+..+" + noSpaceEdges placeholder="Email address" fullWidth fieldSize="large" @@ -112,6 +113,7 @@

Register

[(ngModel)]="user.password" [type]="showPassword ? 'text' : 'password'" #password="ngModel" + [pattern]="passwordNoSpaceEdges" type="password" id="input-password" name="password" @@ -148,6 +150,9 @@

Register

+

+ Passwords must not begin or end with spaces. +

Password is required!

@@ -293,4 +298,3 @@

Register

- diff --git a/apps/gauzy/src/app/auth/register/register.component.ts b/apps/gauzy/src/app/auth/register/register.component.ts index 143a68e39b5..309a17d38b5 100644 --- a/apps/gauzy/src/app/auth/register/register.component.ts +++ b/apps/gauzy/src/app/auth/register/register.component.ts @@ -1,15 +1,14 @@ import { Component } from '@angular/core'; import { NbRegisterComponent } from '@nebular/auth'; - - +import { patterns } from '../../@shared/regex/regex-patterns.const'; @Component({ - selector: 'ngx-register', - templateUrl: './register.component.html', - styleUrls: ['./register.component.scss'], + selector: 'ngx-register', + templateUrl: './register.component.html', + styleUrls: ['./register.component.scss'], }) export class NgxRegisterComponent extends NbRegisterComponent { - - showPassword: boolean = false; - showConfirmPassword: boolean = false; + showPassword: boolean = false; + showConfirmPassword: boolean = false; + passwordNoSpaceEdges = patterns.passwordNoSpaceEdges; } diff --git a/apps/gauzy/src/app/pages/dashboard/time-tracking/time-tracking.component.ts b/apps/gauzy/src/app/pages/dashboard/time-tracking/time-tracking.component.ts index e65bdb171e3..f4007f37377 100644 --- a/apps/gauzy/src/app/pages/dashboard/time-tracking/time-tracking.component.ts +++ b/apps/gauzy/src/app/pages/dashboard/time-tracking/time-tracking.component.ts @@ -348,7 +348,7 @@ export class TimeTrackingComponent extends TranslationBaseComponent memo + parseInt(activity.duration + '', 10), 0 ); - this.activities = activities.map((activity) => { + this.activities = (activities || []).map((activity) => { activity.durationPercentage = (activity.duration * 100) / sum; return activity; }); @@ -413,7 +413,7 @@ export class TimeTrackingComponent extends TranslationBaseComponent this.memberLoading = true; const members = await this.timesheetStatisticsService.getMembers(request); - this.members = members.map((member) => { + this.members = (members || []).map((member) => { const week: any = indexBy(member.weekHours, 'day'); const sum = reduce( member.weekHours, diff --git a/apps/gauzy/src/app/pages/projects/projects-mutation/projects-mutation.component.html b/apps/gauzy/src/app/pages/projects/projects-mutation/projects-mutation.component.html index d2b62122d42..a5a46ad034a 100644 --- a/apps/gauzy/src/app/pages/projects/projects-mutation/projects-mutation.component.html +++ b/apps/gauzy/src/app/pages/projects/projects-mutation/projects-mutation.component.html @@ -100,12 +100,12 @@ : 'basic' " /> -
{{ 'FORM.ERROR.PROJECT_NAME' | translate }} -
+

@@ -1571,7 +1571,7 @@

- +

{{ 'TIMER_TRACKER.SETTINGS.DB_HOST' | translate }}

diff --git a/packages/desktop-ui-lib/src/lib/settings/settings.component.ts b/packages/desktop-ui-lib/src/lib/settings/settings.component.ts index bb9bda33aee..c28f4ccdf35 100644 --- a/packages/desktop-ui-lib/src/lib/settings/settings.component.ts +++ b/packages/desktop-ui-lib/src/lib/settings/settings.component.ts @@ -354,7 +354,7 @@ export class SettingsComponent implements OnInit, AfterViewInit { screenshotNotification = null; config = { /* Default Selected dialect */ - db: 'sqlite', + db: 'better-sqlite', /* Default Mysql config */ mysql: { dbHost: '127.0.0.1', @@ -404,7 +404,7 @@ export class SettingsComponent implements OnInit, AfterViewInit { ? [this.serverTypes.custom, this.serverTypes.live] : [this.serverTypes.integrated, this.serverTypes.custom, this.serverTypes.live]; - driverOptions = ['sqlite', 'postgres', ...(this.isDesktopTimer ? ['mysql'] : [])]; + driverOptions = ['better-sqlite', 'sqlite', 'postgres', ...(this.isDesktopTimer ? ['mysql'] : [])]; muted: boolean; delayOptions: number[] = [0.5, 1, 3, 24]; @@ -1034,6 +1034,9 @@ export class SettingsComponent implements OnInit, AfterViewInit { case 'mysql': this.config.db = 'mysql'; break; + case 'better-sqlite': + this.config.db = 'better-sqlite'; + break; default: break; } diff --git a/packages/desktop-ui-lib/src/lib/settings/settings.module.ts b/packages/desktop-ui-lib/src/lib/settings/settings.module.ts index 8e34c33b117..c18d207d8a3 100644 --- a/packages/desktop-ui-lib/src/lib/settings/settings.module.ts +++ b/packages/desktop-ui-lib/src/lib/settings/settings.module.ts @@ -28,6 +28,7 @@ import { LanguageModule } from '../language/language.module'; import { TranslateModule } from '@ngx-translate/core'; import { Store } from '../services'; import { LanguageSelectorService } from '../language/language-selector.service'; +import {TaskRenderModule} from "../time-tracker/task-render"; @NgModule({ declarations: [SettingsComponent], @@ -52,7 +53,8 @@ import { LanguageSelectorService } from '../language/language-selector.service'; NbSpinnerModule, DesktopDirectiveModule, LanguageModule, - TranslateModule + TranslateModule, + TaskRenderModule ], providers: [ NbToastrService, diff --git a/packages/desktop-ui-lib/src/lib/setup/setup.component.ts b/packages/desktop-ui-lib/src/lib/setup/setup.component.ts index a0d0fd8f825..690f5c06cdf 100644 --- a/packages/desktop-ui-lib/src/lib/setup/setup.component.ts +++ b/packages/desktop-ui-lib/src/lib/setup/setup.component.ts @@ -278,7 +278,7 @@ export class SetupComponent implements OnInit { if (this.databaseDriver.sqlite) { return { - db: 'sqlite', + db: 'better-sqlite', }; } diff --git a/packages/desktop-ui-lib/src/lib/time-tracker/task-render/task-render.module.ts b/packages/desktop-ui-lib/src/lib/time-tracker/task-render/task-render.module.ts index 4f764edd9b7..921e5824b97 100644 --- a/packages/desktop-ui-lib/src/lib/time-tracker/task-render/task-render.module.ts +++ b/packages/desktop-ui-lib/src/lib/time-tracker/task-render/task-render.module.ts @@ -52,7 +52,8 @@ import { TaskDetailComponent } from './task-detail/task-detail.component'; TranslateModule, NbPopoverModule, NbBadgeModule, - NbCardModule + NbCardModule, ], + exports: [ReplacePipe], }) export class TaskRenderModule {} diff --git a/yarn.lock b/yarn.lock index 768f2049dc0..9cfb7e5c85e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10020,6 +10020,14 @@ before-after-hook@^2.2.0: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c" integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== +better-sqlite3@^8.7.0: + version "8.7.0" + resolved "https://registry.yarnpkg.com/better-sqlite3/-/better-sqlite3-8.7.0.tgz#bcc341856187b1d110a8a47234fa89c48c8ef538" + integrity sha512-99jZU4le+f3G6aIl6PmmV0cxUIWqKieHxsiF7G34CVFiE+/UabpYqkU0NJIkY/96mQKikHeBjtR27vFfs5JpEw== + dependencies: + bindings "^1.5.0" + prebuild-install "^7.1.1" + big-integer@^1.6.17: version "1.6.51" resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" @@ -10079,6 +10087,13 @@ binary@~0.3.0: buffers "~0.1.1" chainsaw "~0.1.0" +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + bl@^4.0.2, bl@^4.0.3, bl@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" @@ -17024,6 +17039,11 @@ file-type@^3.3.0: resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" integrity sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA== +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + file-uri-to-path@2: version "2.0.0" resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-2.0.0.tgz#7b415aeba227d575851e0a5b0c640d7656403fba" @@ -29147,7 +29167,7 @@ preact@^10.0.5: resolved "https://registry.yarnpkg.com/preact/-/preact-10.13.1.tgz#d220bd8771b8fa197680d4917f3cefc5eed88720" integrity sha512-KyoXVDU5OqTpG9LXlB3+y639JAGzl8JSBXLn1J9HTSB3gbKcuInga7bZnXLlxmK94ntTs1EFeZp0lrja2AuBYQ== -prebuild-install@7.1.1: +prebuild-install@7.1.1, prebuild-install@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45" integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==