Skip to content

Commit

Permalink
docs(examples): upgrade Angular to v14
Browse files Browse the repository at this point in the history
Fixes hyperledger-cacti#2229

Signed-off-by: Peter Somogyvari <[email protected]>
  • Loading branch information
petermetz committed Mar 25, 2023
1 parent eac7263 commit 55ffa43
Show file tree
Hide file tree
Showing 9 changed files with 2,285 additions and 158 deletions.
5 changes: 3 additions & 2 deletions examples/cactus-example-supply-chain-frontend/angular.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"defaultProject": "app",
"newProjectRoot": "projects",
"projects": {
"app": {
Expand Down Expand Up @@ -177,7 +176,9 @@
}
},
"cli": {
"defaultCollection": "@ionic/angular-toolkit"
"schematicCollections": [
"@ionic/angular-toolkit"
]
},
"schematics": {
"@ionic/angular-toolkit:component": {
Expand Down
24 changes: 12 additions & 12 deletions examples/cactus-example-supply-chain-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
"start": "ng serve"
},
"dependencies": {
"@angular/common": "13.3.7",
"@angular/core": "13.3.7",
"@angular/forms": "13.3.7",
"@angular/platform-browser": "13.3.7",
"@angular/platform-browser-dynamic": "13.3.7",
"@angular/router": "13.3.7",
"@angular/common": "14.2.12",
"@angular/core": "14.2.12",
"@angular/forms": "14.2.12",
"@angular/platform-browser": "14.2.12",
"@angular/platform-browser-dynamic": "14.2.12",
"@angular/router": "14.2.12",
"@hyperledger/cactus-api-client": "1.1.3",
"@hyperledger/cactus-common": "1.1.3",
"@hyperledger/cactus-core-api": "1.1.3",
Expand All @@ -72,11 +72,11 @@
},
"devDependencies": {
"@angular-builders/custom-webpack": "13.1.0",
"@angular-devkit/build-angular": "13.3.5",
"@angular/cli": "13.3.5",
"@angular/compiler": "13.3.7",
"@angular/compiler-cli": "13.3.7",
"@angular/language-service": "13.3.7",
"@angular-devkit/build-angular": "14.2.10",
"@angular/cli": "14.2.10",
"@angular/compiler": "14.2.12",
"@angular/compiler-cli": "14.2.12",
"@angular/language-service": "14.2.12",
"@ionic/angular-toolkit": "6.1.0",
"@types/node": "17.0.32",
"codelyzer": "6.0.2",
Expand All @@ -100,4 +100,4 @@
"publishConfig": {
"access": "public"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { v4 as uuidv4 } from "uuid";

import { Component, Inject, Input, OnInit } from "@angular/core";
import { FormGroup, FormBuilder, Validators } from "@angular/forms";
import {
UntypedFormGroup,
UntypedFormBuilder,
Validators,
} from "@angular/forms";
import { ModalController } from "@ionic/angular";

import { ApiClient } from "@hyperledger/cactus-api-client";
Expand All @@ -17,14 +21,14 @@ import { Logger, LoggerProvider } from "@hyperledger/cactus-common";
})
export class BambooHarvestDetailPage implements OnInit {
private readonly log: Logger;
public form: FormGroup;
public form: UntypedFormGroup;
@Input()
public bambooHarvest: BambooHarvest;

constructor(
private readonly baseClient: ApiClient,
public readonly modalController: ModalController,
public readonly formBuilder: FormBuilder,
public readonly formBuilder: UntypedFormBuilder,
@Inject(QUORUM_DEMO_LEDGER_ID) private readonly quorumLedgerId: string,
) {
this.log = LoggerProvider.getOrCreate({ label: "BambooHarvestDetailPage" });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { v4 as uuidv4 } from "uuid";

import { Component, Inject, Input, OnInit } from "@angular/core";
import { FormGroup, FormBuilder, Validators } from "@angular/forms";
import {
UntypedFormGroup,
UntypedFormBuilder,
Validators,
} from "@angular/forms";
import { ModalController } from "@ionic/angular";

import { ApiClient } from "@hyperledger/cactus-api-client";
Expand All @@ -25,7 +29,7 @@ import { AuthConfig } from "../../common/auth-config";
export class BookshelfDetailPage implements OnInit {
private readonly log: Logger;
private _supplyChainApi: SupplyChainApi | undefined;
public form: FormGroup;
public form: UntypedFormGroup;
@Input()
public bookshelf: Bookshelf;
public bambooHarvests: BambooHarvest[];
Expand All @@ -35,7 +39,7 @@ export class BookshelfDetailPage implements OnInit {
private readonly baseClient: ApiClient,
@Inject(QUORUM_DEMO_LEDGER_ID) private readonly quorumLedgerId: string,
public readonly modalController: ModalController,
public readonly formBuilder: FormBuilder,
public readonly formBuilder: UntypedFormBuilder,
) {
this.log = LoggerProvider.getOrCreate({ label: "BookshelfDetailPage" });
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { v4 as uuidv4 } from "uuid";

import { Component, Inject, Input, OnInit } from "@angular/core";
import { FormGroup, FormBuilder, Validators } from "@angular/forms";
import {
UntypedFormGroup,
UntypedFormBuilder,
Validators,
} from "@angular/forms";
import { ModalController } from "@ionic/angular";

import { ApiClient } from "@hyperledger/cactus-api-client";
Expand All @@ -25,7 +29,7 @@ import { AuthConfig } from "../../common/auth-config";
export class ShipmentDetailPage implements OnInit {
private readonly log: Logger;
private _supplyChainApi: SupplyChainApi | undefined;
public form: FormGroup;
public form: UntypedFormGroup;
@Input()
public shipment: Shipment;
public bookshelves: Bookshelf[];
Expand All @@ -35,7 +39,7 @@ export class ShipmentDetailPage implements OnInit {
private readonly baseClient: ApiClient,
@Inject(QUORUM_DEMO_LEDGER_ID) private readonly quorumLedgerId: string,
public readonly modalController: ModalController,
public readonly formBuilder: FormBuilder,
public readonly formBuilder: UntypedFormBuilder,
) {
this.log = LoggerProvider.getOrCreate({ label: "ShipmentDetailPage" });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"moduleResolution": "node",
"esModuleInterop": true,
"importHelpers": true,
"target": "es2015",
"target": "es2020",
"lib": [
"es2018",
"dom"
Expand Down
9 changes: 1 addition & 8 deletions examples/cactus-workshop-examples-2022-11-14/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,12 @@
],
"main": "dist/lib/main/typescript/index.js",
"module": "dist/lib/main/typescript/index.js",
"browser": "dist/cactus-workshop-examples-2022-11-14.web.umd.js",
"types": "dist/lib/main/typescript/index.d.ts",
"files": [
"dist/*"
],
"scripts": {
"watch": "npm-watch",
"webpack": "npm-run-all webpack:dev",
"webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web",
"webpack:dev:node": "webpack --env=dev --target=node --config ../../../webpack.config.js",
"webpack:dev:web": "webpack --env=dev --target=web --config ../../../webpack.config.js"
"watch": "npm-watch"
},
"dependencies": {
"@hyperledger/cactus-common": "1.1.3",
Expand All @@ -67,7 +62,5 @@
"publishConfig": {
"access": "public"
},
"browserMinified": "dist/cactus-workshop-examples-2022-11-14.web.umd.min.js",
"mainMinified": "dist/cactus-workshop-examples-2022-11-14.node.umd.min.js",
"watch": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ export class Containers {
const log = LoggerProvider.getOrCreate(defaultLoggerOptions);
const task = () => Containers.tryPullImage(imageFqn, options, logLevel);
const retryOptions: pRetry.Options = {
retries: 6,
onFailedAttempt: async (ex) => {
log.debug(`Failed attempt at pulling container image ${imageFqn}`, ex);
},
Expand Down
Loading

0 comments on commit 55ffa43

Please sign in to comment.