From 513db41b5288c8d4a4c89df6da91250b4a6c0ed4 Mon Sep 17 00:00:00 2001 From: Judson Neer Date: Wed, 14 Sep 2022 00:34:05 -0400 Subject: [PATCH] Upgrade CDK version. --- .projen/deps.json | 4 ++-- .projenrc.js | 2 +- API.md | 12 +++++++++--- package.json | 8 ++++---- src/network.ts | 6 +++--- src/node.ts | 6 +++--- src/utilities.ts | 20 ++++++++++---------- yarn.lock | 28 ++++++++++++++-------------- 8 files changed, 46 insertions(+), 40 deletions(-) diff --git a/.projen/deps.json b/.projen/deps.json index bce7e38..46f04bd 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -22,7 +22,7 @@ }, { "name": "aws-cdk-lib", - "version": "2.33.0", + "version": "2.24.1", "type": "build" }, { @@ -106,7 +106,7 @@ }, { "name": "aws-cdk-lib", - "version": "^2.33.0", + "version": "^2.24.1", "type": "peer" }, { diff --git a/.projenrc.js b/.projenrc.js index 23e8859..379710c 100644 --- a/.projenrc.js +++ b/.projenrc.js @@ -14,7 +14,7 @@ const project = new awscdk.AwsCdkConstructLibrary({ copyrightOwner: 'Amazon.com, Inc. or its affiliates. All Rights Reserved.', defaultReleaseBranch: 'main', repositoryUrl: 'https://github.com/cdklabs/cdk-hyperledger-fabric-network.git', - cdkVersion: '2.33.0', + cdkVersion: '2.24.1', autoApproveUpgrades: true, autoApproveOptions: { allowedUsernames: ['cdklabs-automation'], diff --git a/API.md b/API.md index 67d5cc9..fc6645b 100644 --- a/API.md +++ b/API.md @@ -452,8 +452,8 @@ new HyperledgerFabricNode(scope: HyperledgerFabricNetwork, id: string, props?: H | **Name** | **Description** | | --- | --- | -| [`configureLogging`](#cdklabscdkhyperledgerfabricnetworkhyperledgerfabricnodeconfigurelogging) | *No description.* | -| [`fetchData`](#cdklabscdkhyperledgerfabricnetworkhyperledgerfabricnodefetchdata) | *No description.* | +| [`configureLogging`](#cdklabscdkhyperledgerfabricnetworkhyperledgerfabricnodeconfigurelogging) | Configure logging for the node via SDK call; | +| [`fetchData`](#cdklabscdkhyperledgerfabricnetworkhyperledgerfabricnodefetchdata) | Populate the output properties that must be fetched via SDK call; | --- @@ -485,7 +485,7 @@ public fetchData(dataSdkCallPolicy: AwsCustomResourcePolicy) | **Name** | **Description** | | --- | --- | -| [`constructNodes`](#cdklabscdkhyperledgerfabricnetworkhyperledgerfabricnodeconstructnodes) | *No description.* | +| [`constructNodes`](#cdklabscdkhyperledgerfabricnetworkhyperledgerfabricnodeconstructnodes) | Build out a list of HyperledgerFabricNode constructs given a list of input property objects; | --- @@ -1114,6 +1114,8 @@ User ID to register with CA. --- +Define which Hyperledger Fabric framework to use. + #### `VERSION_1_2` --- @@ -1219,6 +1221,8 @@ Supported instance types for Managed Blockchain nodes. --- +Starter networks are cheaper, but are limited to 2 nodes that can only be from a subset of types (see node.ts for the list). + #### `STARTER` --- @@ -1238,6 +1242,8 @@ Supported instance types for Managed Blockchain nodes. --- +Constants to define ties in voting for new members. + #### `GREATER_THAN` --- diff --git a/package.json b/package.json index 68f2316..a3a4011 100644 --- a/package.json +++ b/package.json @@ -43,8 +43,8 @@ "@types/node": "^14", "@typescript-eslint/eslint-plugin": "^5", "@typescript-eslint/parser": "^5", - "aws-cdk-lib": "2.33.0", - "cdk-nag": "2.18.9", + "aws-cdk-lib": "2.24.1", + "cdk-nag": "2.18.10", "constructs": "10.0.5", "eslint": "^8", "eslint-import-resolver-node": "^0.3.6", @@ -58,13 +58,13 @@ "jsii-pacmak": "^1.67.0", "json-schema": "^0.4.0", "npm-check-updates": "^15", - "projen": "^0.62.5", + "projen": "^0.62.6", "standard-version": "^9", "ts-jest": "^27", "typescript": "^4.8.3" }, "peerDependencies": { - "aws-cdk-lib": "^2.33.0", + "aws-cdk-lib": "^2.24.1", "constructs": "^10.0.5" }, "keywords": [ diff --git a/src/network.ts b/src/network.ts index 06fc11f..ba1e67b 100644 --- a/src/network.ts +++ b/src/network.ts @@ -15,7 +15,7 @@ import * as user from './user'; import * as utilities from './utilities'; -/* +/** * Define which Hyperledger Fabric framework to use */ export enum FrameworkVersion { @@ -24,7 +24,7 @@ export enum FrameworkVersion { VERSION_2_2 = '2.2', } -/* +/** * Starter networks are cheaper, but are limited to 2 nodes that * can only be from a subset of types (see node.ts for the list) */ @@ -33,7 +33,7 @@ export enum NetworkEdition { STANDARD = 'STANDARD', } -/* +/** * Constants to define ties in voting for new members */ export enum ThresholdComparator { diff --git a/src/node.ts b/src/node.ts index 2abf963..b521679 100644 --- a/src/node.ts +++ b/src/node.ts @@ -76,7 +76,7 @@ export interface HyperledgerFabricNodeProps { */ export class HyperledgerFabricNode extends constructs.Construct { - /* + /** * Build out a list of HyperledgerFabricNode constructs given a list of input property * objects; additionally checks to ensure node count is supported given the network type */ @@ -175,7 +175,7 @@ export class HyperledgerFabricNode extends constructs.Construct { } - /* + /** * Configure logging for the node via SDK call; this function * should be merged back into the constructor once the race condition is solved */ @@ -212,7 +212,7 @@ export class HyperledgerFabricNode extends constructs.Construct { }); } - /* + /** * Populate the output properties that must be fetched via SDK call; this function * should be merged back into the constructor once the race condition is solved */ diff --git a/src/utilities.ts b/src/utilities.ts index 2dc074c..2232e5c 100644 --- a/src/utilities.ts +++ b/src/utilities.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: MIT-0 -/* +/** * Regions where Managed Blockchain is supported, for details see * https://aws.amazon.com/managed-blockchain/pricing/hyperledger/ */ @@ -15,7 +15,7 @@ export const SUPPORTED_REGIONS = [ 'us-east-1', ]; -/* +/** * Map of supported regions to their availability zones */ export const SUPPORTED_AVAILABILITY_ZONES: Record> = { @@ -55,24 +55,24 @@ export const SUPPORTED_AVAILABILITY_ZONES: Record> = { ], }; -/* +/** * Starting port of the Network port range */ export const STARTING_PORT = 30001; -/* +/** * Ending port of the Network port range */ export const ENDING_PORT = 30004; -/* +/** * Returns the S3 Bucket and key that contains the TLS cert file */ export function getTlsBucket(region: string) { return { bucketName: `${region}.managedblockchain`, key: 'etc/managedblockchain-tls-chain.pem' }; } -/* +/** * Throw an error if provided region is not in the supported list */ export function validateRegion(region: string) { @@ -82,8 +82,8 @@ export function validateRegion(region: string) { } } -/* - * Throw an error if provided availability is not in the supported list +/** + * Throw an error if provided availability zone is not in the supported list */ export function validateAvailabilityZone(region: string, availabilityZone?: string) { const availabililtyZonesForRegion = SUPPORTED_AVAILABILITY_ZONES[region]; @@ -93,7 +93,7 @@ export function validateAvailabilityZone(region: string, availabilityZone?: stri } } -/* +/** * Throw an error if provided number is not an integer, or not with the given range (inclusive) */ export function validateInteger(value: number, min: number, max: number) { @@ -102,7 +102,7 @@ export function validateInteger(value: number, min: number, max: number) { return true; } -/* +/** * Throw an error if provided string has length with a given range (inclusive), * and optionally matches a provided regular expression pattern */ diff --git a/yarn.lock b/yarn.lock index b78e740..47db7d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1221,16 +1221,16 @@ at-least-node@^1.0.0: resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== -aws-cdk-lib@2.33.0: - version "2.33.0" - resolved "https://registry.yarnpkg.com/aws-cdk-lib/-/aws-cdk-lib-2.33.0.tgz#cd9cc7ab097a80833f3d63aa1a704d401d85fc10" - integrity sha512-+aV6+P3RROFndkw9/mtXCciL1RL2tHssju6kgwmml0XIqcnjJ8qyCR23fE8MEq49Q+6dQ8sBN2HtrdKHw/sgnw== +aws-cdk-lib@2.24.1: + version "2.24.1" + resolved "https://registry.yarnpkg.com/aws-cdk-lib/-/aws-cdk-lib-2.24.1.tgz#197d10216b384850c01205acc8e4818838964302" + integrity sha512-xGeEX+9wPGppSiIUdf/JTLMmqMikGhlSi7bjijl3lwncZtySkdjX0j+W2A1fuKp0S8Yd2axkwVkltIMxzNH/gw== dependencies: "@balena/dockerignore" "^1.0.2" case "1.6.3" fs-extra "^9.1.0" ignore "^5.2.0" - jsonschema "^1.4.1" + jsonschema "^1.4.0" minimatch "^3.1.2" punycode "^2.1.1" semver "^7.3.7" @@ -1468,10 +1468,10 @@ case@1.6.3, case@^1.6.3: resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== -cdk-nag@2.18.9: - version "2.18.9" - resolved "https://registry.yarnpkg.com/cdk-nag/-/cdk-nag-2.18.9.tgz#41b98c3f1d8bff39d62bc3187a7d71ad01a7c7ac" - integrity sha512-VjYTYpQKCjkLitSnnHoPuEXco8hzACi/ESdgqlUJU259XrYupczZUsj4x4e9lU0MZKiDm/Sc8wqnmNri3RI9qQ== +cdk-nag@2.18.10: + version "2.18.10" + resolved "https://registry.yarnpkg.com/cdk-nag/-/cdk-nag-2.18.10.tgz#152c978291a000eec5aecd7c798ab8fa32bf8fdd" + integrity sha512-qL0S1mjkGRmyYFip3LunTokyC85jX5rJLTvq579bPfW6w4Wa3f6WYNJBZaj/fo8TOEpsadFeeDLWw6K1+9O7kg== chalk@^2.0.0, chalk@^2.4.2: version "2.4.2" @@ -3996,7 +3996,7 @@ jsonparse@^1.2.0, jsonparse@^1.3.1: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -jsonschema@^1.4.1: +jsonschema@^1.4.0: version "1.4.1" resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== @@ -4922,10 +4922,10 @@ progress@^2.0.3: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== -projen@^0.62.5: - version "0.62.5" - resolved "https://registry.yarnpkg.com/projen/-/projen-0.62.5.tgz#f80f1fb2cf866278afbf99b4eb40ad47eeac205d" - integrity sha512-SXB7bO48Eb9xbCtyOFY0Zxuw5EkbANhWVk5h6TdxPGvWNB/vhE9OTosxvPFPRGYLiHzFr/lV/UspdICWh9WaZQ== +projen@^0.62.6: + version "0.62.6" + resolved "https://registry.yarnpkg.com/projen/-/projen-0.62.6.tgz#55d9185b4d308fd5d8e25ae2a28c316de0713755" + integrity sha512-kVV3JDOf4qo5uEezTvZRPvfdTvVes0Us+wQOwJrx+FBUJZEjbvB70/st0G5Unf1qD/AA0q2xZ3Z7o4gR03X/tQ== dependencies: "@iarna/toml" "^2.2.5" case "^1.6.3"