From 7e90614f82d9a95210ff561d97f40d545d4a2c9b Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Tue, 12 Jul 2022 09:29:07 +0600 Subject: [PATCH 01/18] add pre-view page before uploading capture --- .../custom-camera-routing.module.ts | 2 +- .../custom-camera/custom-camera.module.ts | 3 +- .../custom-camera/custom-camera.page.html | 117 ++++++++++-------- .../home/custom-camera/custom-camera.page.ts | 47 ++++++- .../pre-publish-mode.component.html | 18 +++ .../pre-publish-mode.component.scss | 41 ++++++ .../pre-publish-mode.component.spec.ts | 26 ++++ .../pre-publish-mode.component.ts | 29 +++++ src/assets/i18n/en-us.json | 3 + src/assets/i18n/zh-tw.json | 3 + 10 files changed, 233 insertions(+), 56 deletions(-) create mode 100644 src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.html create mode 100644 src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.scss create mode 100644 src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.spec.ts create mode 100644 src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.ts diff --git a/src/app/features/home/custom-camera/custom-camera-routing.module.ts b/src/app/features/home/custom-camera/custom-camera-routing.module.ts index 471a97ef7..fbba440f6 100644 --- a/src/app/features/home/custom-camera/custom-camera-routing.module.ts +++ b/src/app/features/home/custom-camera/custom-camera-routing.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; +import { RouterModule, Routes } from '@angular/router'; import { CustomCameraPage } from './custom-camera.page'; diff --git a/src/app/features/home/custom-camera/custom-camera.module.ts b/src/app/features/home/custom-camera/custom-camera.module.ts index c4b4c14b7..c5d485bb5 100644 --- a/src/app/features/home/custom-camera/custom-camera.module.ts +++ b/src/app/features/home/custom-camera/custom-camera.module.ts @@ -6,6 +6,7 @@ import { SharedModule } from '../../../shared/shared.module'; import { CustomCameraPageRoutingModule } from './custom-camera-routing.module'; import { CustomCameraPage } from './custom-camera.page'; import { CustomCameraService } from './custom-camera.service'; +import { PrePublishModeComponent } from './pre-publish-mode/pre-publish-mode.component'; @NgModule({ imports: [ @@ -16,6 +17,6 @@ import { CustomCameraService } from './custom-camera.service'; JoyrideModule.forChild(), ], providers: [CustomCameraService], - declarations: [CustomCameraPage], + declarations: [CustomCameraPage, PrePublishModeComponent], }) export class CustomCameraPageModule {} diff --git a/src/app/features/home/custom-camera/custom-camera.page.html b/src/app/features/home/custom-camera/custom-camera.page.html index 313f5fc19..0e7d2a6ed 100644 --- a/src/app/features/home/custom-camera/custom-camera.page.html +++ b/src/app/features/home/custom-camera/custom-camera.page.html @@ -3,61 +3,74 @@ [style.--background]="'transparent'" *transloco="let t" > -
-
- GoPro - featured_video -
- - - close - - -
- - video_collection - - - + +
+
+ GoPro + featured_video +
- flip_camera_android + close -
+ +
+ + video_collection + + + + + + flip_camera_android + +
+ + + + diff --git a/src/app/features/home/custom-camera/custom-camera.page.ts b/src/app/features/home/custom-camera/custom-camera.page.ts index d6a4b1585..79c7e75bd 100644 --- a/src/app/features/home/custom-camera/custom-camera.page.ts +++ b/src/app/features/home/custom-camera/custom-camera.page.ts @@ -2,9 +2,10 @@ import { Location } from '@angular/common'; import { Component, OnDestroy, OnInit } from '@angular/core'; import { Router } from '@angular/router'; -import { PluginListenerHandle } from '@capacitor/core'; +import { Capacitor, PluginListenerHandle } from '@capacitor/core'; import { UntilDestroy } from '@ngneat/until-destroy'; import { CaptureResult, PreviewCamera } from '@numbersprotocol/preview-camera'; +import { BehaviorSubject } from 'rxjs'; import { ErrorService } from '../../../shared/error/error.service'; import { UserGuideService } from '../../../shared/user-guide/user-guide.service'; import { GoProBluetoothService } from '../../settings/go-pro/services/go-pro-bluetooth.service'; @@ -33,6 +34,13 @@ export class CustomCameraPage implements OnInit, OnDestroy { curSessionCaptureMediaItems: CustomCameraMediaItem[] = []; + mode$ = new BehaviorSubject<'capture' | 'pre-publish'>('capture'); + + curCaptureFilePath?: string; + curCaptureMimeType?: 'image/jpeg' | 'video/mp4'; + curCaptureType?: 'image' | 'video' = 'image'; + curCaptureSrc?: string; + readonly lastConnectedGoProDevice$ = this.goProBluetoothService.lastConnectedDevice$; @@ -85,7 +93,18 @@ export class CustomCameraPage implements OnInit, OnDestroy { if (data.errorMessage) { await this.errorService.toastError$(data.errorMessage).toPromise(); } else if (data.filePath) { - this.customCameraService.uploadToCapture(data.filePath, type); + const filePath = data.filePath; + + let mimeType: 'image/jpeg' | 'video/mp4' = 'image/jpeg'; + if (type === 'video') mimeType = 'video/mp4'; + + this.curCaptureFilePath = filePath; + this.curCaptureMimeType = mimeType; + this.curCaptureType = type; + this.curCaptureSrc = Capacitor.convertFileSrc(filePath); + this.mode$.next('pre-publish'); + + this.stopPreviewCamera(); } } @@ -131,6 +150,23 @@ export class CustomCameraPage implements OnInit, OnDestroy { } } + discardCurrentCapture() { + this.mode$.next('capture'); + this.startPreviewCamera(); + this.removeCurrentCapture(); + } + + confirmCurrentCapture() { + if (this.curCaptureFilePath && this.curCaptureType) { + this.customCameraService.uploadToCapture( + this.curCaptureFilePath, + this.curCaptureType + ); + this.removeCurrentCapture(); + } + this.leaveCustomCamera(); + } + async leaveCustomCamera() { return this.location.back(); } @@ -142,6 +178,13 @@ export class CustomCameraPage implements OnInit, OnDestroy { }); } + private removeCurrentCapture() { + // TODO: remove file this.curCaptureFilePath to free space + this.curCaptureFilePath = undefined; + this.curCaptureMimeType = undefined; + this.curCaptureSrc = undefined; + } + // eslint-disable-next-line class-methods-use-this private debugOnlyPreventContextMenuFromLongPressContextMenu() { // Prevent showing context menu on long press diff --git a/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.html b/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.html new file mode 100644 index 000000000..56e1c0af9 --- /dev/null +++ b/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.html @@ -0,0 +1,18 @@ +
+ + + +
+ +
+ +
diff --git a/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.scss b/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.scss new file mode 100644 index 000000000..b19627f54 --- /dev/null +++ b/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.scss @@ -0,0 +1,41 @@ +.action-buttons { + position: absolute; + top: 0; + left: 0; + right: 0; + margin-top: calc(var(--ion-safe-area-top) + 16px); + margin-left: 16px; + margin-right: 16px; + display: flex; + flex-direction: row; + justify-content: space-between; + z-index: 100; +} + +.back-button { + background: #486cd9 !important; /* stylelint-disable-line declaration-no-important */ + color: white !important; /* stylelint-disable-line declaration-no-important */ + backdrop-filter: blur(4px); + box-shadow: none; +} + +.confirm-button { + background: #486cd9 !important; /* stylelint-disable-line declaration-no-important */ + color: white !important; /* stylelint-disable-line declaration-no-important */ + border-radius: 37px; + height: 38px; +} + +.preview { + height: 100%; + overflow: auto; + display: flex; + flex-direction: column; + justify-content: center; + + app-media { + width: 100%; + object-fit: cover; + object-position: center; + } +} diff --git a/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.spec.ts b/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.spec.ts new file mode 100644 index 000000000..1aacbb205 --- /dev/null +++ b/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.spec.ts @@ -0,0 +1,26 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { SharedTestingModule } from '../../../../shared/shared-testing.module'; + +import { PrePublishModeComponent } from './pre-publish-mode.component'; + +describe('PrePublishModeComponent', () => { + let component: PrePublishModeComponent; + let fixture: ComponentFixture; + + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [PrePublishModeComponent], + imports: [SharedTestingModule], + }).compileComponents(); + + fixture = TestBed.createComponent(PrePublishModeComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }) + ); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.ts b/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.ts new file mode 100644 index 000000000..1fea586aa --- /dev/null +++ b/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.ts @@ -0,0 +1,29 @@ +import { Component, EventEmitter, Input, Output } from '@angular/core'; + +@Component({ + selector: 'app-pre-publish-mode', + templateUrl: './pre-publish-mode.component.html', + styleUrls: ['./pre-publish-mode.component.scss'], +}) +export class PrePublishModeComponent { + @Input() + curCaptureFilePath?: string; + + @Input() + curCaptureMimeType?: 'image/jpeg' | 'video/mp4'; + + @Input() + curCaptureSrc?: string; + + @Output() discard: EventEmitter = new EventEmitter(); + + @Output() confirm: EventEmitter = new EventEmitter(); + + onDiscard() { + this.discard.emit(null); + } + + onConfirm() { + this.confirm.emit(null); + } +} diff --git a/src/assets/i18n/en-us.json b/src/assets/i18n/en-us.json index 86caac067..314f771b7 100644 --- a/src/assets/i18n/en-us.json +++ b/src/assets/i18n/en-us.json @@ -268,6 +268,9 @@ "networkActionsAreUnavailable": "Network Actions are unavailable. Please try again later." } }, + "customCamera": { + "confirmCapture": "Confirm" + }, "wallets": { "wallets": "Wallets", "pullToRefreshBalance": "Pull to refresh balance", diff --git a/src/assets/i18n/zh-tw.json b/src/assets/i18n/zh-tw.json index 0e7d43cf0..a7f060682 100644 --- a/src/assets/i18n/zh-tw.json +++ b/src/assets/i18n/zh-tw.json @@ -268,6 +268,9 @@ "networkActionsAreUnavailable": "暫時無法使用 Network Action,請稍後再試。" } }, + "customCamera": { + "confirmCapture": "確認" + }, "wallets": { "wallets": "錢包", "pullToRefreshBalance": "下拉以刷新餘額", From 2b0190877a929df0041eab98206161f3e7591822 Mon Sep 17 00:00:00 2001 From: "Bofu Chen (bafu)" Date: Tue, 12 Jul 2022 17:41:29 +0800 Subject: [PATCH 02/18] docs(README.md): update how to setup env var for Android Studio Signed-off-by: Bofu Chen (bafu) --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 13341cbea..d9b000a4e 100644 --- a/README.md +++ b/README.md @@ -77,12 +77,10 @@ cordova-res android --skip-config --copy #### Android -If your operating system is Linux, set the `linuxAndroidStudioPath` in `capacitor.config.json`. For example, +If your operating system is Linux, set the environment variable `CAPACITOR_ANDROID_STUDIO_PATH` for your Android Studio. The default value is `/usr/local/android-studio/bin/studio.sh`. -```json -{ - "linuxAndroidStudioPath": "/home/username/android-studio/bin/studio.sh" -} +```sh +export CAPACITOR_ANDROID_STUDIO_PATH="/home/username/android-studio/bin/studio.sh" ``` Before running the app with Android Studio, build and sync the dependencies and web assets. From 24ecfc4576eb624ea6934cc66fb3ea35710fb2f7 Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Wed, 13 Jul 2022 15:45:19 +0600 Subject: [PATCH 03/18] fix(pre-publish.page): add header, footer to match UX --- .../pre-publish-mode.component.html | 4 +++- .../pre-publish-mode.component.scss | 21 +++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.html b/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.html index 56e1c0af9..eadb07419 100644 --- a/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.html +++ b/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.html @@ -9,10 +9,12 @@ mat-flat-button *transloco="let t" > - {{ t('customCamera.confirmCapture') }} + {{ t('customCamera.confirmCapture') | uppercase }}
+ + diff --git a/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.scss b/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.scss index b19627f54..174d93691 100644 --- a/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.scss +++ b/src/app/features/home/custom-camera/pre-publish-mode/pre-publish-mode.component.scss @@ -3,17 +3,30 @@ top: 0; left: 0; right: 0; - margin-top: calc(var(--ion-safe-area-top) + 16px); - margin-left: 16px; - margin-right: 16px; + padding: calc(var(--ion-safe-area-top) + 4px) 16px; + background-color: black; display: flex; flex-direction: row; justify-content: space-between; z-index: 100; } +.footer { + position: absolute; + bottom: 0; + left: 0; + right: 0; + padding: calc(var(--ion-safe-area-bottom) + 4px) 16px; + background-color: black; + display: flex; + flex-direction: row; + justify-content: space-between; + z-index: 100; + height: 75px; +} + .back-button { - background: #486cd9 !important; /* stylelint-disable-line declaration-no-important */ + background: #ffffff40 !important; /* stylelint-disable-line declaration-no-important */ color: white !important; /* stylelint-disable-line declaration-no-important */ backdrop-filter: blur(4px); box-shadow: none; From 2f74ca102d14557ec570b22a8437ffc6befa698e Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Wed, 13 Jul 2022 18:11:04 +0600 Subject: [PATCH 04/18] fix(custom-camera.page): remove capture after discard/approve --- .../home/custom-camera/custom-camera.page.ts | 6 +++--- .../home/custom-camera/custom-camera.service.ts | 13 +++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/app/features/home/custom-camera/custom-camera.page.ts b/src/app/features/home/custom-camera/custom-camera.page.ts index 79c7e75bd..ad655c7d1 100644 --- a/src/app/features/home/custom-camera/custom-camera.page.ts +++ b/src/app/features/home/custom-camera/custom-camera.page.ts @@ -156,9 +156,9 @@ export class CustomCameraPage implements OnInit, OnDestroy { this.removeCurrentCapture(); } - confirmCurrentCapture() { + async confirmCurrentCapture() { if (this.curCaptureFilePath && this.curCaptureType) { - this.customCameraService.uploadToCapture( + await this.customCameraService.uploadToCapture( this.curCaptureFilePath, this.curCaptureType ); @@ -179,7 +179,7 @@ export class CustomCameraPage implements OnInit, OnDestroy { } private removeCurrentCapture() { - // TODO: remove file this.curCaptureFilePath to free space + this.customCameraService.removeFile(this.curCaptureFilePath); this.curCaptureFilePath = undefined; this.curCaptureMimeType = undefined; this.curCaptureSrc = undefined; diff --git a/src/app/features/home/custom-camera/custom-camera.service.ts b/src/app/features/home/custom-camera/custom-camera.service.ts index 30febf614..2bce4eebe 100644 --- a/src/app/features/home/custom-camera/custom-camera.service.ts +++ b/src/app/features/home/custom-camera/custom-camera.service.ts @@ -1,10 +1,12 @@ import { HttpClient } from '@angular/common/http'; -import { Injectable } from '@angular/core'; +import { Inject, Injectable } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; import { Capacitor } from '@capacitor/core'; +import { FilesystemPlugin } from '@capacitor/filesystem'; import { TranslocoService } from '@ngneat/transloco'; import { PreviewCamera } from '@numbersprotocol/preview-camera'; import { BehaviorSubject } from 'rxjs'; +import { FILESYSTEM_PLUGIN } from '../../../shared/capacitor-plugins/capacitor-plugins.module'; import { CaptureService } from '../../../shared/capture/capture.service'; import { ErrorService } from '../../../shared/error/error.service'; import { blobToBase64 } from '../../../utils/encoding/encoding'; @@ -27,7 +29,9 @@ export class CustomCameraService { private readonly httpClient: HttpClient, private readonly captureService: CaptureService, private readonly errorService: ErrorService, - private readonly translocoService: TranslocoService + private readonly translocoService: TranslocoService, + @Inject(FILESYSTEM_PLUGIN) + private readonly filesystemPlugin: FilesystemPlugin ) {} private mediaItemFromFilePath( @@ -89,6 +93,11 @@ export class CustomCameraService { return PreviewCamera.stopRecord().catch(() => ({})); } + async removeFile(filePath: string | undefined) { + if (!filePath) return; + await this.filesystemPlugin.deleteFile({ path: filePath }); + } + private changeGlobalCSSBackgroundToTransparent() { document.querySelector('body')?.classList.add(this.globalCSSClass); document.querySelector('ion-app')?.classList.add(this.globalCSSClass); From a4bc66f08c560957ad3e305f961566843479b775 Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Thu, 14 Jul 2022 10:31:14 +0600 Subject: [PATCH 05/18] build: bump to 0.61.0 --- CHANGELOG.md | 10 ++++++++++ android/app/build.gradle | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b4be9a76..bce19b886 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix withdraw page the text color +## 0.61.0 - 2022-07-14 + +### Added + +- Show discard/confirm capture before upload + +### Fixed + +- Remove capture after discard/confirm + ## 0.60.1 - 2022-07-06 ### Fixed diff --git a/android/app/build.gradle b/android/app/build.gradle index 07c85a749..f0e663a23 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "io.numbersprotocol.capturelite" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 422 - versionName "0.60.2" + versionCode 430 + versionName "0.61.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildFeatures { diff --git a/package-lock.json b/package-lock.json index 5b2129103..87527e8f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "capture-lite", - "version": "0.60.2", + "version": "0.61.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "capture-lite", - "version": "0.60.2", + "version": "0.61.0", "dependencies": { "@angular/animations": "^12.2.4", "@angular/cdk": "^12.2.4", diff --git a/package.json b/package.json index 434af9dda..825908e70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "capture-lite", - "version": "0.60.2", + "version": "0.61.0", "author": "numbersprotocol", "homepage": "https://numbersprotocol.io/", "scripts": { From fe02ccf445726af37ea9bc44d3a3284a94574752 Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Thu, 14 Jul 2022 14:07:56 +0600 Subject: [PATCH 06/18] send generate SEO img & description on share asset --- src/app/features/home/details/details.page.ts | 9 ++++++++- src/app/shared/actions/service/actions.service.ts | 11 +++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/app/features/home/details/details.page.ts b/src/app/features/home/details/details.page.ts index 7403f8762..e22a25305 100644 --- a/src/app/features/home/details/details.page.ts +++ b/src/app/features/home/details/details.page.ts @@ -22,6 +22,7 @@ import { tap, } from 'rxjs/operators'; import SwiperCore, { Swiper, Virtual } from 'swiper/core'; +import { ActionsService } from '../../../shared/actions/service/actions.service'; import { BlockingActionService } from '../../../shared/blocking-action/blocking-action.service'; import { ConfirmAlert } from '../../../shared/confirm-alert/confirm-alert.service'; import { ContactSelectionDialogComponent } from '../../../shared/contact-selection-dialog/contact-selection-dialog.component'; @@ -207,7 +208,8 @@ export class DetailsPage { private readonly diaBackendWorkflowService: DiaBackendWorkflowService, private readonly alertController: AlertController, private readonly changeDetectorRef: ChangeDetectorRef, - private readonly userGuideService: UserGuideService + private readonly userGuideService: UserGuideService, + private readonly actionsService: ActionsService ) { this.initializeActiveDetailedCapture$ .pipe(untilDestroyed(this)) @@ -467,6 +469,11 @@ export class DetailsPage { activeDetailedCapture => activeDetailedCapture.diaBackendAsset$ ), isNonNullable(), + tap(diaBackendAsset => + this.actionsService + .generateSeoImageAndDescription$(diaBackendAsset) + .toPromise() + ), concatMap(diaBackendAsset => this.shareService.share(diaBackendAsset)), catchError((err: unknown) => this.errorService.toastError$(err)), untilDestroyed(this) diff --git a/src/app/shared/actions/service/actions.service.ts b/src/app/shared/actions/service/actions.service.ts index 0ac2eeedc..8076937f3 100644 --- a/src/app/shared/actions/service/actions.service.ts +++ b/src/app/shared/actions/service/actions.service.ts @@ -2,6 +2,7 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { defer, forkJoin, of } from 'rxjs'; import { map } from 'rxjs/operators'; +import { DiaBackendAsset } from '../../dia-backend/asset/dia-backend-asset-repository.service'; import { BUBBLE_DB_URL } from '../../dia-backend/secret'; @Injectable({ @@ -34,6 +35,16 @@ export class ActionsService { send$(url: string, body: any) { return this.httpClient.post(url, body); } + + generateSeoImageAndDescription$(diaBackendAsset: DiaBackendAsset) { + return this.httpClient.post( + `https://authmedia.net/api/1.1/obj/nftprofile`, + { + asset_url: diaBackendAsset.asset_file, + Description: diaBackendAsset.cid, + } + ); + } } export interface Action { From 96147c6e96161d27b74d9883f9578d6cf9dbd298 Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Thu, 14 Jul 2022 15:24:39 +0600 Subject: [PATCH 07/18] add missing changelog for 0.61.0 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bce19b886..8f9f3b900 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Show discard/confirm capture before upload +- Send generate SEO img & description on share asset ### Fixed From f920acafe2c2853ed74d4cca80e26c89061b720d Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Mon, 18 Jul 2022 11:38:17 +0600 Subject: [PATCH 08/18] add flash feature for iOS, Android --- .../home/custom-camera/custom-camera.page.html | 5 +++++ .../home/custom-camera/custom-camera.page.scss | 6 ++++++ .../home/custom-camera/custom-camera.page.ts | 17 +++++++++++++++++ .../home/custom-camera/custom-camera.service.ts | 10 ++++++++++ 4 files changed, 38 insertions(+) diff --git a/src/app/features/home/custom-camera/custom-camera.page.html b/src/app/features/home/custom-camera/custom-camera.page.html index 0e7d2a6ed..aa169603f 100644 --- a/src/app/features/home/custom-camera/custom-camera.page.html +++ b/src/app/features/home/custom-camera/custom-camera.page.html @@ -5,6 +5,11 @@ >
+ + + {{ isFlashOn ? 'flash_on' : 'flash_off' }} + +
(this.captureVideoFinishedListener = listener)); this.startPreviewCamera(); + + this.isTorchOn().then(value => { + console.log(`isFlashOn: ${value.result}`); + + return (this.isFlashOn = value.result); + }); } async ionViewDidEnter() { @@ -167,6 +175,15 @@ export class CustomCameraPage implements OnInit, OnDestroy { this.leaveCustomCamera(); } + async isTorchOn() { + return this.customCameraService.isTorchOn(); + } + + async enableTorch() { + await this.customCameraService.enableTorch(!this.isFlashOn); + this.isFlashOn = (await this.customCameraService.isTorchOn()).result; + } + async leaveCustomCamera() { return this.location.back(); } diff --git a/src/app/features/home/custom-camera/custom-camera.service.ts b/src/app/features/home/custom-camera/custom-camera.service.ts index 2bce4eebe..a1ea82c23 100644 --- a/src/app/features/home/custom-camera/custom-camera.service.ts +++ b/src/app/features/home/custom-camera/custom-camera.service.ts @@ -98,6 +98,16 @@ export class CustomCameraService { await this.filesystemPlugin.deleteFile({ path: filePath }); } + // eslint-disable-next-line class-methods-use-this + async isTorchOn() { + return await PreviewCamera.isTorchOn(); + } + + // eslint-disable-next-line class-methods-use-this + async enableTorch(enable: boolean) { + return await PreviewCamera.enableTorch({ enable }); + } + private changeGlobalCSSBackgroundToTransparent() { document.querySelector('body')?.classList.add(this.globalCSSClass); document.querySelector('ion-app')?.classList.add(this.globalCSSClass); From f2e55bfa8adfd1243211addbcfdd42c9766af4ce Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Tue, 19 Jul 2022 10:10:57 +0600 Subject: [PATCH 09/18] install latest custom camera plugin --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 87527e8f4..5f43e9c10 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,7 @@ "@ngx-formly/core": "^5.10.22", "@ngx-formly/material": "^5.10.22", "@ngx-formly/schematics": "^5.10.22", - "@numbersprotocol/preview-camera": "github:numbersprotocol/preview-camera#release-0.0.2-auto-rotate-fix", + "@numbersprotocol/preview-camera": "github:numbersprotocol/preview-camera", "@numbersprotocol/preview-video": "github:numbersprotocol/preview-video", "@techiediaries/ngx-qrcode": "^9.1.0", "async-mutex": "^0.3.2", @@ -4157,8 +4157,8 @@ } }, "node_modules/@numbersprotocol/preview-camera": { - "version": "0.0.2", - "resolved": "git+ssh://git@github.com/numbersprotocol/preview-camera.git#2ce3dc63f83780c4c8e7afe8291238b9c838eb5c", + "version": "0.0.3", + "resolved": "git+ssh://git@github.com/numbersprotocol/preview-camera.git#cc4a7d544220040e4fad9730dbdd2251458390c3", "license": "MIT", "peerDependencies": { "@capacitor/core": "^3.0.0" @@ -28525,8 +28525,8 @@ } }, "@numbersprotocol/preview-camera": { - "version": "git+ssh://git@github.com/numbersprotocol/preview-camera.git#2ce3dc63f83780c4c8e7afe8291238b9c838eb5c", - "from": "@numbersprotocol/preview-camera@github:numbersprotocol/preview-camera#release-0.0.2-auto-rotate-fix", + "version": "git+ssh://git@github.com/numbersprotocol/preview-camera.git#cc4a7d544220040e4fad9730dbdd2251458390c3", + "from": "@numbersprotocol/preview-camera@github:numbersprotocol/preview-camera", "requires": {} }, "@numbersprotocol/preview-video": { diff --git a/package.json b/package.json index 825908e70..ef0a656e3 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@ngx-formly/core": "^5.10.22", "@ngx-formly/material": "^5.10.22", "@ngx-formly/schematics": "^5.10.22", - "@numbersprotocol/preview-camera": "github:numbersprotocol/preview-camera#release-0.0.2-auto-rotate-fix", + "@numbersprotocol/preview-camera": "github:numbersprotocol/preview-camera", "@numbersprotocol/preview-video": "github:numbersprotocol/preview-video", "@techiediaries/ngx-qrcode": "^9.1.0", "async-mutex": "^0.3.2", From dd3f88a0f4bc22c1ca9019e813b1d58e02bcfb0a Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Tue, 19 Jul 2022 10:19:04 +0600 Subject: [PATCH 10/18] fix(custom-camera.service): call plugin methods on native platforms only --- .../custom-camera/custom-camera.service.ts | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/app/features/home/custom-camera/custom-camera.service.ts b/src/app/features/home/custom-camera/custom-camera.service.ts index a1ea82c23..9fb84450f 100644 --- a/src/app/features/home/custom-camera/custom-camera.service.ts +++ b/src/app/features/home/custom-camera/custom-camera.service.ts @@ -3,6 +3,7 @@ import { Inject, Injectable } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; import { Capacitor } from '@capacitor/core'; import { FilesystemPlugin } from '@capacitor/filesystem'; +import { Platform } from '@ionic/angular'; import { TranslocoService } from '@ngneat/transloco'; import { PreviewCamera } from '@numbersprotocol/preview-camera'; import { BehaviorSubject } from 'rxjs'; @@ -31,7 +32,8 @@ export class CustomCameraService { private readonly errorService: ErrorService, private readonly translocoService: TranslocoService, @Inject(FILESYSTEM_PLUGIN) - private readonly filesystemPlugin: FilesystemPlugin + private readonly filesystemPlugin: FilesystemPlugin, + private readonly platform: Platform ) {} private mediaItemFromFilePath( @@ -98,14 +100,21 @@ export class CustomCameraService { await this.filesystemPlugin.deleteFile({ path: filePath }); } - // eslint-disable-next-line class-methods-use-this async isTorchOn() { - return await PreviewCamera.isTorchOn(); + if (this.isNativePlatform) { + return await PreviewCamera.isTorchOn(); + } + return { result: false }; } - // eslint-disable-next-line class-methods-use-this - async enableTorch(enable: boolean) { - return await PreviewCamera.enableTorch({ enable }); + async enableTorch(enable: boolean): Promise { + if (this.isNativePlatform) { + return await PreviewCamera.enableTorch({ enable }); + } + } + + private get isNativePlatform() { + return this.platform.is('ios') || this.platform.is('android'); } private changeGlobalCSSBackgroundToTransparent() { From 746d8c8f004cb083d784bf9d6caed417207878dc Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Tue, 19 Jul 2022 10:19:21 +0600 Subject: [PATCH 11/18] fix(custom-camera.service.spec) --- .../custom-camera.service.spec.ts | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/app/features/home/custom-camera/custom-camera.service.spec.ts b/src/app/features/home/custom-camera/custom-camera.service.spec.ts index 288da8ca1..383e6e88c 100644 --- a/src/app/features/home/custom-camera/custom-camera.service.spec.ts +++ b/src/app/features/home/custom-camera/custom-camera.service.spec.ts @@ -1,14 +1,30 @@ -import { TestBed } from '@angular/core/testing'; +import { TestBed, waitForAsync } from '@angular/core/testing'; +import { Platform } from '@ionic/angular'; import { SharedTestingModule } from '../../../shared/shared-testing.module'; import { CustomCameraService } from './custom-camera.service'; describe('CustomCameraService', () => { let service: CustomCameraService; + let platformReadySpy: Promise; + let platformIsSpy: boolean | undefined; + let platformSpy: Platform; - beforeEach(() => { - TestBed.configureTestingModule({ imports: [SharedTestingModule] }); - service = TestBed.inject(CustomCameraService); - }); + beforeEach( + waitForAsync(() => { + platformReadySpy = Promise.resolve(); + platformIsSpy = false; + platformSpy = jasmine.createSpyObj('Platform', { + ready: platformReadySpy, + is: platformIsSpy, + }); + + TestBed.configureTestingModule({ + imports: [SharedTestingModule], + providers: [{ provide: Platform, useValue: platformSpy }], + }).compileComponents(); + service = TestBed.inject(CustomCameraService); + }) + ); it('should be created', () => { expect(service).toBeTruthy(); From 58f6baf5e964abf202e8f7e93c9af818f82eb739 Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Mon, 18 Jul 2022 16:22:58 +0600 Subject: [PATCH 12/18] fix(custom-camera): make sure confirm button works properly --- src/app/features/home/custom-camera/custom-camera.page.ts | 5 ++--- src/app/features/home/custom-camera/custom-camera.service.ts | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/features/home/custom-camera/custom-camera.page.ts b/src/app/features/home/custom-camera/custom-camera.page.ts index a5637af78..d7cb6a597 100644 --- a/src/app/features/home/custom-camera/custom-camera.page.ts +++ b/src/app/features/home/custom-camera/custom-camera.page.ts @@ -166,13 +166,12 @@ export class CustomCameraPage implements OnInit, OnDestroy { async confirmCurrentCapture() { if (this.curCaptureFilePath && this.curCaptureType) { - await this.customCameraService.uploadToCapture( + this.customCameraService.uploadToCapture( this.curCaptureFilePath, this.curCaptureType ); - this.removeCurrentCapture(); + this.leaveCustomCamera(); } - this.leaveCustomCamera(); } async isTorchOn() { diff --git a/src/app/features/home/custom-camera/custom-camera.service.ts b/src/app/features/home/custom-camera/custom-camera.service.ts index 9fb84450f..d9adab50d 100644 --- a/src/app/features/home/custom-camera/custom-camera.service.ts +++ b/src/app/features/home/custom-camera/custom-camera.service.ts @@ -58,6 +58,7 @@ export class CustomCameraService { const base64 = await blobToBase64(itemBlob); const mimeType = itemToUpload.mimeType; await this.captureService.capture({ base64, mimeType }); + await this.removeFile(filePath); } catch (error) { const errMsg = this.translocoService.translate(`error.internetError`); await this.errorService.toastError$(errMsg).toPromise(); From d9afc0e7d24bb233565b779a3051104e6fc4bd3c Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Tue, 19 Jul 2022 11:59:17 +0600 Subject: [PATCH 13/18] fix(custom-camera.service): else case for enable torch --- src/app/features/home/custom-camera/custom-camera.service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/features/home/custom-camera/custom-camera.service.ts b/src/app/features/home/custom-camera/custom-camera.service.ts index 9fb84450f..0eac621fb 100644 --- a/src/app/features/home/custom-camera/custom-camera.service.ts +++ b/src/app/features/home/custom-camera/custom-camera.service.ts @@ -111,6 +111,7 @@ export class CustomCameraService { if (this.isNativePlatform) { return await PreviewCamera.enableTorch({ enable }); } + return Promise.resolve(); } private get isNativePlatform() { From d5f497824aef3b887c2a6db4e6f802e8fd077f7c Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Tue, 19 Jul 2022 12:50:28 +0600 Subject: [PATCH 14/18] build: bump to 0.61.1 --- CHANGELOG.md | 11 +++++++++++ android/app/build.gradle | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f9f3b900..a8b38a66b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.61.1 - 2022-07-19 + +### Added + +- Camera flash light + +### Fixed + +- Capture flow, confirm button work smoothly +- Use high resolution as default camera settings + ## 0.60.2 - 2022-07-07 ### Changed diff --git a/android/app/build.gradle b/android/app/build.gradle index f0e663a23..dedafb6f7 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "io.numbersprotocol.capturelite" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 430 - versionName "0.61.0" + versionCode 431 + versionName "0.61.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildFeatures { diff --git a/package-lock.json b/package-lock.json index 5f43e9c10..41c99a1a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "capture-lite", - "version": "0.61.0", + "version": "0.61.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "capture-lite", - "version": "0.61.0", + "version": "0.61.1", "dependencies": { "@angular/animations": "^12.2.4", "@angular/cdk": "^12.2.4", diff --git a/package.json b/package.json index ef0a656e3..e74d7901b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "capture-lite", - "version": "0.61.0", + "version": "0.61.1", "author": "numbersprotocol", "homepage": "https://numbersprotocol.io/", "scripts": { From 8c96dffe1ce536f336737d8865ef7501d34a048c Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Wed, 20 Jul 2022 13:38:16 +0600 Subject: [PATCH 15/18] fix(custom-camera.page): hide flash for front camera --- .../custom-camera/custom-camera.page.html | 6 ++++- .../home/custom-camera/custom-camera.page.ts | 22 +++++++++++-------- .../custom-camera/custom-camera.service.ts | 7 ++++++ 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/app/features/home/custom-camera/custom-camera.page.html b/src/app/features/home/custom-camera/custom-camera.page.html index aa169603f..21ff52413 100644 --- a/src/app/features/home/custom-camera/custom-camera.page.html +++ b/src/app/features/home/custom-camera/custom-camera.page.html @@ -6,7 +6,11 @@
- + {{ isFlashOn ? 'flash_on' : 'flash_off' }} diff --git a/src/app/features/home/custom-camera/custom-camera.page.ts b/src/app/features/home/custom-camera/custom-camera.page.ts index d7cb6a597..41698a600 100644 --- a/src/app/features/home/custom-camera/custom-camera.page.ts +++ b/src/app/features/home/custom-camera/custom-camera.page.ts @@ -42,6 +42,7 @@ export class CustomCameraPage implements OnInit, OnDestroy { curCaptureSrc?: string; isFlashOn = false; + isFlashAvailable = false; readonly lastConnectedGoProDevice$ = this.goProBluetoothService.lastConnectedDevice$; @@ -70,11 +71,7 @@ export class CustomCameraPage implements OnInit, OnDestroy { this.startPreviewCamera(); - this.isTorchOn().then(value => { - console.log(`isFlashOn: ${value.result}`); - - return (this.isFlashOn = value.result); - }); + this.syncCameraState(); } async ionViewDidEnter() { @@ -116,8 +113,9 @@ export class CustomCameraPage implements OnInit, OnDestroy { } } - startPreviewCamera() { - this.customCameraService.startPreviewCamera(); + async startPreviewCamera() { + await this.customCameraService.startPreviewCamera(); + await this.syncCameraState(); } // eslint-disable-next-line class-methods-use-this @@ -125,8 +123,14 @@ export class CustomCameraPage implements OnInit, OnDestroy { this.customCameraService.stopPreviewCamera(); } - flipCamera() { - this.customCameraService.flipCamera(); + async flipCamera() { + await this.customCameraService.flipCamera(); + await this.syncCameraState(); + } + + async syncCameraState() { + this.isFlashOn = (await this.isTorchOn()).result; + this.isFlashAvailable = await this.customCameraService.isTorchAvailable(); } onPress() { diff --git a/src/app/features/home/custom-camera/custom-camera.service.ts b/src/app/features/home/custom-camera/custom-camera.service.ts index ceab9dbc5..2e7143fbc 100644 --- a/src/app/features/home/custom-camera/custom-camera.service.ts +++ b/src/app/features/home/custom-camera/custom-camera.service.ts @@ -115,6 +115,13 @@ export class CustomCameraService { return Promise.resolve(); } + async isTorchAvailable(): Promise { + if (this.isNativePlatform) { + return (await PreviewCamera.isTorchAvailable()).result; + } + return false; + } + private get isNativePlatform() { return this.platform.is('ios') || this.platform.is('android'); } From b778282b2fff0404a66b300afce5b4e6af0a51da Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Wed, 20 Jul 2022 13:38:30 +0600 Subject: [PATCH 16/18] install custom camera plugin 0.0.5 --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 41c99a1a0..e7003a70c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4157,8 +4157,8 @@ } }, "node_modules/@numbersprotocol/preview-camera": { - "version": "0.0.3", - "resolved": "git+ssh://git@github.com/numbersprotocol/preview-camera.git#cc4a7d544220040e4fad9730dbdd2251458390c3", + "version": "0.0.5", + "resolved": "git+ssh://git@github.com/numbersprotocol/preview-camera.git#460cdc935ff16e14feca062c0d3cd6b35cf9996b", "license": "MIT", "peerDependencies": { "@capacitor/core": "^3.0.0" @@ -28525,7 +28525,7 @@ } }, "@numbersprotocol/preview-camera": { - "version": "git+ssh://git@github.com/numbersprotocol/preview-camera.git#cc4a7d544220040e4fad9730dbdd2251458390c3", + "version": "git+ssh://git@github.com/numbersprotocol/preview-camera.git#460cdc935ff16e14feca062c0d3cd6b35cf9996b", "from": "@numbersprotocol/preview-camera@github:numbersprotocol/preview-camera", "requires": {} }, From fbb9be2141ffef969a7ed90f458508bab57b2a1f Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Wed, 20 Jul 2022 14:15:19 +0600 Subject: [PATCH 17/18] build: bump to 0.61.2 --- CHANGELOG.md | 7 +++++++ android/app/build.gradle | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8b38a66b..6dcd04e99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.61.2 - 2022-07-20 + +### Fixed + +- Hide camera flash button for front camera +- Android flash light on only on capture photo or record video + ## 0.61.1 - 2022-07-19 ### Added diff --git a/android/app/build.gradle b/android/app/build.gradle index dedafb6f7..4e09291be 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "io.numbersprotocol.capturelite" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 431 - versionName "0.61.1" + versionCode 432 + versionName "0.61.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildFeatures { diff --git a/package-lock.json b/package-lock.json index e7003a70c..7f82fd2c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "capture-lite", - "version": "0.61.1", + "version": "0.61.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "capture-lite", - "version": "0.61.1", + "version": "0.61.2", "dependencies": { "@angular/animations": "^12.2.4", "@angular/cdk": "^12.2.4", diff --git a/package.json b/package.json index e74d7901b..37fe08243 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "capture-lite", - "version": "0.61.1", + "version": "0.61.2", "author": "numbersprotocol", "homepage": "https://numbersprotocol.io/", "scripts": { From 77f2226012707063974d8fd21c3002e874b189da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jul 2022 08:53:48 +0000 Subject: [PATCH 18/18] build(deps): bump log4js from 6.3.0 to 6.6.0 Bumps [log4js](https://github.com/log4js-node/log4js-node) from 6.3.0 to 6.6.0. - [Release notes](https://github.com/log4js-node/log4js-node/releases) - [Changelog](https://github.com/log4js-node/log4js-node/blob/master/CHANGELOG.md) - [Commits](https://github.com/log4js-node/log4js-node/compare/v6.3.0...v6.6.0) --- updated-dependencies: - dependency-name: log4js dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 176 ++++++++++++++++++++++++---------------------- 1 file changed, 92 insertions(+), 84 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7f82fd2c9..f04aee225 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8111,18 +8111,18 @@ } }, "node_modules/date-format": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-3.0.0.tgz", - "integrity": "sha512-eyTcpKOcamdhWJXj56DpQMo1ylSQpcGtGKXcU0Tb97+K56/CF5amAqqqNj0+KvA0iw2ynxtHWFsPDSClCxe48w==", + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.11.tgz", + "integrity": "sha512-VS20KRyorrbMCQmpdl2hg5KaOUsda1RbnsJg461FfrcyCUg+pkd0b40BSW4niQyTheww4DBXQnS7HwSrKkipLw==", "dev": true, "engines": { "node": ">=4.0" } }, "node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -10346,9 +10346,9 @@ } }, "node_modules/flatted": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", - "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", + "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", "dev": true }, "node_modules/flatten": { @@ -13727,27 +13727,21 @@ } }, "node_modules/log4js": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.3.0.tgz", - "integrity": "sha512-Mc8jNuSFImQUIateBFwdOQcmC6Q5maU0VVvdC2R6XMb66/VnT+7WS4D/0EeNMZu1YODmJe5NIn2XftCzEocUgw==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.6.0.tgz", + "integrity": "sha512-3v8R7fd45UB6THucSht6wN2/7AZEruQbXdjygPZcxt5TA/msO6si9CN5MefUuKXbYnJHTBnYcx4famwcyQd+sA==", "dev": true, "dependencies": { - "date-format": "^3.0.0", - "debug": "^4.1.1", - "flatted": "^2.0.1", - "rfdc": "^1.1.4", - "streamroller": "^2.2.4" + "date-format": "^4.0.11", + "debug": "^4.3.4", + "flatted": "^3.2.5", + "rfdc": "^1.3.0", + "streamroller": "^3.1.1" }, "engines": { "node": ">=8.0" } }, - "node_modules/log4js/node_modules/flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", - "dev": true - }, "node_modules/loglevel": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.7.1.tgz", @@ -21610,40 +21604,52 @@ } }, "node_modules/streamroller": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-2.2.4.tgz", - "integrity": "sha512-OG79qm3AujAM9ImoqgWEY1xG4HX+Lw+yY6qZj9R1K2mhF5bEmQ849wvrb+4vt4jLMLzwXttJlQbOdPOQVRv7DQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.1.tgz", + "integrity": "sha512-iPhtd9unZ6zKdWgMeYGfSBuqCngyJy1B/GPi/lTpwGpa3bajuX30GjUVd0/Tn/Xhg0mr4DOSENozz9Y06qyonQ==", "dev": true, "dependencies": { - "date-format": "^2.1.0", - "debug": "^4.1.1", - "fs-extra": "^8.1.0" + "date-format": "^4.0.10", + "debug": "^4.3.4", + "fs-extra": "^10.1.0" }, "engines": { "node": ">=8.0" } }, - "node_modules/streamroller/node_modules/date-format": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.1.0.tgz", - "integrity": "sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==", + "node_modules/streamroller/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, "engines": { - "node": ">=4.0" + "node": ">=12" } }, - "node_modules/streamroller/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "node_modules/streamroller/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "universalify": "^2.0.0" }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/streamroller/node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, "engines": { - "node": ">=6 <7 || >=8" + "node": ">= 10.0.0" } }, "node_modules/strict-uri-encode": { @@ -31611,15 +31617,15 @@ } }, "date-format": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-3.0.0.tgz", - "integrity": "sha512-eyTcpKOcamdhWJXj56DpQMo1ylSQpcGtGKXcU0Tb97+K56/CF5amAqqqNj0+KvA0iw2ynxtHWFsPDSClCxe48w==", + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.11.tgz", + "integrity": "sha512-VS20KRyorrbMCQmpdl2hg5KaOUsda1RbnsJg461FfrcyCUg+pkd0b40BSW4niQyTheww4DBXQnS7HwSrKkipLw==", "dev": true }, "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -33455,9 +33461,9 @@ } }, "flatted": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", - "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", + "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", "dev": true }, "flatten": { @@ -36020,24 +36026,16 @@ } }, "log4js": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.3.0.tgz", - "integrity": "sha512-Mc8jNuSFImQUIateBFwdOQcmC6Q5maU0VVvdC2R6XMb66/VnT+7WS4D/0EeNMZu1YODmJe5NIn2XftCzEocUgw==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.6.0.tgz", + "integrity": "sha512-3v8R7fd45UB6THucSht6wN2/7AZEruQbXdjygPZcxt5TA/msO6si9CN5MefUuKXbYnJHTBnYcx4famwcyQd+sA==", "dev": true, "requires": { - "date-format": "^3.0.0", - "debug": "^4.1.1", - "flatted": "^2.0.1", - "rfdc": "^1.1.4", - "streamroller": "^2.2.4" - }, - "dependencies": { - "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", - "dev": true - } + "date-format": "^4.0.11", + "debug": "^4.3.4", + "flatted": "^3.2.5", + "rfdc": "^1.3.0", + "streamroller": "^3.1.1" } }, "loglevel": { @@ -42024,32 +42022,42 @@ } }, "streamroller": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-2.2.4.tgz", - "integrity": "sha512-OG79qm3AujAM9ImoqgWEY1xG4HX+Lw+yY6qZj9R1K2mhF5bEmQ849wvrb+4vt4jLMLzwXttJlQbOdPOQVRv7DQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.1.tgz", + "integrity": "sha512-iPhtd9unZ6zKdWgMeYGfSBuqCngyJy1B/GPi/lTpwGpa3bajuX30GjUVd0/Tn/Xhg0mr4DOSENozz9Y06qyonQ==", "dev": true, "requires": { - "date-format": "^2.1.0", - "debug": "^4.1.1", - "fs-extra": "^8.1.0" + "date-format": "^4.0.10", + "debug": "^4.3.4", + "fs-extra": "^10.1.0" }, "dependencies": { - "date-format": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.1.0.tgz", - "integrity": "sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==", - "dev": true - }, "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, "requires": { "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true } } },