Skip to content

Commit

Permalink
feat: upgrade to angular 17 and websdk 1020 (Cumulocity-IoT#203)
Browse files Browse the repository at this point in the history
* feat: upgrade to angular 17 and websdk 1020

* upgrade sub packages to 1020

* fix dependencies
  • Loading branch information
reey authored Jun 16, 2024
1 parent 2b46622 commit 0af7dd4
Show file tree
Hide file tree
Showing 8 changed files with 2,221 additions and 1,944 deletions.
8 changes: 4 additions & 4 deletions cumulocity-node-red-ui/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@
"builder": "@c8y/devkit:dev-server",
"configurations": {
"production": {
"browserTarget": "cumulocity-node-red-ui:build:production"
"buildTarget": "cumulocity-node-red-ui:build:production"
},
"development": {
"browserTarget": "cumulocity-node-red-ui:build:development"
"buildTarget": "cumulocity-node-red-ui:build:development"
}
},
"defaultConfiguration": "development"
Expand Down Expand Up @@ -128,10 +128,10 @@
"builder": "@c8y/devkit:deploy",
"configurations": {
"production": {
"browserTarget": "cumulocity-node-red-ui:build:production"
"buildTarget": "cumulocity-node-red-ui:build:production"
},
"development": {
"browserTarget": "cumulocity-node-red-ui:build:development"
"buildTarget": "cumulocity-node-red-ui:build:development"
}
},
"defaultConfiguration": "production"
Expand Down
2 changes: 1 addition & 1 deletion cumulocity-node-red-ui/cumulocity.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ConfigurationOptions } from '@c8y/devkit/dist/options';
import { ConfigurationOptions } from '@c8y/devkit';
import * as config from '../package.json';

const { author, description, version, license } = config;
Expand Down
39 changes: 19 additions & 20 deletions cumulocity-node-red-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,30 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^16.2.0",
"@angular/cdk": "^16.2.11",
"@angular/common": "^16.2.0",
"@angular/compiler": "^16.2.0",
"@angular/core": "^16.2.0",
"@angular/forms": "^16.2.0",
"@angular/platform-browser": "^16.2.0",
"@angular/platform-browser-dynamic": "^16.2.0",
"@angular/router": "^16.2.0",
"@c8y/bootstrap": "1019.23.8",
"@c8y/client": "1019.23.8",
"@c8y/devkit": "1019.23.8",
"@c8y/ngx-components": "1019.23.8",
"@c8y/style": "1019.23.8",
"@c8y/websdk": "1019.23.8",
"ngx-bootstrap": "11.0.2",
"@angular/animations": "^17.3.0",
"@angular/cdk": "^17.3.0",
"@angular/common": "^17.3.0",
"@angular/compiler": "^17.3.0",
"@angular/core": "^17.3.0",
"@angular/forms": "^17.3.0",
"@angular/platform-browser": "^17.3.0",
"@angular/platform-browser-dynamic": "^17.3.0",
"@angular/router": "^17.3.0",
"@c8y/bootstrap": "1020.0.15",
"@c8y/client": "1020.0.15",
"@c8y/ngx-components": "1020.0.15",
"@c8y/options": "1020.0.15",
"@c8y/style": "1020.0.15",
"ngx-bootstrap": "12.0.0",
"rxjs": "^7.4.0",
"tslib": "^2.3.0",
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.2.14",
"@angular/cli": "^16.2.14",
"@angular/compiler-cli": "^16.2.0",
"@c8y/widget-plugin": "1019.23.8",
"@angular-devkit/build-angular": "^17.3.0",
"@angular/cli": "^17.3.0",
"@angular/compiler-cli": "^17.3.0",
"@c8y/devkit": "1020.0.15",
"@types/jasmine": "~4.3.0",
"jasmine-core": "~4.6.0",
"karma": "~6.4.0",
Expand Down
11 changes: 5 additions & 6 deletions cumulocity-node-red-ui/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import { applyOptions, loadOptions, loginOptions } from '@c8y/bootstrap';
import { applyOptions, loadOptions } from '@c8y/bootstrap';

const barHolder: HTMLElement = document.querySelector('body > .init-load');
export const removeProgress = () => barHolder && barHolder.parentNode.removeChild(barHolder);
const barHolder: HTMLElement | null = document.querySelector('body > .init-load');
export const removeProgress = () => barHolder && barHolder.parentNode?.removeChild(barHolder);

applicationSetup();

async function applicationSetup() {
const options = await applyOptions({
...(await loadOptions()),
...((await loginOptions()) as object)
...(await loadOptions())
});

const mod = await import('./bootstrap');
const bootstrapApp = mod.bootstrap || (window as any).bootstrap || (() => null);

return Promise.resolve(bootstrapApp(options)).then(removeProgress);
return Promise.resolve(bootstrapApp()).then(removeProgress);
}
2 changes: 1 addition & 1 deletion cumulocity-node-red-ui/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
/***************************************************************************************************
* 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.
2 changes: 1 addition & 1 deletion node-red-c8y-storage-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"author": "Tristan Bastian",
"license": "Apache-2.0",
"dependencies": {
"@c8y/client": "1019.23.8"
"@c8y/client": "1020.0.15"
},
"devDependencies": {
"@types/node": "^18",
Expand Down
2 changes: 1 addition & 1 deletion node-red-contrib-c8y-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
},
"dependencies": {
"@c8y/client": "1019.23.8"
"@c8y/client": "1020.0.15"
},
"author": "Tristan Bastian",
"license": "Apache-2.0"
Expand Down
Loading

0 comments on commit 0af7dd4

Please sign in to comment.