From 738d30e327fd88991541eb2f18e46123687a5b1a Mon Sep 17 00:00:00 2001 From: bedanley Date: Wed, 18 Dec 2024 14:48:39 -0700 Subject: [PATCH] fix npm build error --- Makefile | 8 ++++---- lib/api-base/authorizer.ts | 2 +- lib/api-base/index.ts | 4 ++-- lib/api-base/rest-api-gw.ts | 2 +- lib/docs/package-lock.json | 6 +++--- package-lock.json | 6 +++--- package.json | 6 +++--- tsconfig.json | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 5c4ceb52..7e2d51da 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ createTypeScriptEnvironment installTypeScriptRequirements \ deploy destroy \ clean cleanTypeScript cleanPython cleanCfn cleanMisc \ - help dockerCheck dockerLogin listStacks modelCheck buildEcsDeployer + help dockerCheck dockerLogin listStacks modelCheck buildNpmModules ################################################################################# # GLOBALS # @@ -259,8 +259,8 @@ endif listStacks: @npx cdk list -buildEcsDeployer: - @cd ./ecs_model_deployer && npm install && npm run build +buildNpmModules: + npm run build define print_config @printf "\n \ @@ -280,7 +280,7 @@ define print_config endef ## Deploy all infrastructure -deploy: dockerCheck dockerLogin cleanMisc modelCheck buildEcsDeployer +deploy: dockerCheck dockerLogin cleanMisc modelCheck buildNpmModules $(call print_config) ifneq (,$(findstring true, $(HEADLESS))) npx cdk deploy ${STACK} $(if $(PROFILE),--profile ${PROFILE}) --require-approval never -c ${ENV}='$(shell echo '${${ENV}}')'; diff --git a/lib/api-base/authorizer.ts b/lib/api-base/authorizer.ts index 3d6ed628..bc9ba813 100644 --- a/lib/api-base/authorizer.ts +++ b/lib/api-base/authorizer.ts @@ -38,7 +38,7 @@ import { getDefaultRuntime } from './utils'; * @property {ISecurityGroup[]} securityGroups - Security groups for Lambdas * @property {Map} importedSubnets for Lambdas */ -type AuthorizerProps = { +export type AuthorizerProps = { role?: IRole; vpc: Vpc; securityGroups: ISecurityGroup[]; diff --git a/lib/api-base/index.ts b/lib/api-base/index.ts index 613f40d3..890db067 100644 --- a/lib/api-base/index.ts +++ b/lib/api-base/index.ts @@ -14,5 +14,5 @@ limitations under the License. */ -export { RestApiGateway } from './rest-api-gw'; -export { Authorizer } from './authorizer'; +export { RestApiGateway, RestApiGatewayProps } from './rest-api-gw'; +export { CustomAuthorizer, AuthorizerProps } from './authorizer'; diff --git a/lib/api-base/rest-api-gw.ts b/lib/api-base/rest-api-gw.ts index f0ae0b53..0042dadb 100644 --- a/lib/api-base/rest-api-gw.ts +++ b/lib/api-base/rest-api-gw.ts @@ -22,7 +22,7 @@ import { BaseProps } from '../schema'; /** * Properties for RestApiGateway Construct. */ -type RestApiGatewayProps = {} & BaseProps; +export type RestApiGatewayProps = {} & BaseProps; /** * RestApiGateway Stack. diff --git a/lib/docs/package-lock.json b/lib/docs/package-lock.json index 587c5e5a..bf4b3c01 100644 --- a/lib/docs/package-lock.json +++ b/lib/docs/package-lock.json @@ -1796,9 +1796,9 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { diff --git a/package-lock.json b/package-lock.json index b38a78f6..01dd97d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10477,9 +10477,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { diff --git a/package.json b/package.json index 8e3099d8..d8da341e 100644 --- a/package.json +++ b/package.json @@ -5,14 +5,14 @@ "lisa": "bin/lisa.js" }, "scripts": { - "build": "tsc && cd ./cdk_runner_lambda && npm run build", + "build": "tsc", "watch": "tsc -w", "test": "jest", "cdk": "cdk", "prepare": "husky install", "migrate-properties": "node ./scripts/migrate-properties.mjs", - "postinstall": "(cd lib/user-interface/react && npm install) && (cd lib/docs && npm install)", - "postbuild": "(cd lib/user-interface/react && npm build) && (cd lib/docs && npm build)", + "postinstall": "(cd lib/user-interface/react && npm install) && (cd lib/docs && npm install) && (cd ecs_model_deployer && npm install)", + "postbuild": "(cd lib/user-interface/react && npm run build) && (cd lib/docs && npm run build) && (cd ecs_model_deployer && npm run build)", "generateSchemaDocs": "npx zod2md -c ./lib/zod2md.config.ts" }, "devDependencies": { diff --git a/tsconfig.json b/tsconfig.json index 747a2f76..855ed2d9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,5 +22,5 @@ "typeRoots": ["./node_modules/@types"], "outDir": "dist/" }, - "exclude": ["node_modules", "cdk.out", ".git", "dist"] + "exclude": ["node_modules", "cdk.out", ".git", "dist", "lib/user-interface/react"] }