diff --git a/package-lock.json b/package-lock.json index c63d37d4d06..ea51c1e6eb0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,15 +13,15 @@ "@bugsnag/js": "7.25.0", "@fastify/static": "7.0.4", "@netlify/blobs": "8.1.0", - "@netlify/build": "29.58.2", + "@netlify/build": "29.58.7", "@netlify/build-info": "8.0.0", - "@netlify/config": "20.21.2", + "@netlify/config": "20.21.6", "@netlify/edge-bundler": "12.3.2", "@netlify/edge-functions": "2.11.1", "@netlify/headers-parser": "7.3.0", "@netlify/local-functions-proxy": "1.1.1", "@netlify/redirect-parser": "14.5.0", - "@netlify/zip-it-and-ship-it": "9.42.2", + "@netlify/zip-it-and-ship-it": "9.42.4", "@octokit/rest": "20.1.1", "@opentelemetry/api": "1.8.0", "ansi-escapes": "7.0.0", @@ -84,7 +84,7 @@ "maxstache": "1.0.7", "maxstache-stream": "1.0.4", "multiparty": "4.2.3", - "netlify": "13.2.1", + "netlify": "13.3.2", "netlify-redirector": "0.5.0", "node-fetch": "3.3.2", "ora": "8.1.1", @@ -683,9 +683,9 @@ } }, "node_modules/@babel/types": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.3.tgz", - "integrity": "sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.5.tgz", + "integrity": "sha512-L6mZmwFDK6Cjh1nRCLXpa6no13ZIioJDz7mdkzHv399pThrTa/k0nUlNaenOeh2kWu/iaOQYElEpKPUswUa9Vg==", "dependencies": { "@babel/helper-string-parser": "^7.25.9", "@babel/helper-validator-identifier": "^7.25.9" @@ -2247,22 +2247,22 @@ } }, "node_modules/@netlify/build": { - "version": "29.58.2", - "resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.58.2.tgz", - "integrity": "sha512-/kb5jkPifwzea26paiayiw417nqk/1Q4S1WZzjrqClEmyW9kEzJ7J3xCbpVZw7KBOCK7IaYbx+6MkiZtr7I9xQ==", + "version": "29.58.7", + "resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.58.7.tgz", + "integrity": "sha512-wBevj95fSTghY5GvZSXwquLBFvl5eenW/yZL30nWN50dKVc2w0Ip80bjiWMBFvclI/BfgpjoUUxP4zfcPvbV6A==", "dependencies": { "@bugsnag/js": "^7.0.0", "@netlify/blobs": "^7.4.0", "@netlify/cache-utils": "^5.2.0", - "@netlify/config": "^20.21.2", + "@netlify/config": "^20.21.6", "@netlify/edge-bundler": "12.3.2", "@netlify/framework-info": "^9.9.1", - "@netlify/functions-utils": "^5.3.2", + "@netlify/functions-utils": "^5.3.4", "@netlify/git-utils": "^5.2.0", "@netlify/opentelemetry-utils": "^1.3.0", "@netlify/plugins-list": "^6.80.0", "@netlify/run-utils": "^5.2.0", - "@netlify/zip-it-and-ship-it": "9.42.2", + "@netlify/zip-it-and-ship-it": "9.42.4", "@sindresorhus/slugify": "^2.0.0", "ansi-escapes": "^6.0.0", "chalk": "^5.0.0", @@ -2782,9 +2782,9 @@ } }, "node_modules/@netlify/config": { - "version": "20.21.2", - "resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.21.2.tgz", - "integrity": "sha512-W1D3yc79VU7B8L0h4iREjaCpQbudPAQTnmkNLlJhuvLDJn6SlsDiitGDvUpp+9VYAhwX5SJgYMvDGOlbWk+tMA==", + "version": "20.21.6", + "resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.21.6.tgz", + "integrity": "sha512-/QMGSp8lN04Q6iyuxE2Ku5zJjy3fvSGyBFyTQP+7BV6Ph01pCaLxL3HlsM/JeYa9torUkZeB0fQFjsGYN0MPfw==", "dependencies": { "@iarna/toml": "^2.2.5", "@netlify/headers-parser": "^7.3.0", @@ -2802,7 +2802,7 @@ "is-plain-obj": "^4.0.0", "js-yaml": "^4.0.0", "map-obj": "^5.0.0", - "netlify": "^13.2.1", + "netlify": "^13.3.2", "node-fetch": "^3.3.1", "omit.js": "^2.0.2", "p-locate": "^6.0.0", @@ -3858,11 +3858,11 @@ } }, "node_modules/@netlify/functions-utils": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.3.2.tgz", - "integrity": "sha512-IAqIA3w+a+fnDeR5GwRQY1T3f5THtFByRVbLrK79nt+CY131h9csBQQco6YsV1hSjCu8EODHDIIBfpvdBcsTzQ==", + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.3.4.tgz", + "integrity": "sha512-E2yiHrH8FSujvGGg8PvuOQ3EPRH86f7r5v8IHNigatZvldrcxeGqiEhep842B8zzTBtYXakrTb8dywp0x2O1dg==", "dependencies": { - "@netlify/zip-it-and-ship-it": "9.42.2", + "@netlify/zip-it-and-ship-it": "9.42.4", "cpy": "^9.0.0", "path-exists": "^5.0.0" }, @@ -4246,9 +4246,9 @@ } }, "node_modules/@netlify/open-api": { - "version": "2.35.0", - "resolved": "https://registry.npmjs.org/@netlify/open-api/-/open-api-2.35.0.tgz", - "integrity": "sha512-c6LpV29CKMgq6/eViItE6L2ova9UldBO9tHRvvwpJfSBgCwWaFhmiepe07E3xIW4GfTCGoWE816mNzXB/2ceZg==", + "version": "2.35.1", + "resolved": "https://registry.npmjs.org/@netlify/open-api/-/open-api-2.35.1.tgz", + "integrity": "sha512-ZtVd3J9aiZzvO/q+V37LhWYDClMotGCPW5m3sOYkg+yf1P/L6vtpNHYw1enWQFdgV5+z5Aak/RYpwGXhDIn9Kg==", "engines": { "node": ">=14" } @@ -4400,14 +4400,14 @@ } }, "node_modules/@netlify/zip-it-and-ship-it": { - "version": "9.42.2", - "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.42.2.tgz", - "integrity": "sha512-2J+Nc2XkTmcb0Q3D/Mk+wmMUS6VVyLaIyn+A/GET6sKG+FSTJkH2mzgPfCUSIfSb+yae/ll8FYyH7Ym//6F/bA==", + "version": "9.42.4", + "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.42.4.tgz", + "integrity": "sha512-Oj3c8GR52H6yWjkP5EjLRP0bxGyx8UjrB0WYWF0bzFY+nTaeMBmqtmO8eGl/jgto7Jus6NaCmHYMUmT3ybjBRA==", "dependencies": { "@babel/parser": "^7.22.5", - "@babel/types": "7.26.3", + "@babel/types": "7.26.5", "@netlify/binary-info": "^1.0.0", - "@netlify/serverless-functions-api": "^1.31.1", + "@netlify/serverless-functions-api": "^1.32.0", "@vercel/nft": "0.27.7", "archiver": "^7.0.0", "common-path-prefix": "^3.0.0", @@ -4447,9 +4447,9 @@ } }, "node_modules/@netlify/zip-it-and-ship-it/node_modules/@netlify/serverless-functions-api": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/@netlify/serverless-functions-api/-/serverless-functions-api-1.31.1.tgz", - "integrity": "sha512-SkNxzfCwctS5ETnCqJOJfZZ/jB0pTkbWEAsApHoL7HzUQGWoRM6wYf4baJAJVMTfZBQu534SbKuwRs7WDAs43A==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/@netlify/serverless-functions-api/-/serverless-functions-api-1.32.0.tgz", + "integrity": "sha512-dRKNGox2wdKb8ONoMc4mtLyUSxYvCYDFM1iyJUCb+9Nit9Azvtr8htD9D8z9bH1L4MKraHJJE756OSfLL3jduQ==", "dependencies": { "@netlify/node-cookies": "^0.1.0", "urlpattern-polyfill": "8.0.2" @@ -16856,11 +16856,11 @@ "integrity": "sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==" }, "node_modules/netlify": { - "version": "13.2.1", - "resolved": "https://registry.npmjs.org/netlify/-/netlify-13.2.1.tgz", - "integrity": "sha512-H74wp5O8Rxv1pRHSd+Ewc9pmw4ZDaH9B3C9Wtj7LB5BeE9gZwZyrXkSoSAHZlN9R5cnkI93CwBBfTaWdWy663Q==", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/netlify/-/netlify-13.3.2.tgz", + "integrity": "sha512-K340NUUCy62ikutl2/yuCi7gxEQsEm/z6U1AStT5Oy3uZ293VYZbsjUJTEFw50rsJnKyZW1Gg9BpGwNogjnNGg==", "dependencies": { - "@netlify/open-api": "^2.35.0", + "@netlify/open-api": "^2.35.1", "lodash-es": "^4.17.21", "micro-api-client": "^3.3.0", "node-fetch": "^3.0.0", @@ -23545,9 +23545,9 @@ } }, "@babel/types": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.3.tgz", - "integrity": "sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.5.tgz", + "integrity": "sha512-L6mZmwFDK6Cjh1nRCLXpa6no13ZIioJDz7mdkzHv399pThrTa/k0nUlNaenOeh2kWu/iaOQYElEpKPUswUa9Vg==", "requires": { "@babel/helper-string-parser": "^7.25.9", "@babel/helper-validator-identifier": "^7.25.9" @@ -24637,22 +24637,22 @@ "integrity": "sha512-9hIbusvAZjSGBJ42OyFC2AxsEph1LuKQahMWFcPGEIsOqIYHhMRkYA7wSUMhH7naydjNmllpcp3pJLOK4RhFaQ==" }, "@netlify/build": { - "version": "29.58.2", - "resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.58.2.tgz", - "integrity": "sha512-/kb5jkPifwzea26paiayiw417nqk/1Q4S1WZzjrqClEmyW9kEzJ7J3xCbpVZw7KBOCK7IaYbx+6MkiZtr7I9xQ==", + "version": "29.58.7", + "resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.58.7.tgz", + "integrity": "sha512-wBevj95fSTghY5GvZSXwquLBFvl5eenW/yZL30nWN50dKVc2w0Ip80bjiWMBFvclI/BfgpjoUUxP4zfcPvbV6A==", "requires": { "@bugsnag/js": "^7.0.0", "@netlify/blobs": "^7.4.0", "@netlify/cache-utils": "^5.2.0", - "@netlify/config": "^20.21.2", + "@netlify/config": "^20.21.6", "@netlify/edge-bundler": "12.3.2", "@netlify/framework-info": "^9.9.1", - "@netlify/functions-utils": "^5.3.2", + "@netlify/functions-utils": "^5.3.4", "@netlify/git-utils": "^5.2.0", "@netlify/opentelemetry-utils": "^1.3.0", "@netlify/plugins-list": "^6.80.0", "@netlify/run-utils": "^5.2.0", - "@netlify/zip-it-and-ship-it": "9.42.2", + "@netlify/zip-it-and-ship-it": "9.42.4", "@sindresorhus/slugify": "^2.0.0", "ansi-escapes": "^6.0.0", "chalk": "^5.0.0", @@ -24983,9 +24983,9 @@ } }, "@netlify/config": { - "version": "20.21.2", - "resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.21.2.tgz", - "integrity": "sha512-W1D3yc79VU7B8L0h4iREjaCpQbudPAQTnmkNLlJhuvLDJn6SlsDiitGDvUpp+9VYAhwX5SJgYMvDGOlbWk+tMA==", + "version": "20.21.6", + "resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.21.6.tgz", + "integrity": "sha512-/QMGSp8lN04Q6iyuxE2Ku5zJjy3fvSGyBFyTQP+7BV6Ph01pCaLxL3HlsM/JeYa9torUkZeB0fQFjsGYN0MPfw==", "requires": { "@iarna/toml": "^2.2.5", "@netlify/headers-parser": "^7.3.0", @@ -25003,7 +25003,7 @@ "is-plain-obj": "^4.0.0", "js-yaml": "^4.0.0", "map-obj": "^5.0.0", - "netlify": "^13.2.1", + "netlify": "^13.3.2", "node-fetch": "^3.3.1", "omit.js": "^2.0.2", "p-locate": "^6.0.0", @@ -25606,11 +25606,11 @@ } }, "@netlify/functions-utils": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.3.2.tgz", - "integrity": "sha512-IAqIA3w+a+fnDeR5GwRQY1T3f5THtFByRVbLrK79nt+CY131h9csBQQco6YsV1hSjCu8EODHDIIBfpvdBcsTzQ==", + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.3.4.tgz", + "integrity": "sha512-E2yiHrH8FSujvGGg8PvuOQ3EPRH86f7r5v8IHNigatZvldrcxeGqiEhep842B8zzTBtYXakrTb8dywp0x2O1dg==", "requires": { - "@netlify/zip-it-and-ship-it": "9.42.2", + "@netlify/zip-it-and-ship-it": "9.42.4", "cpy": "^9.0.0", "path-exists": "^5.0.0" }, @@ -25820,9 +25820,9 @@ "integrity": "sha512-OAs1xG+FfLX0LoRASpqzVntVV/RpYkgpI0VrUnw2u0Q1qiZUzcPffxRK8HF3gc4GjuhG5ahOEMJ9bswBiZPq0g==" }, "@netlify/open-api": { - "version": "2.35.0", - "resolved": "https://registry.npmjs.org/@netlify/open-api/-/open-api-2.35.0.tgz", - "integrity": "sha512-c6LpV29CKMgq6/eViItE6L2ova9UldBO9tHRvvwpJfSBgCwWaFhmiepe07E3xIW4GfTCGoWE816mNzXB/2ceZg==" + "version": "2.35.1", + "resolved": "https://registry.npmjs.org/@netlify/open-api/-/open-api-2.35.1.tgz", + "integrity": "sha512-ZtVd3J9aiZzvO/q+V37LhWYDClMotGCPW5m3sOYkg+yf1P/L6vtpNHYw1enWQFdgV5+z5Aak/RYpwGXhDIn9Kg==" }, "@netlify/opentelemetry-utils": { "version": "1.3.0", @@ -25922,14 +25922,14 @@ } }, "@netlify/zip-it-and-ship-it": { - "version": "9.42.2", - "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.42.2.tgz", - "integrity": "sha512-2J+Nc2XkTmcb0Q3D/Mk+wmMUS6VVyLaIyn+A/GET6sKG+FSTJkH2mzgPfCUSIfSb+yae/ll8FYyH7Ym//6F/bA==", + "version": "9.42.4", + "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.42.4.tgz", + "integrity": "sha512-Oj3c8GR52H6yWjkP5EjLRP0bxGyx8UjrB0WYWF0bzFY+nTaeMBmqtmO8eGl/jgto7Jus6NaCmHYMUmT3ybjBRA==", "requires": { "@babel/parser": "^7.22.5", - "@babel/types": "7.26.3", + "@babel/types": "7.26.5", "@netlify/binary-info": "^1.0.0", - "@netlify/serverless-functions-api": "^1.31.1", + "@netlify/serverless-functions-api": "^1.32.0", "@vercel/nft": "0.27.7", "archiver": "^7.0.0", "common-path-prefix": "^3.0.0", @@ -25963,9 +25963,9 @@ }, "dependencies": { "@netlify/serverless-functions-api": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/@netlify/serverless-functions-api/-/serverless-functions-api-1.31.1.tgz", - "integrity": "sha512-SkNxzfCwctS5ETnCqJOJfZZ/jB0pTkbWEAsApHoL7HzUQGWoRM6wYf4baJAJVMTfZBQu534SbKuwRs7WDAs43A==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/@netlify/serverless-functions-api/-/serverless-functions-api-1.32.0.tgz", + "integrity": "sha512-dRKNGox2wdKb8ONoMc4mtLyUSxYvCYDFM1iyJUCb+9Nit9Azvtr8htD9D8z9bH1L4MKraHJJE756OSfLL3jduQ==", "requires": { "@netlify/node-cookies": "^0.1.0", "urlpattern-polyfill": "8.0.2" @@ -34694,11 +34694,11 @@ "integrity": "sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==" }, "netlify": { - "version": "13.2.1", - "resolved": "https://registry.npmjs.org/netlify/-/netlify-13.2.1.tgz", - "integrity": "sha512-H74wp5O8Rxv1pRHSd+Ewc9pmw4ZDaH9B3C9Wtj7LB5BeE9gZwZyrXkSoSAHZlN9R5cnkI93CwBBfTaWdWy663Q==", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/netlify/-/netlify-13.3.2.tgz", + "integrity": "sha512-K340NUUCy62ikutl2/yuCi7gxEQsEm/z6U1AStT5Oy3uZ293VYZbsjUJTEFw50rsJnKyZW1Gg9BpGwNogjnNGg==", "requires": { - "@netlify/open-api": "^2.35.0", + "@netlify/open-api": "^2.35.1", "lodash-es": "^4.17.21", "micro-api-client": "^3.3.0", "node-fetch": "^3.0.0", diff --git a/package.json b/package.json index 947eecc38d5..0cbc1eeb33f 100644 --- a/package.json +++ b/package.json @@ -73,15 +73,15 @@ "@bugsnag/js": "7.25.0", "@fastify/static": "7.0.4", "@netlify/blobs": "8.1.0", - "@netlify/build": "29.58.2", + "@netlify/build": "29.58.7", "@netlify/build-info": "8.0.0", - "@netlify/config": "20.21.2", + "@netlify/config": "20.21.6", "@netlify/edge-bundler": "12.3.2", "@netlify/edge-functions": "2.11.1", "@netlify/headers-parser": "7.3.0", "@netlify/local-functions-proxy": "1.1.1", "@netlify/redirect-parser": "14.5.0", - "@netlify/zip-it-and-ship-it": "9.42.2", + "@netlify/zip-it-and-ship-it": "9.42.4", "@octokit/rest": "20.1.1", "@opentelemetry/api": "1.8.0", "ansi-escapes": "7.0.0", @@ -144,7 +144,7 @@ "maxstache": "1.0.7", "maxstache-stream": "1.0.4", "multiparty": "4.2.3", - "netlify": "13.2.1", + "netlify": "13.3.2", "netlify-redirector": "0.5.0", "node-fetch": "3.3.2", "ora": "8.1.1", diff --git a/src/commands/base-command.ts b/src/commands/base-command.ts index a369aa9c42a..d79749d3702 100644 --- a/src/commands/base-command.ts +++ b/src/commands/base-command.ts @@ -575,7 +575,7 @@ export default class BaseCommand extends Command { const needsFeatureFlagsToResolveConfig = COMMANDS_WITH_FEATURE_FLAGS.has(actionCommand.name()) if (api.accessToken && !flags.offline && needsFeatureFlagsToResolveConfig && actionCommand.siteId) { try { - const site = await api.getSite({ siteId: actionCommand.siteId, feature_flags: 'cli' }) + const site = await (api as any).getSite({ siteId: actionCommand.siteId, feature_flags: 'cli' }) actionCommand.featureFlags = site.feature_flags actionCommand.accountId = site.account_id } catch { diff --git a/src/commands/logs/build.ts b/src/commands/logs/build.ts index d16fdf43bd4..36563aa55ce 100644 --- a/src/commands/logs/build.ts +++ b/src/commands/logs/build.ts @@ -63,7 +63,7 @@ export const logsBuild = async (options: OptionValues, command: BaseCommand) => })), }) - deploy = deploys.find((dep: any) => dep.id === result) + deploy = deploys.find((dep: any) => dep.id === result) || deploy } const { id } = deploy diff --git a/src/commands/logs/functions.ts b/src/commands/logs/functions.ts index dc84063bee2..1e34b1b0160 100644 --- a/src/commands/logs/functions.ts +++ b/src/commands/logs/functions.ts @@ -38,7 +38,8 @@ export const logsFunction = async (functionName: string | undefined, options: Op const levelsToPrint = options.level || LOG_LEVELS_LIST - const { functions = [] } = await client.searchSiteFunctions({ siteId }) + // TODO: Update type once the open api spec is updated https://open-api.netlify.com/#tag/function/operation/searchSiteFunctions + const { functions = [] } = (await client.searchSiteFunctions({ siteId: siteId as string })) as any if (functions.length === 0) { log(`No functions found for the site`) diff --git a/src/commands/sites/sites-create-template.ts b/src/commands/sites/sites-create-template.ts index 1b232912aa3..d154a06492c 100644 --- a/src/commands/sites/sites-create-template.ts +++ b/src/commands/sites/sites-create-template.ts @@ -87,7 +87,7 @@ export const sitesCreateTemplate = async (repository: string, options: OptionVal } try { - const sites: SiteInfo[] = await api.listSites({ name: siteName, filter: 'all' }) + const sites = await api.listSites({ name: siteName, filter: 'all' }) const siteFoundByName = sites.find((filteredSite) => filteredSite.name === siteName) if (siteFoundByName) { log('A site with that name already exists on your account') @@ -133,7 +133,8 @@ export const sitesCreateTemplate = async (repository: string, options: OptionVal } try { - site = await api.createSiteInTeam({ + // TODO: Update type once the open api spec is updated https://open-api.netlify.com/#tag/site/operation/createSiteInTeam + site = await (api as any).createSiteInTeam({ accountSlug, body: { repo: { diff --git a/src/commands/sites/sites-create.ts b/src/commands/sites/sites-create.ts index 98cc594124f..f4265f70e49 100644 --- a/src/commands/sites/sites-create.ts +++ b/src/commands/sites/sites-create.ts @@ -63,7 +63,7 @@ export const sitesCreate = async (options: OptionValues, command: BaseCommand) = } try { site = await api.createSiteInTeam({ - accountSlug, + accountSlug: accountSlug as string, body, }) } catch (error_) { diff --git a/src/commands/sites/sites-delete.ts b/src/commands/sites/sites-delete.ts index 512fab816ff..cfa9da11111 100644 --- a/src/commands/sites/sites-delete.ts +++ b/src/commands/sites/sites-delete.ts @@ -32,7 +32,7 @@ export const sitesDelete = async (siteId: string, options: OptionValues, command /* Verify the user wants to delete the site */ if (noForce) { - log(`${chalk.redBright('Warning')}: You are about to permanently delete "${chalk.bold(siteData.name)}"`) + log(`${chalk.redBright('Warning')}: You are about to permanently delete "${chalk.bold(siteData?.name)}"`) log(` Verify this siteID "${siteId}" supplied is correct and proceed.`) log(' To skip this prompt, pass a --force flag to the delete command') log() @@ -41,7 +41,7 @@ export const sitesDelete = async (siteId: string, options: OptionValues, command const { wantsToDelete } = await inquirer.prompt({ type: 'confirm', name: 'wantsToDelete', - message: `WARNING: Are you sure you want to delete the "${siteData.name}" site?`, + message: `WARNING: Are you sure you want to delete the "${siteData?.name}" site?`, default: false, }) log() diff --git a/src/commands/status/status-hooks.ts b/src/commands/status/status-hooks.ts index d4d0a9f2475..f5e9752e7fe 100644 --- a/src/commands/status/status-hooks.ts +++ b/src/commands/status/status-hooks.ts @@ -14,7 +14,7 @@ export const statusHooks = async (options: OptionValues, command: BaseCommand) = site: siteInfo.name, hooks: {}, } - // @ts-expect-error TS(7006) FIXME: Parameter 'hook' implicitly has an 'any' type. + ntlHooks.forEach((hook) => { // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message data.hooks[hook.id] = { diff --git a/src/commands/status/status.ts b/src/commands/status/status.ts index 09c5a4f1816..f7ff628c906 100644 --- a/src/commands/status/status.ts +++ b/src/commands/status/status.ts @@ -37,8 +37,8 @@ export const status = async (options: OptionValues, command: BaseCommand) => { const ghuser = command.netlify.globalConfig.get(`users.${current}.auth.github.user`) const accountData = { - Name: user.full_name, - Email: user.email, + Name: user?.full_name, + Email: user?.email, GitHub: ghuser, } const teamsData = {} diff --git a/src/commands/watch/watch.ts b/src/commands/watch/watch.ts index 2bf7a016878..8bbd3ba0837 100644 --- a/src/commands/watch/watch.ts +++ b/src/commands/watch/watch.ts @@ -101,7 +101,7 @@ export const watch = async (options: OptionValues, command: BaseCommand) => { const noActiveBuilds = await waitForBuildFinish(client, siteId, spinner) - const siteData = await client.getSite({ siteId }) + const siteData = await client.getSite({ siteId: siteId as string }) const message = chalk.cyanBright.bold.underline(noActiveBuilds ? 'Last build' : 'Deploy complete') log() diff --git a/src/utils/command-helpers.ts b/src/utils/command-helpers.ts index b24ee3d4f77..744901349cc 100644 --- a/src/utils/command-helpers.ts +++ b/src/utils/command-helpers.ts @@ -101,7 +101,7 @@ export const pollForToken = async ({ ticket, }: { api: NetlifyAPI - ticket: { id: string; client_id: string; authorized: boolean; created_at: string } + ticket: { id?: string; client_id?: string; authorized?: boolean; created_at?: string } }) => { const spinner = startSpinner({ text: 'Waiting for authorization...' }) try { diff --git a/src/utils/telemetry/telemetry.ts b/src/utils/telemetry/telemetry.ts index 0db710dcbe1..57f211442d0 100644 --- a/src/utils/telemetry/telemetry.ts +++ b/src/utils/telemetry/telemetry.ts @@ -88,7 +88,7 @@ export async function track( return send('track', defaultData) } -export async function identify(payload: { name: string; email: string; userId: string }) { +export async function identify(payload: { name?: string; email?: string; userId?: string }) { if (isCI) { return }