fix: ng update core
This commit is contained in:
@@ -8,7 +8,7 @@ FROM httpd:alpine AS runtime
|
|||||||
RUN apk add --no-cache certbot certbot-apache
|
RUN apk add --no-cache certbot certbot-apache
|
||||||
COPY httpd.conf /usr/local/apache2/conf/httpd.conf
|
COPY httpd.conf /usr/local/apache2/conf/httpd.conf
|
||||||
COPY cli.ini /etc/letsencrypt/cli.ini
|
COPY cli.ini /etc/letsencrypt/cli.ini
|
||||||
COPY --from=build /build/dist /usr/local/apache2/htdocs/
|
COPY --from=build /build/dist/ipwa/browser /usr/local/apache2/htdocs/ipwa
|
||||||
COPY <<EOF /usr/local/apache2/htdocs/ipwa/.htaccess
|
COPY <<EOF /usr/local/apache2/htdocs/ipwa/.htaccess
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
|
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
|
||||||
|
|||||||
17
angular.json
17
angular.json
@@ -16,11 +16,12 @@
|
|||||||
"prefix": "app",
|
"prefix": "app",
|
||||||
"architect": {
|
"architect": {
|
||||||
"build": {
|
"build": {
|
||||||
"builder": "@angular-devkit/build-angular:browser",
|
"builder": "@angular-devkit/build-angular:application",
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist/ipwa",
|
"outputPath": {
|
||||||
|
"base": "dist/ipwa"
|
||||||
|
},
|
||||||
"index": "src/index.html",
|
"index": "src/index.html",
|
||||||
"main": "src/main.ts",
|
|
||||||
"polyfills": [
|
"polyfills": [
|
||||||
"zone.js"
|
"zone.js"
|
||||||
],
|
],
|
||||||
@@ -35,11 +36,11 @@
|
|||||||
"src/styles.scss"
|
"src/styles.scss"
|
||||||
],
|
],
|
||||||
"scripts": [],
|
"scripts": [],
|
||||||
"serviceWorker": true,
|
"serviceWorker": "ngsw-config.json",
|
||||||
"ngswConfigPath": "ngsw-config.json",
|
|
||||||
"allowedCommonJsDependencies": [
|
"allowedCommonJsDependencies": [
|
||||||
"moment"
|
"moment"
|
||||||
]
|
],
|
||||||
|
"browser": "src/main.ts"
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
@@ -58,9 +59,7 @@
|
|||||||
"outputHashing": "all"
|
"outputHashing": "all"
|
||||||
},
|
},
|
||||||
"development": {
|
"development": {
|
||||||
"buildOptimizer": false,
|
|
||||||
"optimization": false,
|
"optimization": false,
|
||||||
"vendorChunk": true,
|
|
||||||
"extractLicenses": false,
|
"extractLicenses": false,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"namedChunks": true,
|
"namedChunks": true,
|
||||||
@@ -72,9 +71,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"swDevelopment": {
|
"swDevelopment": {
|
||||||
"buildOptimizer": false,
|
|
||||||
"optimization": false,
|
"optimization": false,
|
||||||
"vendorChunk": true,
|
|
||||||
"extractLicenses": false,
|
"extractLicenses": false,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"namedChunks": true,
|
"namedChunks": true,
|
||||||
|
|||||||
6091
package-lock.json
generated
6091
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
26
package.json
26
package.json
@@ -12,28 +12,28 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^17.3.2",
|
"@angular/animations": "^18.2.13",
|
||||||
"@angular/cdk": "^17.3.2",
|
"@angular/cdk": "^17.3.2",
|
||||||
"@angular/cli": "^17.3.2",
|
"@angular/cli": "^18.2.19",
|
||||||
"@angular/common": "^17.3.2",
|
"@angular/common": "^18.2.13",
|
||||||
"@angular/compiler": "^17.3.2",
|
"@angular/compiler": "^18.2.13",
|
||||||
"@angular/core": "^17.3.2",
|
"@angular/core": "^18.2.13",
|
||||||
"@angular/forms": "^17.3.2",
|
"@angular/forms": "^18.2.13",
|
||||||
"@angular/material": "^17.3.2",
|
"@angular/material": "^17.3.2",
|
||||||
"@angular/material-moment-adapter": "^17.3.2",
|
"@angular/material-moment-adapter": "^17.3.2",
|
||||||
"@angular/platform-browser": "^17.3.2",
|
"@angular/platform-browser": "^18.2.13",
|
||||||
"@angular/platform-browser-dynamic": "^17.3.2",
|
"@angular/platform-browser-dynamic": "^18.2.13",
|
||||||
"@angular/router": "^17.3.2",
|
"@angular/router": "^18.2.13",
|
||||||
"@angular/service-worker": "^17.3.2",
|
"@angular/service-worker": "^18.2.13",
|
||||||
"marked": "^12.0.1",
|
"marked": "^12.0.1",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"rxjs": "~7.5.0",
|
"rxjs": "~7.5.0",
|
||||||
"tslib": "^2.3.0",
|
"tslib": "^2.3.0",
|
||||||
"zone.js": "~0.14.4"
|
"zone.js": "~0.14.10"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "^17.3.2",
|
"@angular-devkit/build-angular": "^18.2.19",
|
||||||
"@angular/compiler-cli": "^17.3.2",
|
"@angular/compiler-cli": "^18.2.13",
|
||||||
"@types/jasmine": "~4.3.0",
|
"@types/jasmine": "~4.3.0",
|
||||||
"jasmine-core": "~4.5.0",
|
"jasmine-core": "~4.5.0",
|
||||||
"karma": "~6.4.0",
|
"karma": "~6.4.0",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { MatSnackBar } from '@angular/material/snack-bar';
|
|||||||
import { UserResetComponent } from '../user-reset/user-reset.component';
|
import { UserResetComponent } from '../user-reset/user-reset.component';
|
||||||
import { catchError, throwError } from 'rxjs';
|
import { catchError, throwError } from 'rxjs';
|
||||||
import { Moment } from 'moment';
|
import { Moment } from 'moment';
|
||||||
import * as moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
export namespace UserEditComponent {
|
export namespace UserEditComponent {
|
||||||
export type InputData = {type: "new" | "edit", id?: string, groups: Group[]}
|
export type InputData = {type: "new" | "edit", id?: string, groups: Group[]}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { AdminCommService } from './admin-comm.service';
|
import { AdminCommService } from './admin-comm.service';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
|
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
|
|
||||||
describe('AdminCommService', () => {
|
describe('AdminCommService', () => {
|
||||||
let service: AdminCommService;
|
let service: AdminCommService;
|
||||||
@@ -11,8 +11,9 @@ describe('AdminCommService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [ HttpClientTestingModule ]
|
imports: [],
|
||||||
});
|
providers: [provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||||
|
});
|
||||||
service = TestBed.inject(AdminCommService);
|
service = TestBed.inject(AdminCommService);
|
||||||
httpClient = TestBed.inject(HttpClient);
|
httpClient = TestBed.inject(HttpClient);
|
||||||
httpTestingController = TestBed.inject(HttpTestingController);
|
httpTestingController = TestBed.inject(HttpTestingController);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { map, of } from 'rxjs';
|
|||||||
import { Notification } from '../types/notification';
|
import { Notification } from '../types/notification';
|
||||||
import { News } from '../types/news';
|
import { News } from '../types/news';
|
||||||
import { AKey } from '../types/key';
|
import { AKey } from '../types/key';
|
||||||
import * as moment from 'moment';
|
import moment from 'moment';
|
||||||
import { IUSettings } from './settings/settings.component';
|
import { IUSettings } from './settings/settings.component';
|
||||||
import User from '../types/user';
|
import User from '../types/user';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
import * as moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-hour-display',
|
selector: 'app-hour-display',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||||
import { AdminCommService } from '../admin-comm.service';
|
import { AdminCommService } from '../admin-comm.service';
|
||||||
import * as moment from 'moment';
|
import moment from 'moment';
|
||||||
import { FormArray, FormBuilder } from '@angular/forms';
|
import { FormArray, FormBuilder } from '@angular/forms';
|
||||||
import { weekendFilter } from 'src/app/fd.da';
|
import { weekendFilter } from 'src/app/fd.da';
|
||||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
import { AdminCommService } from '../../admin-comm.service';
|
import { AdminCommService } from '../../admin-comm.service';
|
||||||
import { Router, ActivatedRoute } from '@angular/router';
|
import { Router, ActivatedRoute } from '@angular/router';
|
||||||
import { ToolbarService } from '../../toolbar/toolbar.service';
|
import { ToolbarService } from '../../toolbar/toolbar.service';
|
||||||
import * as moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-outbox',
|
selector: 'app-outbox',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Component, Inject } from '@angular/core';
|
import { Component, Inject } from '@angular/core';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||||
import * as moment from 'moment';
|
import moment from 'moment';
|
||||||
import { UpdatesService } from 'src/app/services/updates.service';
|
import { UpdatesService } from 'src/app/services/updates.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import * as moment from 'moment';
|
import moment from 'moment';
|
||||||
import { weekendFilter } from 'src/app/fd.da';
|
import { weekendFilter } from 'src/app/fd.da';
|
||||||
import { UpdatesService } from 'src/app/services/updates.service';
|
import { UpdatesService } from 'src/app/services/updates.service';
|
||||||
import { CleanNote } from 'src/app/types/clean-note';
|
import { CleanNote } from 'src/app/types/clean-note';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { NgModule, isDevMode } from '@angular/core';
|
import { NgModule, isDevMode } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { MAT_MOMENT_DATE_ADAPTER_OPTIONS, MAT_MOMENT_DATE_FORMATS, MomentDateAdapter } from '@angular/material-moment-adapter';
|
import { MAT_MOMENT_DATE_ADAPTER_OPTIONS, MAT_MOMENT_DATE_FORMATS, MomentDateAdapter } from '@angular/material-moment-adapter';
|
||||||
import { MatButtonModule } from "@angular/material/button";
|
import { MatButtonModule } from "@angular/material/button";
|
||||||
@@ -88,108 +88,102 @@ import { NotifDialogComponent } from './app-view/notif-dialog/notif-dialog.compo
|
|||||||
import { UserSearchComponent } from './commonComponents/user-search/user-search.component';
|
import { UserSearchComponent } from './commonComponents/user-search/user-search.component';
|
||||||
import { StartAdminComponent } from './admin-view/start/start.component';
|
import { StartAdminComponent } from './admin-view/start/start.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({ declarations: [
|
||||||
declarations: [
|
AppComponent,
|
||||||
AppComponent,
|
NewsComponent,
|
||||||
NewsComponent,
|
MenuComponent,
|
||||||
MenuComponent,
|
LoginComponent,
|
||||||
LoginComponent,
|
AppViewComponent,
|
||||||
AppViewComponent,
|
PersonalComponent,
|
||||||
PersonalComponent,
|
ChangePasswordDialogComponent,
|
||||||
ChangePasswordDialogComponent,
|
LogoutConfirmationComponent,
|
||||||
LogoutConfirmationComponent,
|
DateSelectorComponent,
|
||||||
DateSelectorComponent,
|
AdminViewComponent,
|
||||||
AdminViewComponent,
|
MenuUploadComponent,
|
||||||
MenuUploadComponent,
|
NewsEditComponent,
|
||||||
NewsEditComponent,
|
NewPostComponent,
|
||||||
NewPostComponent,
|
AccountMgmtComponent,
|
||||||
AccountMgmtComponent,
|
UserEditComponent,
|
||||||
UserEditComponent,
|
UserDeleteComponent,
|
||||||
UserDeleteComponent,
|
MenuNewComponent,
|
||||||
MenuNewComponent,
|
CeDirective,
|
||||||
CeDirective,
|
LabelDirective,
|
||||||
LabelDirective,
|
AllergensComponent,
|
||||||
AllergensComponent,
|
UserResetComponent,
|
||||||
UserResetComponent,
|
NotificationsComponent,
|
||||||
NotificationsComponent,
|
GroupsComponent,
|
||||||
GroupsComponent,
|
ListEditorComponent,
|
||||||
ListEditorComponent,
|
RemoveConfirmComponent,
|
||||||
RemoveConfirmComponent,
|
StartComponent,
|
||||||
StartComponent,
|
KeyComponent,
|
||||||
KeyComponent,
|
AdminKeyComponent,
|
||||||
AdminKeyComponent,
|
NewKeyComponent,
|
||||||
NewKeyComponent,
|
GradesComponent,
|
||||||
GradesComponent,
|
RoomChooserComponent,
|
||||||
RoomChooserComponent,
|
CleanComponent,
|
||||||
CleanComponent,
|
SummaryComponent,
|
||||||
SummaryComponent,
|
SettingsComponent,
|
||||||
SettingsComponent,
|
MenuAddComponent,
|
||||||
MenuAddComponent,
|
FieldEditorComponent,
|
||||||
FieldEditorComponent,
|
AttendenceComponent,
|
||||||
AttendenceComponent,
|
AttendenceSummaryComponent,
|
||||||
AttendenceSummaryComponent,
|
HourDisplayComponent,
|
||||||
HourDisplayComponent,
|
AboutComponent,
|
||||||
AboutComponent,
|
ExtraComponent,
|
||||||
ExtraComponent,
|
RedirectComponent,
|
||||||
RedirectComponent,
|
OutboxComponent,
|
||||||
OutboxComponent,
|
ToolbarComponent,
|
||||||
ToolbarComponent,
|
MessageComponent,
|
||||||
MessageComponent,
|
NotifDialogComponent,
|
||||||
NotifDialogComponent,
|
UserSearchComponent,
|
||||||
UserSearchComponent,
|
StartAdminComponent,
|
||||||
StartAdminComponent,
|
],
|
||||||
],
|
bootstrap: [AppComponent], imports: [BrowserModule,
|
||||||
imports: [
|
AppRoutingModule,
|
||||||
BrowserModule,
|
BrowserAnimationsModule,
|
||||||
AppRoutingModule,
|
MatTabsModule,
|
||||||
BrowserAnimationsModule,
|
MatCardModule,
|
||||||
MatTabsModule,
|
MatButtonModule,
|
||||||
HttpClientModule,
|
MatIconModule,
|
||||||
MatCardModule,
|
MatDatepickerModule,
|
||||||
MatButtonModule,
|
MatNativeDateModule,
|
||||||
MatIconModule,
|
MatInputModule,
|
||||||
MatDatepickerModule,
|
ReactiveFormsModule,
|
||||||
MatNativeDateModule,
|
FormsModule,
|
||||||
MatInputModule,
|
MatDialogModule,
|
||||||
ReactiveFormsModule,
|
MatListModule,
|
||||||
FormsModule,
|
MatToolbarModule,
|
||||||
MatDialogModule,
|
MatSidenavModule,
|
||||||
MatListModule,
|
MatSnackBarModule,
|
||||||
MatToolbarModule,
|
MatTableModule,
|
||||||
MatSidenavModule,
|
MatPaginatorModule,
|
||||||
MatSnackBarModule,
|
MatSelectModule,
|
||||||
MatTableModule,
|
MatBottomSheetModule,
|
||||||
MatPaginatorModule,
|
MatSlideToggleModule,
|
||||||
MatSelectModule,
|
MatProgressSpinnerModule,
|
||||||
MatBottomSheetModule,
|
MatRadioModule,
|
||||||
MatSlideToggleModule,
|
MatChipsModule,
|
||||||
MatProgressSpinnerModule,
|
MatCheckboxModule,
|
||||||
MatRadioModule,
|
MatMenuModule,
|
||||||
MatChipsModule,
|
MatSortModule,
|
||||||
MatCheckboxModule,
|
MatButtonToggleModule,
|
||||||
MatMenuModule,
|
MatExpansionModule,
|
||||||
MatSortModule,
|
DragDropModule,
|
||||||
MatButtonToggleModule,
|
MatBadgeModule,
|
||||||
MatExpansionModule,
|
PortalModule,
|
||||||
DragDropModule,
|
A11yModule,
|
||||||
MatBadgeModule,
|
MatAutocompleteModule,
|
||||||
PortalModule,
|
ServiceWorkerModule.register('ngsw-worker.js', {
|
||||||
A11yModule,
|
enabled: environment.production,
|
||||||
MatAutocompleteModule,
|
// Register the ServiceWorker as soon as the application is stable
|
||||||
ServiceWorkerModule.register('ngsw-worker.js', {
|
// or after 30 seconds (whichever comes first).
|
||||||
enabled: environment.production,
|
registrationStrategy: 'registerWhenStable:30000'
|
||||||
// Register the ServiceWorker as soon as the application is stable
|
})], providers: [
|
||||||
// or after 30 seconds (whichever comes first).
|
{ provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE, MAT_DATE_FORMATS, MAT_MOMENT_DATE_ADAPTER_OPTIONS] },
|
||||||
registrationStrategy: 'registerWhenStable:30000'
|
{ provide: MAT_DATE_LOCALE, useValue: "pl-PL" },
|
||||||
}),
|
{ provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS },
|
||||||
],
|
{ provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: { useUtc: true } },
|
||||||
providers: [
|
FDSelection,
|
||||||
{ provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE, MAT_DATE_FORMATS, MAT_MOMENT_DATE_ADAPTER_OPTIONS] },
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
{ provide: MAT_DATE_LOCALE, useValue: "pl-PL" },
|
] })
|
||||||
{ provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS },
|
|
||||||
{ provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: { useUtc: true } },
|
|
||||||
FDSelection,
|
|
||||||
],
|
|
||||||
bootstrap: [AppComponent],
|
|
||||||
})
|
|
||||||
export class AppModule { }
|
export class AppModule { }
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
||||||
import { FormControl } from '@angular/forms';
|
import { FormControl } from '@angular/forms';
|
||||||
import * as moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-date-selector',
|
selector: 'app-date-selector',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from "@angular/core";
|
import { Injectable } from "@angular/core";
|
||||||
import { DateRange, MatDateRangeSelectionStrategy } from "@angular/material/datepicker";
|
import { DateRange, MatDateRangeSelectionStrategy } from "@angular/material/datepicker";
|
||||||
import * as moment from "moment";
|
import moment from "moment";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class FDSelection implements MatDateRangeSelectionStrategy<moment.Moment> {
|
export class FDSelection implements MatDateRangeSelectionStrategy<moment.Moment> {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { AuthClient } from './auth.client';
|
import { AuthClient } from './auth.client';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'
|
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing'
|
||||||
|
|
||||||
describe('AuthService', () => {
|
describe('AuthService', () => {
|
||||||
let service: AuthClient;
|
let service: AuthClient;
|
||||||
@@ -11,8 +11,9 @@ describe('AuthService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [ HttpClientTestingModule ]
|
imports: [],
|
||||||
});
|
providers: [provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||||
|
});
|
||||||
service = TestBed.inject(AuthClient);
|
service = TestBed.inject(AuthClient);
|
||||||
httpClient = TestBed.inject(HttpClient);
|
httpClient = TestBed.inject(HttpClient);
|
||||||
httpTestingController = TestBed.inject(HttpTestingController);
|
httpTestingController = TestBed.inject(HttpTestingController);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { UpdatesService } from './updates.service';
|
import { UpdatesService } from './updates.service';
|
||||||
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
|
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
describe('UpdatesService', () => {
|
describe('UpdatesService', () => {
|
||||||
let service: UpdatesService;
|
let service: UpdatesService;
|
||||||
@@ -11,8 +11,9 @@ describe('UpdatesService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [ HttpClientTestingModule]
|
imports: [],
|
||||||
});
|
providers: [provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||||
|
});
|
||||||
service = TestBed.inject(UpdatesService);
|
service = TestBed.inject(UpdatesService);
|
||||||
httpClient = TestBed.inject(HttpClient);
|
httpClient = TestBed.inject(HttpClient);
|
||||||
httpTestingController = TestBed.inject(HttpTestingController);
|
httpTestingController = TestBed.inject(HttpTestingController);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { HttpClient } from '@angular/common/http'
|
|||||||
import { Menu } from '../types/menu';
|
import { Menu } from '../types/menu';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
import { News } from '../types/news';
|
import { News } from '../types/news';
|
||||||
import * as moment from 'moment';
|
import moment from 'moment';
|
||||||
import { map } from 'rxjs';
|
import { map } from 'rxjs';
|
||||||
import { UKey } from '../types/key';
|
import { UKey } from '../types/key';
|
||||||
import { CleanNote } from '../types/clean-note';
|
import { CleanNote } from '../types/clean-note';
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"outDir": "./dist/out-tsc",
|
"outDir": "./dist/out-tsc",
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noImplicitOverride": true,
|
"noImplicitOverride": true,
|
||||||
"noPropertyAccessFromIndexSignature": true,
|
"noPropertyAccessFromIndexSignature": true,
|
||||||
@@ -12,7 +13,6 @@
|
|||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"declaration": false,
|
"declaration": false,
|
||||||
"downlevelIteration": true,
|
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user