Skip to content

Commit

Permalink
fix: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
hmeltaus committed Mar 14, 2024
1 parent d1b5584 commit 0f14804
Show file tree
Hide file tree
Showing 10 changed files with 4,941 additions and 2,374 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Henri Meltaus <[email protected]>
Copyright (c) 2024 Henri Meltaus <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

| Version | Supported |
|---------|----------------------|
| 6.x | :white_check_mark: |
| < 6.x | :x: |
| 7.x | :white_check_mark: |
| < 7.x | :x: |

## Reporting a Vulnerability

Expand Down
7,239 changes: 4,901 additions & 2,338 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 17 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
"ts-jest": "29.1.2",
"@jest/globals": "29.7.0",
"@aws-sdk/client-ec2": "3.511.0",
"@commitlint/cli": "18.6.1",
"@commitlint/config-conventional": "18.6.1",
"@commitlint/cli": "19.1.0",
"@commitlint/config-conventional": "19.1.0",
"@jest/console": "29.7.0",
"@takomo/test-custom-helper-lowercase": "0.0.1",
"@takomo/test-custom-helper-uppercase": "0.0.1",
Expand All @@ -98,29 +98,30 @@
"@types/json-stable-stringify": "1.0.36",
"@types/lodash.merge": "4.6.9",
"@types/lodash.takerightwhile": "4.6.9",
"@types/node": "20.11.17",
"@types/ramda": "0.28.23",
"@types/node": "20.11.26",
"@types/ramda": "0.29.11",
"@types/semver": "7.5.7",
"@types/uuid": "9.0.8",
"@types/yargs": "17.0.32",
"@types/ejs": "3.1.5",
"@types/lodash": "4.14.202",
"@typescript-eslint/eslint-plugin": "6.16.0",
"@typescript-eslint/parser": "6.16.0",
"@types/inquirer-autocomplete-prompt": "3.0.3",
"depcheck": "1.4.7",
"eslint": "8.56.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"husky": "9.0.10",
"husky": "9.0.11",
"jest": "29.7.0",
"jest-environment-testenv-recycler": "0.0.21",
"jest-mock-extended": "3.0.5",
"prettier": "3.1.1",
"prettier-plugin-organize-imports": "3.2.4",
"lint-staged": "15.2.2",
"ts-node": "10.9.2",
"typedoc": "0.25.8",
"typescript": "5.3.3",
"typedoc": "0.25.12",
"typescript": "5.4.2",
"semantic-release": "23.0.2",
"npm-check-updates": "16.14.15"
},
Expand All @@ -140,30 +141,31 @@
"cockatiel": "3.1.2",
"date-and-time": "3.1.1",
"diff": "5.2.0",
"dotenv": "16.4.3",
"dotenv-expand": "11.0.3",
"dotenv": "16.4.5",
"dotenv-expand": "11.0.6",
"easy-table": "1.2.0",
"folder-hash": "4.0.4",
"handlebars": "4.7.8",
"inquirer": "9.2.14",
"inquirer": "9.2.15",
"inquirer-autocomplete-prompt": "3.0.1",
"jmespath": "0.16.0",
"joi": "17.12.1",
"joi": "17.12.2",
"js-yaml": "4.1.0",
"json-stable-stringify": "1.1.1",
"lodash.merge": "4.6.2",
"lodash.takerightwhile": "4.6.0",
"neverthrow": "6.1.0",
"p-queue": "8.0.1",
"pretty-ms": "9.0.0",
"ramda": "0.28.0",
"ramda": "0.29.1",
"readdirp": "3.6.0",
"semver": "7.6.0",
"source-map-support": "0.5.21",
"ts-dedent": "2.2.0",
"uuid": "9.0.1",
"yargs": "17.7.2",
"esbuild": "0.20.0",
"ejs": "3.1.9"
"esbuild": "0.20.1",
"ejs": "3.1.9",
"lodash": "4.17.21"
}
}
18 changes: 11 additions & 7 deletions src/cli/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ import { parseLogLevel } from "./options/parse-log-level.js"
import { parseOutputFormat } from "./options/parse-output-format.js"
import { parseVarArgs } from "./options/parse-var-args.js"
import { parseVarFileOptions } from "./options/parse-var-file-options.js"
import _ from "lodash"

export interface RunProps {
readonly overridingHandler?: (args: Arguments) => void
readonly showHelpOnFail?: boolean
}

