partial ng12 migration
This commit is contained in:
parent
59473912e2
commit
93835fdf86
12
angular.json
12
angular.json
@ -22,7 +22,6 @@
|
|||||||
"main": "src/main.ts",
|
"main": "src/main.ts",
|
||||||
"polyfills": "src/polyfills.ts",
|
"polyfills": "src/polyfills.ts",
|
||||||
"tsConfig": "tsconfig.app.json",
|
"tsConfig": "tsconfig.app.json",
|
||||||
"aot": true,
|
|
||||||
"assets": [
|
"assets": [
|
||||||
"src/favicon.ico",
|
"src/favicon.ico",
|
||||||
"src/assets"
|
"src/assets"
|
||||||
@ -31,7 +30,13 @@
|
|||||||
"node_modules/bootstrap/dist/css/bootstrap.min.css",
|
"node_modules/bootstrap/dist/css/bootstrap.min.css",
|
||||||
"src/styles.scss"
|
"src/styles.scss"
|
||||||
],
|
],
|
||||||
"scripts": []
|
"scripts": [],
|
||||||
|
"vendorChunk": true,
|
||||||
|
"extractLicenses": false,
|
||||||
|
"buildOptimizer": false,
|
||||||
|
"sourceMap": true,
|
||||||
|
"optimization": false,
|
||||||
|
"namedChunks": true
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
@ -61,7 +66,8 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"defaultConfiguration": ""
|
||||||
},
|
},
|
||||||
"serve": {
|
"serve": {
|
||||||
"builder": "@angular-devkit/build-angular:dev-server",
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
|
30
package.json
30
package.json
@ -15,14 +15,14 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "~11.2.14",
|
"@angular/animations": "~12.2.17",
|
||||||
"@angular/common": "~11.2.14",
|
"@angular/common": "~12.2.17",
|
||||||
"@angular/compiler": "~11.2.14",
|
"@angular/compiler": "~12.2.17",
|
||||||
"@angular/core": "~11.2.14",
|
"@angular/core": "~12.2.17",
|
||||||
"@angular/forms": "~11.2.14",
|
"@angular/forms": "~12.2.17",
|
||||||
"@angular/platform-browser": "~11.2.14",
|
"@angular/platform-browser": "~12.2.17",
|
||||||
"@angular/platform-browser-dynamic": "~11.2.14",
|
"@angular/platform-browser-dynamic": "~12.2.17",
|
||||||
"@angular/router": "~11.2.14",
|
"@angular/router": "~12.2.17",
|
||||||
"@ng-select/ng-select": "^13.0.0",
|
"@ng-select/ng-select": "^13.0.0",
|
||||||
"@openharbor/ngx-data": "^18.0.0-alpha.3",
|
"@openharbor/ngx-data": "^18.0.0-alpha.3",
|
||||||
"@poweredsoft/data": "^0.0.36",
|
"@poweredsoft/data": "^0.0.36",
|
||||||
@ -38,13 +38,13 @@
|
|||||||
"ngx-bootstrap": "^18.0.0",
|
"ngx-bootstrap": "^18.0.0",
|
||||||
"rxjs": "~6.5.4",
|
"rxjs": "~6.5.4",
|
||||||
"tslib": "^2.0.0",
|
"tslib": "^2.0.0",
|
||||||
"zone.js": "~0.10.2"
|
"zone.js": "~0.11.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "~0.1102.19",
|
"@angular-devkit/build-angular": "~12.2.18",
|
||||||
"@angular/cli": "~11.2.19",
|
"@angular/cli": "~12.2.18",
|
||||||
"@angular/compiler-cli": "~11.2.14",
|
"@angular/compiler-cli": "~12.2.17",
|
||||||
"@angular/language-service": "~11.2.14",
|
"@angular/language-service": "~12.2.17",
|
||||||
"@types/jasmine": "~3.6.0",
|
"@types/jasmine": "~3.6.0",
|
||||||
"@types/jasminewd2": "~2.0.3",
|
"@types/jasminewd2": "~2.0.3",
|
||||||
"@types/node": "^12.11.1",
|
"@types/node": "^12.11.1",
|
||||||
@ -56,13 +56,13 @@
|
|||||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||||
"karma-jasmine": "~4.0.0",
|
"karma-jasmine": "~4.0.0",
|
||||||
"karma-jasmine-html-reporter": "^1.5.0",
|
"karma-jasmine-html-reporter": "^1.5.0",
|
||||||
"ng-packagr": "^11.2.4",
|
"ng-packagr": "^12.2.7",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"protractor": "~7.0.0",
|
"protractor": "~7.0.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"ts-node": "~8.3.0",
|
"ts-node": "~8.3.0",
|
||||||
"tslint": "~6.1.0",
|
"tslint": "~6.1.0",
|
||||||
"typescript": "~4.0.8",
|
"typescript": "~4.3.5",
|
||||||
"wait-on": "^5.0.1"
|
"wait-on": "^5.0.1"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
|
"packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||||
|
|
||||||
import 'zone.js/dist/zone';
|
import 'zone.js';
|
||||||
import 'zone.js/dist/zone-testing';
|
import 'zone.js/testing';
|
||||||
import { getTestBed } from '@angular/core/testing';
|
import { getTestBed } from '@angular/core/testing';
|
||||||
import {
|
import {
|
||||||
BrowserDynamicTestingModule,
|
BrowserDynamicTestingModule,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||||
|
|
||||||
import 'zone.js/dist/zone';
|
import 'zone.js';
|
||||||
import 'zone.js/dist/zone-testing';
|
import 'zone.js/testing';
|
||||||
import { getTestBed } from '@angular/core/testing';
|
import { getTestBed } from '@angular/core/testing';
|
||||||
import {
|
import {
|
||||||
BrowserDynamicTestingModule,
|
BrowserDynamicTestingModule,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||||
|
|
||||||
import 'zone.js/dist/zone';
|
import 'zone.js';
|
||||||
import 'zone.js/dist/zone-testing';
|
import 'zone.js/testing';
|
||||||
import { getTestBed } from '@angular/core/testing';
|
import { getTestBed } from '@angular/core/testing';
|
||||||
import {
|
import {
|
||||||
BrowserDynamicTestingModule,
|
BrowserDynamicTestingModule,
|
||||||
|
@ -9,40 +9,40 @@ import {Apollo, ApolloModule} from 'apollo-angular';
|
|||||||
import {HttpLink, HttpLinkModule} from 'apollo-angular-link-http';
|
import {HttpLink, HttpLinkModule} from 'apollo-angular-link-http';
|
||||||
import {DefaultOptions} from 'apollo-client';
|
import {DefaultOptions} from 'apollo-client';
|
||||||
import {InMemoryCache} from 'apollo-cache-inmemory';
|
import {InMemoryCache} from 'apollo-cache-inmemory';
|
||||||
import {HttpClientModule} from '@angular/common/http';
|
|
||||||
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
||||||
|
import {HttpClientModule} from "@angular/common/http";
|
||||||
|
|
||||||
|
|
||||||
export function app_Init(apollo: Apollo, httpLink: HttpLink) {
|
export function app_Init(apollo: Apollo, httpLink: HttpLink) {
|
||||||
return async () => {
|
return async () => {
|
||||||
const defaultOptions: DefaultOptions = {
|
|
||||||
watchQuery: {
|
|
||||||
fetchPolicy: 'no-cache',
|
|
||||||
errorPolicy: 'ignore',
|
|
||||||
},
|
|
||||||
query: {
|
|
||||||
fetchPolicy: 'network-only',
|
|
||||||
errorPolicy: 'all',
|
|
||||||
},
|
|
||||||
mutate: {
|
|
||||||
fetchPolicy: 'no-cache',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
apollo.createDefault({
|
|
||||||
link: httpLink.create({ uri: 'https://localhost:5001' }),
|
|
||||||
cache: new InMemoryCache(),
|
|
||||||
defaultOptions: defaultOptions,
|
|
||||||
});
|
|
||||||
|
|
||||||
apollo.createNamed('command', {
|
|
||||||
link: httpLink.create({ uri: 'https://localhost:6001' }),
|
|
||||||
cache: new InMemoryCache(),
|
|
||||||
defaultOptions: defaultOptions,
|
|
||||||
});
|
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
resolve();
|
const defaultOptions: DefaultOptions = {
|
||||||
|
watchQuery: {
|
||||||
|
fetchPolicy: 'no-cache',
|
||||||
|
errorPolicy: 'ignore',
|
||||||
|
},
|
||||||
|
query: {
|
||||||
|
fetchPolicy: 'network-only',
|
||||||
|
errorPolicy: 'all',
|
||||||
|
},
|
||||||
|
mutate: {
|
||||||
|
fetchPolicy: 'no-cache',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
apollo.createDefault({
|
||||||
|
link: httpLink.create({ uri: 'https://localhost:5001' }),
|
||||||
|
cache: new InMemoryCache(),
|
||||||
|
defaultOptions: defaultOptions,
|
||||||
|
});
|
||||||
|
|
||||||
|
apollo.createNamed('command', {
|
||||||
|
link: httpLink.create({ uri: 'https://localhost:6001' }),
|
||||||
|
cache: new InMemoryCache(),
|
||||||
|
defaultOptions: defaultOptions,
|
||||||
|
});
|
||||||
|
|
||||||
|
resolve(true);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,4 @@ export const environment = {
|
|||||||
* This import should be commented out in production mode because it will have a negative impact
|
* This import should be commented out in production mode because it will have a negative impact
|
||||||
* on performance if an error is thrown.
|
* on performance if an error is thrown.
|
||||||
*/
|
*/
|
||||||
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
/***************************************************************************************************
|
/***************************************************************************************************
|
||||||
* Zone JS is required by default for Angular itself.
|
* Zone JS is required by default for Angular itself.
|
||||||
*/
|
*/
|
||||||
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
import 'zone.js'; // Included with Angular CLI.
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************************************
|
/***************************************************************************************************
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||||
|
|
||||||
import 'zone.js/dist/zone-testing';
|
import 'zone.js/testing';
|
||||||
import { getTestBed } from '@angular/core/testing';
|
import { getTestBed } from '@angular/core/testing';
|
||||||
import {
|
import {
|
||||||
BrowserDynamicTestingModule,
|
BrowserDynamicTestingModule,
|
||||||
|
Loading…
Reference in New Issue
Block a user