From 9839ea71f48613fc932c95dd71096846471e2f2d Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Fri, 17 Nov 2023 18:11:15 +0100 Subject: [PATCH] chore: add depcheck for cdktf-cli --- .github/workflows/pr-depcheck.yml | 2 +- packages/cdktf-cli/ambient.d.ts | 3 -- packages/cdktf-cli/build.ts | 11 ++++--- packages/cdktf-cli/package.json | 37 +++------------------ yarn.lock | 55 +++---------------------------- 5 files changed, 16 insertions(+), 92 deletions(-) diff --git a/.github/workflows/pr-depcheck.yml b/.github/workflows/pr-depcheck.yml index 6820d5aeff..8e8a3b31cd 100644 --- a/.github/workflows/pr-depcheck.yml +++ b/.github/workflows/pr-depcheck.yml @@ -18,7 +18,7 @@ jobs: matrix: package: [ cdktf, - # cdktf-cli, + cdktf-cli, # "@cdktf/hcl2cdk", "@cdktf/hcl2json", "@cdktf/provider-schema", diff --git a/packages/cdktf-cli/ambient.d.ts b/packages/cdktf-cli/ambient.d.ts index b6d6868c78..634d479256 100644 --- a/packages/cdktf-cli/ambient.d.ts +++ b/packages/cdktf-cli/ambient.d.ts @@ -1,6 +1,5 @@ // Copyright (c) HashiCorp, Inc // Licensed under the Mozilla Public License 2.0 -declare module '@skorfmann/ink-confirm-input'; declare module '@npmcli/ci-detect'; declare module 'child_process' { @@ -8,5 +7,3 @@ declare module 'child_process' { signal?: AbortSignal; } } - -declare module 'tunnel-agent'; \ No newline at end of file diff --git a/packages/cdktf-cli/build.ts b/packages/cdktf-cli/build.ts index cdbcf9eb47..b0cf1c1856 100644 --- a/packages/cdktf-cli/build.ts +++ b/packages/cdktf-cli/build.ts @@ -70,15 +70,16 @@ const nativeNodeModulesPlugin = { }, platform: "node", external: [ - "jsii", - "jsii-pacmak", + "@cdktf/hcl2cdk", "@cdktf/hcl2json", - "yargs", + "@cdktf/node-pty-prebuilt-multiarch", "cdktf", - "@cdktf/hcl2cdk", "constructs", + "jsii-pacmak", + "jsii", + "performance", + "yargs", "yoga-layout-prebuilt", - "@cdktf/node-pty-prebuilt-multiarch", ], plugins: [nativeNodeModulesPlugin], define: { diff --git a/packages/cdktf-cli/package.json b/packages/cdktf-cli/package.json index bddbcb764c..2809fa613a 100644 --- a/packages/cdktf-cli/package.json +++ b/packages/cdktf-cli/package.json @@ -41,28 +41,20 @@ "@cdktf/cli-core": "0.0.0", "@cdktf/commons": "0.0.0", "@cdktf/hcl2cdk": "0.0.0", - "@cdktf/hcl2json": "0.0.0", + "@cdktf/provider-schema": "0.0.0", "@inquirer/prompts": "^2.3.0", + "@npmcli/ci-detect": "^1.4.0", "@sentry/node": "^7.64.0", + "glob": "^8.1.0", "cdktf": "0.0.0", - "ci-info": "^3.8.0", - "codemaker": "^1.87.0", - "constructs": "^10.0.25", - "cross-spawn": "^7.0.3", - "https-proxy-agent": "^5.0.1", "ink-select-input": "^4.2.1", "ink-table": "^3.0.0", "jsii": "^5.1.10", "jsii-pacmak": "^1.87.0", - "minimatch": "^5.1.0", - "node-fetch": "^2.6.7", "pidtree": "^0.6.0", "pidusage": "^3.0.2", - "tunnel-agent": "^0.6.0", - "xml-js": "^1.6.11", "yargs": "^17.6", - "yoga-layout-prebuilt": "^1.10.0", - "zod": "^3.22.4" + "yoga-layout-prebuilt": "^1.10.0" }, "eslintConfig": { "parser": "@typescript-eslint/parser", @@ -112,36 +104,23 @@ "devDependencies": { "@cdktf/cli-core": "0.0.0", "@cdktf/provider-generator": "0.0.0", - "@skorfmann/ink-confirm-input": "^3.0.0", - "@skorfmann/terraform-cloud": "^1.15.0", "@types/archiver": "^5.3.1", "@types/cli-table": "^0.3.1", - "@types/cross-spawn": "^6.0.2", - "@types/detect-port": "^1.3.2", "@types/fs-extra": "^8.1.2", "@types/ink-spinner": "^3.0.1", "@types/jest": "^29.5.0", "@types/json-schema": "^7.0.11", - "@types/lodash.isequal": "^4.5.6", "@types/nock": "^11.1.0", "@types/node": "18.11.19", - "@types/parse-gitignore": "^1.0.0", "@types/pidusage": "^2.0.2", "@types/react": "18.0.25", "@types/semver": "^7.3.13", - "@types/stream-buffers": "^3.0.4", "@types/uuid": "^8.3.4", "@types/yargs": "17.0.13", "@typescript-eslint/eslint-plugin": "^4.33.0", "@typescript-eslint/parser": "^4.33.0", "chalk": "^4.1.2", - "chokidar": "^3.5.3", - "cli-spinners": "2.7.0", - "codemaker": "^1.87.0", - "cross-fetch": "^3.1.5", - "detect-port": "^1.5.1", "esbuild": "^0.15.15", - "esbuild-jest": "^0.5.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-react": "^7.31.11", @@ -149,28 +128,20 @@ "execa": "^5.1.1", "extract-zip": "^2.0.1", "fs-extra": "^8.1.0", - "indent-string": "^4.0.0", "ink": "^3.2.0", "ink-spinner": "^4.0.3", "ink-testing-library": "^2.1.0", - "ink-use-stdout-dimensions": "^1.0.5", "jest": "^29.5.0", "jsii-srcmak": "^0.1.951", - "lodash.isequal": "^4.5.0", - "log4js": "^6.7.0", "nock": "^13.2.9", "open": "^7.4.2", - "parse-gitignore": "^1.0.1", "pkg-up": "^3.1.0", "react": "^18.2.0", "semver": "^7.5.3", - "sscaff": "^1.2.274", - "stream-buffers": "^3.0.2", "strip-ansi": "^6.0.1", "ts-jest": "^29.0.5", "tsc-files": "^1.1.3", "typescript": "^5.0.2", - "utility-types": "^3.10.0", "uuid": "^8.3.2" } } diff --git a/yarn.lock b/yarn.lock index 6240211319..8a6109135c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2293,13 +2293,6 @@ resolved "https://registry.yarnpkg.com/@types/cli-table/-/cli-table-0.3.1.tgz#a0ae06290284f7abebb90a2ddc0187de6d22e963" integrity sha512-m3+6WWfSSl6zqoXy8uQQifbgqV7Gt6fsyWnHLgUWVtJQk75+OfUB+edSZ52YDj7leSiZtX7w1/E4w2x/Hb0orA== -"@types/cross-spawn@^6.0.2": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@types/cross-spawn/-/cross-spawn-6.0.2.tgz#168309de311cd30a2b8ae720de6475c2fbf33ac7" - integrity sha512-KuwNhp3eza+Rhu8IFI5HUXRP0LIhqH5cAjubUvGXXthh4YYBuP2ntwEX+Cz8GJoZUHlKo247wPWOfA9LYEq4cw== - dependencies: - "@types/node" "*" - "@types/cross-spawn@^6.0.5": version "6.0.5" resolved "https://registry.yarnpkg.com/@types/cross-spawn/-/cross-spawn-6.0.5.tgz#1f9a5311e0e54d6f88017ba6d564a958d1aa359f" @@ -2319,11 +2312,6 @@ dependencies: deepmerge "*" -"@types/detect-port@^1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@types/detect-port/-/detect-port-1.3.2.tgz#8c06a975e472803b931ee73740aeebd0a2eb27ae" - integrity sha512-xxgAGA2SAU4111QefXPSp5eGbDm/hW6zhvYl9IeEPZEry9F4d66QAHm5qpUXjb6IsevZV/7emAEx5MhP6O192g== - "@types/detect-port@^1.3.5": version "1.3.5" resolved "https://registry.yarnpkg.com/@types/detect-port/-/detect-port-1.3.5.tgz#deecde143245989dee0e82115f3caba5ee0ea747" @@ -2504,13 +2492,6 @@ dependencies: "@types/node" "*" -"@types/lodash.isequal@^4.5.6": - version "4.5.6" - resolved "https://registry.yarnpkg.com/@types/lodash.isequal/-/lodash.isequal-4.5.6.tgz#ff42a1b8e20caa59a97e446a77dc57db923bc02b" - integrity sha512-Ww4UGSe3DmtvLLJm2F16hDwEQSv7U0Rr8SujLUA2wHI2D2dm8kPu6Et+/y303LfjTIwSBKXB/YTUcAKpem/XEg== - dependencies: - "@types/lodash" "*" - "@types/lodash.isequal@^4.5.8": version "4.5.8" resolved "https://registry.yarnpkg.com/@types/lodash.isequal/-/lodash.isequal-4.5.8.tgz#b30bb6ff6a5f6c19b3daf389d649ac7f7a250499" @@ -2582,13 +2563,6 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== -"@types/parse-gitignore@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-gitignore/-/parse-gitignore-1.0.0.tgz#782b2b6179cef4daaf9b8bd312bfe796fdc8aa18" - integrity sha512-GCL7NIxhUzJ1M5bp68T8DtDVTbQdw93MPIIII+YASs3icSozMEG9ZjX7pp7ldRJrVgrRtJBwy+/g+aBzCIttlg== - dependencies: - "@types/node" "*" - "@types/parse-gitignore@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@types/parse-gitignore/-/parse-gitignore-1.0.2.tgz#ee82f98465166090d44fb1ff12b642f3c361b32c" @@ -2676,13 +2650,6 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== -"@types/stream-buffers@^3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@types/stream-buffers/-/stream-buffers-3.0.4.tgz#bf128182da7bc62722ca0ddf5458a9c65f76e648" - integrity sha512-qU/K1tb2yUdhXkLIATzsIPwbtX6BpZk0l3dPW6xqWyhfzzM1ECaQ/8faEnu3CNraLiQ9LHyQQPBGp7N9Fbs25w== - dependencies: - "@types/node" "*" - "@types/stream-buffers@^3.0.7": version "3.0.7" resolved "https://registry.yarnpkg.com/@types/stream-buffers/-/stream-buffers-3.0.7.tgz#0b719fa1bd2ca2cc0908205a440e5e569e1aa21e" @@ -3795,11 +3762,6 @@ ci-info@^3.2.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.6.1.tgz#7594f1c95cb7fdfddee7af95a13af7dbc67afdcf" integrity sha512-up5ggbaDqOqJ4UqLKZ2naVkyqSJQgJi5lwD6b6mM748ysrghDBX0bx/qJTUHzw7zu6Mq4gycviSF5hJnwceD8w== -ci-info@^3.8.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" - integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== - ci-info@^3.9.0: version "3.9.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" @@ -3842,16 +3804,16 @@ cli-spinners@2.6.1: resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== -cli-spinners@2.7.0, cli-spinners@^2.3.0, cli-spinners@^2.5.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.7.0.tgz#f815fd30b5f9eaac02db604c7a231ed7cb2f797a" - integrity sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw== - cli-spinners@2.9.1: version "2.9.1" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.1.tgz#9c0b9dad69a6d47cbb4333c14319b060ed395a35" integrity sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ== +cli-spinners@^2.3.0, cli-spinners@^2.5.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.7.0.tgz#f815fd30b5f9eaac02db604c7a231ed7cb2f797a" + integrity sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw== + cli-spinners@^2.8.0: version "2.9.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.0.tgz#5881d0ad96381e117bbe07ad91f2008fe6ffd8db" @@ -4357,13 +4319,6 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== -cross-fetch@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" - integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== - dependencies: - node-fetch "2.6.7" - cross-fetch@^3.1.8: version "3.1.8" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82"