const resolveProjectDir = (projectDirArg: any): FilePath => {
const resolveProjectDir = (projectDirArg: unknown): FilePath => {
if (projectDirArg) {
const projectDir = projectDirArg.toString()
return expandFilePath(process.cwd(), projectDir)
Expand All @@ -53,6 +54,7 @@ const resolveProjectDir = (projectDirArg: any): FilePath => {
}

export const initCommandContext = async (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
argv: any,
credentials?: AwsCredentialIdentity,
): Promise<FileSystemCommandContext> => {
Expand Down Expand Up @@ -114,6 +116,7 @@ export const initCommandContext = async (
})
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const onError = (e: any): void => {
console.log()
console.log(red("ERROR"))
Expand All @@ -133,7 +136,7 @@ export const onError = (e: any): void => {
console.log()
console.log(red("[!] How to fix:"))
console.log()
e.instructions.forEach((instruction: any) => {
e.instructions.forEach((instruction: unknown) => {
console.log(red(` - ${instruction}`))
})
}
Expand Down Expand Up @@ -219,14 +222,14 @@ export const onComplete = async ({

const allApiCalls = ctx.awsClientProvider.getApiCalls()

const apiCallsByClient = R.groupBy(R.prop("clientId"), allApiCalls)
const apiCallsByClient = _.groupBy(allApiCalls, "clientId")
const clientIds = Object.keys(apiCallsByClient).sort()
clientIds.forEach((clientId) => {
clientsTable.cell("Client id", clientId).newRow()
const clientApiCalls = apiCallsByClient[clientId]
const clientApiCallsByAction: Record<string, ApiCallProps[]> = R.groupBy(
(a) => `${a.api}:${a.action}`,
const clientApiCallsByAction: Record<string, ApiCallProps[]> = _.groupBy(
clientApiCalls,
(a) => `${a.api}:${a.action}`,
)
const actionNames = Object.keys(clientApiCallsByAction).sort()
actionNames.forEach((actionName) => {
Expand All @@ -252,9 +255,9 @@ export const onComplete = async ({

clientsTable.newRow().cell("Client id", "Total").newRow()

const totalApiCallsByAction: Record<string, ApiCallProps[]> = R.groupBy(
(a) => `${a.api}:${a.action}`,
const totalApiCallsByAction: Record<string, ApiCallProps[]> = _.groupBy(
allApiCalls,
(a) => `${a.api}:${a.action}`,
)
Object.keys(totalApiCallsByAction)
.sort()
Expand Down Expand Up @@ -359,6 +362,7 @@ interface HandleProps<
IN extends CommandInput,
OUT extends CommandOutput,
> {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
argv: any
input?: (ctx: FileSystemCommandContext, input: CommandInput) => Promise<IN>
io: (ctx: FileSystemCommandContext, logger: TkmLogger) => I
Expand Down
2 changes: 1 addition & 1 deletion src/cli/options/parse-log-level.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LogLevel } from "../../utils/logging.js"

export const parseLogLevel = (log: string, quiet: boolean): LogLevel => {
export const parseLogLevel = (log: unknown, quiet: boolean): LogLevel => {
if (quiet) {
return "none"
}
Expand Down
2 changes: 1 addition & 1 deletion src/cli/options/parse-output-format.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { OutputFormat } from "../../takomo-core/command.js"

export const parseOutputFormat = (format?: string): OutputFormat => {
export const parseOutputFormat = (format?: unknown): OutputFormat => {
if (!format) {
return "text"
}
Expand Down
6 changes: 3 additions & 3 deletions src/command/iam/generate-iam-policies-command.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Joi, { AnySchema } from "joi"
import * as R from "ramda"

import _ from "lodash"
import { AwsClientProvider } from "../../aws/aws-client-provider.js"
import { CloudTrailEvent } from "../../aws/cloudtrail/model.js"
import { CredentialManager } from "../../aws/common/credentials.js"
Expand Down Expand Up @@ -163,9 +163,9 @@ const generateIamPolicies = async (
[],
)

const eventsByIdentity = R.groupBy(
(e) => e.cloudTrailEvent.userIdentity?.arn,
const eventsByIdentity = _.groupBy(
events,
(e) => e.cloudTrailEvent.userIdentity?.arn,
)

const policies = Object.entries(eventsByIdentity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
DeploymentTargetRepository,
} from "../../takomo-deployment-targets-repository/index.js"
import { StacksConfigRepository } from "../../takomo-stacks-context/index.js"

import _ from "lodash"
import { CredentialManager } from "../../aws/common/credentials.js"
import { Cache } from "../../caches/cache.js"
import { ConfigSetName } from "../../config-sets/config-set-model.js"
Expand Down Expand Up @@ -139,9 +139,7 @@ const loadExternallyPersistedDeploymentTargets = async (

return new Map(
Array.from(
Object.entries(
R.groupBy(R.prop("deploymentGroupPath"), mergedDeploymentTargets),
),
Object.entries(_.groupBy(mergedDeploymentTargets, "deploymentGroupPath")),
),
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as R from "ramda"
import _ from "lodash"
import { DeploymentTargetConfigItem } from "../../takomo-deployment-targets-repository/index.js"
import { mergeArrays } from "../../utils/collections.js"
import { merge } from "../../utils/objects.js"
Expand Down Expand Up @@ -37,7 +37,7 @@ const mergeDeploymentTargetConfigsInternal = ([
export const mergeDeploymentTargetConfigs = (
items: ReadonlyArray<DeploymentTargetConfigItem>,
): ReadonlyArray<DeploymentTargetConfigItem> => {
const itemsByName = R.groupBy(R.prop("name"), items)
const itemsByName = _.groupBy(items, "name")
return Array.from(Object.values(itemsByName)).map(
mergeDeploymentTargetConfigsInternal,
)
Expand Down

0 comments on commit 0f14804

Please sign in to comment.