Merge branch 'feature/ng-update' into develop
commit
0e57dc4151
17
CHANGELOG.md
17
CHANGELOG.md
|
@ -10,7 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|||
|
||||
### Changed
|
||||
|
||||
* Better screenshot
|
||||
- Better screenshot
|
||||
- Upgraded to Angular 10
|
||||
|
||||
### Deprecated
|
||||
|
||||
|
@ -28,7 +29,7 @@ Tests were done with `ipfs-npm` : They weren't successful. `ipfs-css` is only mi
|
|||
|
||||
### Added
|
||||
|
||||
* GitLab Pages - <https://natoboram.gitlab.io/public-gateway-cacher/>
|
||||
- GitLab Pages - <https://natoboram.gitlab.io/public-gateway-cacher/>
|
||||
|
||||
## [1.0.0] - 2019-11-28
|
||||
|
||||
|
@ -36,9 +37,9 @@ This version is a fork of [github.com/ipfs/public-gateway-checker](https://githu
|
|||
|
||||
## Types of changes
|
||||
|
||||
* `Added` for new features.
|
||||
* `Changed` for changes in existing functionality.
|
||||
* `Deprecated` for soon-to-be removed features.
|
||||
* `Removed` for now removed features.
|
||||
* `Fixed` for any bug fixes.
|
||||
* `Security` in case of vulnerabilities.
|
||||
- `Added` for new features.
|
||||
- `Changed` for changes in existing functionality.
|
||||
- `Deprecated` for soon-to-be removed features.
|
||||
- `Removed` for now removed features.
|
||||
- `Fixed` for any bug fixes.
|
||||
- `Security` in case of vulnerabilities.
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
},
|
||||
"defaultProject": "public-gateway-cacher",
|
||||
"cli": {
|
||||
"packageManager": "yarn"
|
||||
"packageManager": "yarn",
|
||||
"analytics": "10b848ad-8b81-4346-852f-5eff89573a85"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +1,19 @@
|
|||
import { browser, logging } from 'protractor';
|
||||
import { AppPage } from './app.po';
|
||||
|
||||
describe('workspace-project App', () => {
|
||||
describe('workspace-project App', (): void => {
|
||||
let page: AppPage;
|
||||
|
||||
beforeEach(() => {
|
||||
beforeEach((): void => {
|
||||
page = new AppPage();
|
||||
});
|
||||
|
||||
it('should display welcome message', () => {
|
||||
it('should display welcome message', (): void => {
|
||||
page.navigateTo();
|
||||
expect(page.getTitleText()).toEqual('public-gateway-cacher app is running!');
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
afterEach(async (): Promise<void> => {
|
||||
// Assert that there are no errors emitted from the browser
|
||||
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
|
||||
expect(logs).not.toContain(jasmine.objectContaining({
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"target": "es2018",
|
||||
"types": [
|
||||
"jasmine",
|
||||
"jasminewd2",
|
||||
|
|
63
package.json
63
package.json
|
@ -16,47 +16,46 @@
|
|||
},
|
||||
"private": false,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~8.2.14",
|
||||
"@angular/cdk": "~8.2.3",
|
||||
"@angular/common": "~8.2.14",
|
||||
"@angular/compiler": "~8.2.14",
|
||||
"@angular/core": "~8.2.14",
|
||||
"@angular/flex-layout": "^8.0.0-beta.27",
|
||||
"@angular/forms": "~8.2.14",
|
||||
"@angular/material": "^8.2.3",
|
||||
"@angular/platform-browser": "~8.2.14",
|
||||
"@angular/platform-browser-dynamic": "~8.2.14",
|
||||
"@angular/router": "~8.2.14",
|
||||
"@angular/animations": "~10.0.2",
|
||||
"@angular/cdk": "~10.0.1",
|
||||
"@angular/common": "~10.0.2",
|
||||
"@angular/compiler": "~10.0.2",
|
||||
"@angular/core": "~10.0.2",
|
||||
"@angular/flex-layout": "^10.0.0-beta.32",
|
||||
"@angular/forms": "~10.0.2",
|
||||
"@angular/material": "^10.0.1",
|
||||
"@angular/platform-browser": "~10.0.2",
|
||||
"@angular/platform-browser-dynamic": "~10.0.2",
|
||||
"@angular/router": "~10.0.2",
|
||||
"bootstrap": "^4.4.1",
|
||||
"hammerjs": "^2.0.8",
|
||||
"ipfs-css": "^0.13.1",
|
||||
"rxjs": "~6.5.3",
|
||||
"tslib": "^1.10.0",
|
||||
"zone.js": "~0.9.1"
|
||||
"rxjs": "~6.6.0",
|
||||
"tslib": "^2.0.0",
|
||||
"zone.js": "~0.10.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~0.803.20",
|
||||
"@angular/cli": "~8.3.20",
|
||||
"@angular/compiler-cli": "~8.2.14",
|
||||
"@angular/language-service": "~8.2.14",
|
||||
"@angular-devkit/build-angular": "~0.1000.1",
|
||||
"@angular/cli": "~10.0.1",
|
||||
"@angular/compiler-cli": "~10.0.2",
|
||||
"@angular/language-service": "~10.0.2",
|
||||
"@types/jasmine": "~3.3.8",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/node": "~8.9.4",
|
||||
"codelyzer": "^5.0.0",
|
||||
"jasmine-core": "~3.4.0",
|
||||
"jasmine-spec-reporter": "~4.2.1",
|
||||
"karma": "~4.1.0",
|
||||
"karma-chrome-launcher": "~2.2.0",
|
||||
"karma-coverage-istanbul-reporter": "~2.0.1",
|
||||
"karma-jasmine": "~2.0.1",
|
||||
"karma-jasmine-html-reporter": "^1.4.0",
|
||||
"protractor": "~5.4.0",
|
||||
"@types/node": "^12.11.1",
|
||||
"codelyzer": "^5.1.2",
|
||||
"jasmine-core": "~3.5.0",
|
||||
"jasmine-spec-reporter": "~5.0.0",
|
||||
"karma": "~5.0.0",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||
"karma-jasmine": "~3.3.0",
|
||||
"karma-jasmine-html-reporter": "^1.5.0",
|
||||
"protractor": "~7.0.0",
|
||||
"rxjs-tslint-rules": "^4.26.3",
|
||||
"ts-node": "~7.0.0",
|
||||
"tslint": "~5.15.0",
|
||||
"tslint": "~6.1.0",
|
||||
"tslint-consistent-codestyle": "^1.16.0",
|
||||
"tslint-origin-ordered-imports-rule": "^1.2.2",
|
||||
"tslint-rxjs-subject-restrictions-rule": "^1.0.4",
|
||||
"typescript": "~3.5.3"
|
||||
"typescript": "~3.9.6"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
import { TestBed, async } from '@angular/core/testing';
|
||||
import { async, TestBed } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
describe('AppComponent', (): void => {
|
||||
beforeEach(async((): void => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
RouterTestingModule
|
||||
|
@ -14,19 +14,19 @@ describe('AppComponent', () => {
|
|||
}).compileComponents();
|
||||
}));
|
||||
|
||||
it('should create the app', () => {
|
||||
it('should create the app', (): void => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have as title 'public-gateway-cacher'`, () => {
|
||||
it(`should have as title 'public-gateway-cacher'`, (): void => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app.title).toEqual('public-gateway-cacher');
|
||||
});
|
||||
|
||||
it('should render title', () => {
|
||||
it('should render title', (): void => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.debugElement.nativeElement;
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PagesComponent } from './pages.component';
|
||||
|
||||
describe('PagesComponent', () => {
|
||||
describe('PagesComponent', (): void => {
|
||||
let component: PagesComponent;
|
||||
let fixture: ComponentFixture<PagesComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
beforeEach(async((): void => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PagesComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
beforeEach((): void => {
|
||||
fixture = TestBed.createComponent(PagesComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
it('should create', (): void => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -21,7 +21,7 @@ export class PagesComponent implements OnInit {
|
|||
];
|
||||
subscriptions: Subscription[] = [];
|
||||
|
||||
@ViewChild(MatTable, { static: false }) matTable: MatTable<Result>;
|
||||
@ViewChild(MatTable) matTable: MatTable<Result>;
|
||||
|
||||
constructor(
|
||||
private readonly gatewayService: GatewayService
|
||||
|
@ -29,7 +29,7 @@ export class PagesComponent implements OnInit {
|
|||
|
||||
ngOnInit(): void {
|
||||
this.dataSource = new MatTableDataSource([]);
|
||||
this.gatewayService.list().subscribe(gateways => this.gateways = gateways);
|
||||
this.gatewayService.list().subscribe((gateways): void => { this.gateways = gateways; });
|
||||
}
|
||||
|
||||
cacheIPFS(): void {
|
||||
|
@ -53,12 +53,12 @@ export class PagesComponent implements OnInit {
|
|||
this.matTable.renderRows();
|
||||
console.clear();
|
||||
|
||||
this.gateways.forEach(gateway => {
|
||||
this.gateways.forEach((gateway): void => {
|
||||
this.subscriptions.push(
|
||||
this.gatewayService.get(gateway, type, hash).subscribe(_ => {
|
||||
this.gatewayService.get(gateway, type, hash).subscribe((): void => {
|
||||
this.dataSource.data.push({ gateway: `${gateway.replace(':type', type).replace(':hash', hash)}`, error: null });
|
||||
this.matTable.renderRows();
|
||||
}, (error: HttpErrorResponse) => {
|
||||
}, (error: HttpErrorResponse): void => {
|
||||
this.dataSource.data.push({ gateway: `${gateway.replace(':type', type).replace(':hash', hash)}`, error });
|
||||
this.matTable.renderRows();
|
||||
})
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TestBed, TestBedStatic } from '@angular/core/testing';
|
||||
import { GatewayService } from './gateway.service';
|
||||
|
||||
describe('GatewayService', () => {
|
||||
beforeEach(() => TestBed.configureTestingModule({}));
|
||||
describe('GatewayService', (): void => {
|
||||
beforeEach((): TestBedStatic => TestBed.configureTestingModule({}));
|
||||
|
||||
it('should be created', () => {
|
||||
const service: GatewayService = TestBed.get(GatewayService);
|
||||
it('should be created', (): void => {
|
||||
const service: GatewayService = TestBed.inject(GatewayService);
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import 'hammerjs';
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
|
@ -9,4 +8,4 @@ if (environment.production) {
|
|||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
.catch((err): void => console.error(err));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"extends": "./tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/app",
|
||||
"types": []
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "./dist/out-tsc",
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"downlevelIteration": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "es2020",
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
"target": "es2015",
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
"lib": [
|
||||
"es2018",
|
||||
"dom"
|
||||
]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"fullTemplateTypeCheck": true,
|
||||
"strictInjectionParameters": true
|
||||
}
|
||||
}
|
|
@ -1,26 +1,17 @@
|
|||
/*
|
||||
This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience.
|
||||
It is not intended to be used to perform a compilation.
|
||||
|
||||
To learn more about this file see: https://angular.io/config/solution-tsconfig.
|
||||
*/
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "./dist/out-tsc",
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"downlevelIteration": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
"target": "es2015",
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
"lib": [
|
||||
"es2018",
|
||||
"dom"
|
||||
]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"fullTemplateTypeCheck": true,
|
||||
"strictInjectionParameters": true
|
||||
}
|
||||
}
|
||||
"files": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.app.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"extends": "./tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/spec",
|
||||
"types": [
|
||||
|
|
|
@ -80,7 +80,6 @@
|
|||
"no-non-null-assertion": true,
|
||||
"no-redundant-jsdoc": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-use-before-declare": true,
|
||||
"no-var-requires": false,
|
||||
"object-literal-key-quotes": [
|
||||
true,
|
||||
|
|
Loading…
Reference in New Issue