From be082290b2e443603513ace6db40d5a2d4c06876 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 30 Aug 2024 14:13:49 -0400 Subject: [PATCH 01/11] ci: upgrades outdated nuget installer task --- .azure-pipelines/ci-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 277200dc9d..6dc9012172 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -154,10 +154,10 @@ extends: version: 8.x # Install the nuget tool. - - task: NuGetToolInstaller@0 - displayName: "Use NuGet >=6.1.0" + - task: NuGetToolInstaller@1 + displayName: "Use NuGet >=6.11.0" inputs: - versionSpec: ">=6.1.0" + versionSpec: ">=6.11.0" checkLatest: true - pwsh: $(Build.SourcesDirectory)/scripts/get-prerelease-version.ps1 -currentBranch $(Build.SourceBranch) -previewBranch ${{ parameters.previewBranch }} -excludeHeadingDash From ae0f8daba7e796792a54e38a9d5265c32109efbc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 08:30:52 +0000 Subject: [PATCH 02/11] chore(deps-dev): bump @types/node in /it/typescript Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.5.1 to 22.5.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- it/typescript/package-lock.json | 8 ++++---- it/typescript/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/it/typescript/package-lock.json b/it/typescript/package-lock.json index 906b3a78cf..4d43797108 100644 --- a/it/typescript/package-lock.json +++ b/it/typescript/package-lock.json @@ -23,7 +23,7 @@ "devDependencies": { "@es-exec/esbuild-plugin-start": "^0.0.5", "@stylistic/eslint-plugin-ts": "^2.7.1", - "@types/node": "^22.5.1", + "@types/node": "^22.5.2", "@typescript-eslint/eslint-plugin": "^8.3.0", "@typescript-eslint/parser": "^8.3.0", "esbuild": "^0.23.1", @@ -938,9 +938,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "22.5.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.1.tgz", - "integrity": "sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw==", + "version": "22.5.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.2.tgz", + "integrity": "sha512-acJsPTEqYqulZS/Yp/S3GgeE6GZ0qYODUR8aVr/DkhHQ8l9nd4j5x1/ZJy9/gHrRlFMqkO6i0I3E27Alu4jjPg==", "dev": true, "dependencies": { "undici-types": "~6.19.2" diff --git a/it/typescript/package.json b/it/typescript/package.json index 832164a45c..7046fa78d1 100644 --- a/it/typescript/package.json +++ b/it/typescript/package.json @@ -20,7 +20,7 @@ "devDependencies": { "@es-exec/esbuild-plugin-start": "^0.0.5", "@stylistic/eslint-plugin-ts": "^2.7.1", - "@types/node": "^22.5.1", + "@types/node": "^22.5.2", "@typescript-eslint/eslint-plugin": "^8.3.0", "@typescript-eslint/parser": "^8.3.0", "esbuild": "^0.23.1", From 8b4e82c1e79ba8e1affb789771df83565d67ed3a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 08:41:42 +0000 Subject: [PATCH 03/11] chore(deps): bump Microsoft.OpenApi.Readers and Microsoft.OpenApi Bumps [Microsoft.OpenApi.Readers](https://github.com/Microsoft/OpenAPI.NET) and [Microsoft.OpenApi](https://github.com/Microsoft/OpenAPI.NET). These dependencies needed to be updated together. Updates `Microsoft.OpenApi.Readers` from 1.6.18 to 1.6.19 - [Release notes](https://github.com/Microsoft/OpenAPI.NET/releases) - [Commits](https://github.com/Microsoft/OpenAPI.NET/compare/1.6.18...1.6.19) Updates `Microsoft.OpenApi` from 1.6.18 to 1.6.19 - [Release notes](https://github.com/Microsoft/OpenAPI.NET/releases) - [Commits](https://github.com/Microsoft/OpenAPI.NET/compare/1.6.18...1.6.19) --- updated-dependencies: - dependency-name: Microsoft.OpenApi.Readers dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: Microsoft.OpenApi dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- src/Kiota.Builder/Kiota.Builder.csproj | 4 ++-- src/kiota/kiota.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Kiota.Builder/Kiota.Builder.csproj b/src/Kiota.Builder/Kiota.Builder.csproj index ac1bc23035..be0ed2a65c 100644 --- a/src/Kiota.Builder/Kiota.Builder.csproj +++ b/src/Kiota.Builder/Kiota.Builder.csproj @@ -44,9 +44,9 @@ - + - + diff --git a/src/kiota/kiota.csproj b/src/kiota/kiota.csproj index 4a4ebe6808..8ced68f9c7 100644 --- a/src/kiota/kiota.csproj +++ b/src/kiota/kiota.csproj @@ -48,7 +48,7 @@ - + From 74cc6352ec584e8d10a1f22d0ede7e4730f027a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 08:42:18 +0000 Subject: [PATCH 04/11] chore(deps): bump YamlDotNet from 16.0.0 to 16.1.0 Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 16.0.0 to 16.1.0. - [Release notes](https://github.com/aaubry/YamlDotNet/releases) - [Commits](https://github.com/aaubry/YamlDotNet/compare/v16.0.0...v16.1.0) --- updated-dependencies: - dependency-name: YamlDotNet dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- src/Kiota.Builder/Kiota.Builder.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Kiota.Builder/Kiota.Builder.csproj b/src/Kiota.Builder/Kiota.Builder.csproj index ac1bc23035..fd14ebd89d 100644 --- a/src/Kiota.Builder/Kiota.Builder.csproj +++ b/src/Kiota.Builder/Kiota.Builder.csproj @@ -50,7 +50,7 @@ - + From 9ab6d9ac49cff76cfe5374a51534228f306f3bed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 08:43:09 +0000 Subject: [PATCH 05/11] chore(deps-dev): bump pylint from 3.2.6 to 3.2.7 in /it/python Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.2.6 to 3.2.7. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.2.6...v3.2.7) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- it/python/requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it/python/requirements-dev.txt b/it/python/requirements-dev.txt index e5ede76a74..5db3fa1b23 100644 --- a/it/python/requirements-dev.txt +++ b/it/python/requirements-dev.txt @@ -40,7 +40,7 @@ platformdirs==4.2.2 ; python_version >= '3.7' pluggy==1.5.0 ; python_version >= '3.7' -pylint==3.2.6 +pylint==3.2.7 pytest==8.3.2 From 7d0ce5445f674186b340bb744a05230cf6e92ee1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 08:43:23 +0000 Subject: [PATCH 06/11] chore(deps-dev): bump yarl from 1.9.4 to 1.9.7 in /it/python Bumps [yarl](https://github.com/aio-libs/yarl) from 1.9.4 to 1.9.7. - [Release notes](https://github.com/aio-libs/yarl/releases) - [Changelog](https://github.com/aio-libs/yarl/blob/master/CHANGES.rst) - [Commits](https://github.com/aio-libs/yarl/compare/v1.9.4...v1.9.7) --- updated-dependencies: - dependency-name: yarl dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- it/python/requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it/python/requirements-dev.txt b/it/python/requirements-dev.txt index e5ede76a74..047d7d02d3 100644 --- a/it/python/requirements-dev.txt +++ b/it/python/requirements-dev.txt @@ -136,5 +136,5 @@ sniffio==1.3.1 ; python_version >= '3.7' uritemplate==4.1.1 ; python_version >= '3.6' -yarl==1.9.4 ; python_version >= '3.7' +yarl==1.9.7 ; python_version >= '3.7' From 861b3f0fe2ea147937e5ef1bd2c5474ac8da2cf6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 13:38:56 +0000 Subject: [PATCH 07/11] chore(deps-dev): bump @stylistic/eslint-plugin-ts Bumps the eslint group in /it/typescript with 1 update: [@stylistic/eslint-plugin-ts](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin-ts). Updates `@stylistic/eslint-plugin-ts` from 2.7.1 to 2.7.2 - [Release notes](https://github.com/eslint-stylistic/eslint-stylistic/releases) - [Changelog](https://github.com/eslint-stylistic/eslint-stylistic/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint-stylistic/eslint-stylistic/commits/v2.7.2/packages/eslint-plugin-ts) --- updated-dependencies: - dependency-name: "@stylistic/eslint-plugin-ts" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: eslint ... Signed-off-by: dependabot[bot] --- it/typescript/package-lock.json | 8 ++++---- it/typescript/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/it/typescript/package-lock.json b/it/typescript/package-lock.json index 4d43797108..20053ad9fe 100644 --- a/it/typescript/package-lock.json +++ b/it/typescript/package-lock.json @@ -22,7 +22,7 @@ }, "devDependencies": { "@es-exec/esbuild-plugin-start": "^0.0.5", - "@stylistic/eslint-plugin-ts": "^2.7.1", + "@stylistic/eslint-plugin-ts": "^2.7.2", "@types/node": "^22.5.2", "@typescript-eslint/eslint-plugin": "^8.3.0", "@typescript-eslint/parser": "^8.3.0", @@ -886,9 +886,9 @@ "integrity": "sha512-35k/Nn+wlqkOf9AxIlhOA19mndrUMDspRuV3lO/9IgqKk0W7b8LwuWup5bGt4wZ1sCZij/lDTQMTY9WKTKrusg==" }, "node_modules/@stylistic/eslint-plugin-ts": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-2.7.1.tgz", - "integrity": "sha512-pjqpqQ++xYAKvjsKJXUeLrbrkySkv2uT8BN/XRZHvZinb6XL4Dv2o3zHypKdmMANoZiAANwvLYcKoAmETVbxGw==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-2.7.2.tgz", + "integrity": "sha512-uf3hmqWLK1upUnTmUSn4XDvNu1o6b1nY+xdema8dGGY+zH663V+0cHN3xqexDuQ8do1f0wV3hChkfmz3jWC4Uw==", "dev": true, "dependencies": { "@types/eslint": "^9.6.1", diff --git a/it/typescript/package.json b/it/typescript/package.json index 7046fa78d1..502879dff8 100644 --- a/it/typescript/package.json +++ b/it/typescript/package.json @@ -19,7 +19,7 @@ "prettier": "./.prettierrc.json", "devDependencies": { "@es-exec/esbuild-plugin-start": "^0.0.5", - "@stylistic/eslint-plugin-ts": "^2.7.1", + "@stylistic/eslint-plugin-ts": "^2.7.2", "@types/node": "^22.5.2", "@typescript-eslint/eslint-plugin": "^8.3.0", "@typescript-eslint/parser": "^8.3.0", From 5327fc709ab48fec6f7b72e4f6b47d3c911a2f72 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 08:19:40 +0000 Subject: [PATCH 08/11] chore(deps-dev): bump the eslint group in /it/typescript with 2 updates Bumps the eslint group in /it/typescript with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 8.3.0 to 8.4.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.4.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.3.0 to 8.4.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.4.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] --- it/typescript/package-lock.json | 88 ++++++++++++++++----------------- it/typescript/package.json | 4 +- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/it/typescript/package-lock.json b/it/typescript/package-lock.json index 20053ad9fe..40ab6f072c 100644 --- a/it/typescript/package-lock.json +++ b/it/typescript/package-lock.json @@ -24,8 +24,8 @@ "@es-exec/esbuild-plugin-start": "^0.0.5", "@stylistic/eslint-plugin-ts": "^2.7.2", "@types/node": "^22.5.2", - "@typescript-eslint/eslint-plugin": "^8.3.0", - "@typescript-eslint/parser": "^8.3.0", + "@typescript-eslint/eslint-plugin": "^8.4.0", + "@typescript-eslint/parser": "^8.4.0", "esbuild": "^0.23.1", "eslint": "^9.9.1", "eslint-config-prettier": "^9.1.0", @@ -947,16 +947,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.3.0.tgz", - "integrity": "sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.4.0.tgz", + "integrity": "sha512-rg8LGdv7ri3oAlenMACk9e+AR4wUV0yrrG+XKsGKOK0EVgeEDqurkXMPILG2836fW4ibokTB5v4b6Z9+GYQDEw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.3.0", - "@typescript-eslint/type-utils": "8.3.0", - "@typescript-eslint/utils": "8.3.0", - "@typescript-eslint/visitor-keys": "8.3.0", + "@typescript-eslint/scope-manager": "8.4.0", + "@typescript-eslint/type-utils": "8.4.0", + "@typescript-eslint/utils": "8.4.0", + "@typescript-eslint/visitor-keys": "8.4.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -980,15 +980,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.3.0.tgz", - "integrity": "sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.4.0.tgz", + "integrity": "sha512-NHgWmKSgJk5K9N16GIhQ4jSobBoJwrmURaLErad0qlLjrpP5bECYg+wxVTGlGZmJbU03jj/dfnb6V9bw+5icsA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.3.0", - "@typescript-eslint/types": "8.3.0", - "@typescript-eslint/typescript-estree": "8.3.0", - "@typescript-eslint/visitor-keys": "8.3.0", + "@typescript-eslint/scope-manager": "8.4.0", + "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/typescript-estree": "8.4.0", + "@typescript-eslint/visitor-keys": "8.4.0", "debug": "^4.3.4" }, "engines": { @@ -1008,13 +1008,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.3.0.tgz", - "integrity": "sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.4.0.tgz", + "integrity": "sha512-n2jFxLeY0JmKfUqy3P70rs6vdoPjHK8P/w+zJcV3fk0b0BwRXC/zxRTEnAsgYT7MwdQDt/ZEbtdzdVC+hcpF0A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.3.0", - "@typescript-eslint/visitor-keys": "8.3.0" + "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/visitor-keys": "8.4.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1025,13 +1025,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.3.0.tgz", - "integrity": "sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.4.0.tgz", + "integrity": "sha512-pu2PAmNrl9KX6TtirVOrbLPLwDmASpZhK/XU7WvoKoCUkdtq9zF7qQ7gna0GBZFN0hci0vHaSusiL2WpsQk37A==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.3.0", - "@typescript-eslint/utils": "8.3.0", + "@typescript-eslint/typescript-estree": "8.4.0", + "@typescript-eslint/utils": "8.4.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -1049,9 +1049,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.3.0.tgz", - "integrity": "sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.4.0.tgz", + "integrity": "sha512-T1RB3KQdskh9t3v/qv7niK6P8yvn7ja1mS7QK7XfRVL6wtZ8/mFs/FHf4fKvTA0rKnqnYxl/uHFNbnEt0phgbw==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1062,13 +1062,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.3.0.tgz", - "integrity": "sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.4.0.tgz", + "integrity": "sha512-kJ2OIP4dQw5gdI4uXsaxUZHRwWAGpREJ9Zq6D5L0BweyOrWsL6Sz0YcAZGWhvKnH7fm1J5YFE1JrQL0c9dd53A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.3.0", - "@typescript-eslint/visitor-keys": "8.3.0", + "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/visitor-keys": "8.4.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1114,15 +1114,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.3.0.tgz", - "integrity": "sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.4.0.tgz", + "integrity": "sha512-swULW8n1IKLjRAgciCkTCafyTHHfwVQFt8DovmaF69sKbOxTSFMmIZaSHjqO9i/RV0wIblaawhzvtva8Nmm7lQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.3.0", - "@typescript-eslint/types": "8.3.0", - "@typescript-eslint/typescript-estree": "8.3.0" + "@typescript-eslint/scope-manager": "8.4.0", + "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/typescript-estree": "8.4.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1136,12 +1136,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.3.0.tgz", - "integrity": "sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.4.0.tgz", + "integrity": "sha512-zTQD6WLNTre1hj5wp09nBIDiOc2U5r/qmzo7wxPn4ZgAjHql09EofqhF9WF+fZHzL5aCyaIpPcT2hyxl73kr9A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.3.0", + "@typescript-eslint/types": "8.4.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { diff --git a/it/typescript/package.json b/it/typescript/package.json index 502879dff8..25641419f0 100644 --- a/it/typescript/package.json +++ b/it/typescript/package.json @@ -21,8 +21,8 @@ "@es-exec/esbuild-plugin-start": "^0.0.5", "@stylistic/eslint-plugin-ts": "^2.7.2", "@types/node": "^22.5.2", - "@typescript-eslint/eslint-plugin": "^8.3.0", - "@typescript-eslint/parser": "^8.3.0", + "@typescript-eslint/eslint-plugin": "^8.4.0", + "@typescript-eslint/parser": "^8.4.0", "esbuild": "^0.23.1", "eslint": "^9.9.1", "eslint-config-prettier": "^9.1.0", From 4bb500a45f94ea6c22da8c10d304707023c342ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 08:41:18 +0000 Subject: [PATCH 09/11] chore(deps): bump moq from 4.20.70 to 4.20.71 Bumps [moq](https://github.com/moq/moq) from 4.20.70 to 4.20.71. - [Release notes](https://github.com/moq/moq/releases) - [Changelog](https://github.com/devlooped/moq/blob/main/changelog.md) - [Commits](https://github.com/moq/moq/compare/v4.20.70...v4.20.71) --- updated-dependencies: - dependency-name: moq dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- tests/Kiota.Builder.Tests/Kiota.Builder.Tests.csproj | 2 +- tests/Kiota.Tests/Kiota.Tests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Kiota.Builder.Tests/Kiota.Builder.Tests.csproj b/tests/Kiota.Builder.Tests/Kiota.Builder.Tests.csproj index b3fc9acafa..27f319ca7c 100644 --- a/tests/Kiota.Builder.Tests/Kiota.Builder.Tests.csproj +++ b/tests/Kiota.Builder.Tests/Kiota.Builder.Tests.csproj @@ -18,7 +18,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Kiota.Tests/Kiota.Tests.csproj b/tests/Kiota.Tests/Kiota.Tests.csproj index 702c9592d1..7b021178fd 100644 --- a/tests/Kiota.Tests/Kiota.Tests.csproj +++ b/tests/Kiota.Tests/Kiota.Tests.csproj @@ -21,7 +21,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + From f43713e30c4f89ce94dc848ec8f83c79c01f5bd7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 08:54:14 +0000 Subject: [PATCH 10/11] chore(deps-dev): bump the eslint group Bumps the eslint group in /vscode/microsoft-kiota with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 8.3.0 to 8.4.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.4.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.3.0 to 8.4.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.4.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] --- vscode/microsoft-kiota/package-lock.json | 88 ++++++++++++------------ vscode/microsoft-kiota/package.json | 4 +- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/vscode/microsoft-kiota/package-lock.json b/vscode/microsoft-kiota/package-lock.json index 39ce18689c..d75dcab660 100644 --- a/vscode/microsoft-kiota/package-lock.json +++ b/vscode/microsoft-kiota/package-lock.json @@ -21,8 +21,8 @@ "@types/mocha": "^10.0.7", "@types/node": "22.x", "@types/vscode": "^1.92.0", - "@typescript-eslint/eslint-plugin": "^8.3.0", - "@typescript-eslint/parser": "^8.3.0", + "@typescript-eslint/eslint-plugin": "^8.4.0", + "@typescript-eslint/parser": "^8.4.0", "@vscode/test-electron": "^2.4.1", "eslint": "^9.9.1", "glob": "^11.0.0", @@ -535,16 +535,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.3.0.tgz", - "integrity": "sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.4.0.tgz", + "integrity": "sha512-rg8LGdv7ri3oAlenMACk9e+AR4wUV0yrrG+XKsGKOK0EVgeEDqurkXMPILG2836fW4ibokTB5v4b6Z9+GYQDEw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.3.0", - "@typescript-eslint/type-utils": "8.3.0", - "@typescript-eslint/utils": "8.3.0", - "@typescript-eslint/visitor-keys": "8.3.0", + "@typescript-eslint/scope-manager": "8.4.0", + "@typescript-eslint/type-utils": "8.4.0", + "@typescript-eslint/utils": "8.4.0", + "@typescript-eslint/visitor-keys": "8.4.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -568,15 +568,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.3.0.tgz", - "integrity": "sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.4.0.tgz", + "integrity": "sha512-NHgWmKSgJk5K9N16GIhQ4jSobBoJwrmURaLErad0qlLjrpP5bECYg+wxVTGlGZmJbU03jj/dfnb6V9bw+5icsA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.3.0", - "@typescript-eslint/types": "8.3.0", - "@typescript-eslint/typescript-estree": "8.3.0", - "@typescript-eslint/visitor-keys": "8.3.0", + "@typescript-eslint/scope-manager": "8.4.0", + "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/typescript-estree": "8.4.0", + "@typescript-eslint/visitor-keys": "8.4.0", "debug": "^4.3.4" }, "engines": { @@ -596,13 +596,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.3.0.tgz", - "integrity": "sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.4.0.tgz", + "integrity": "sha512-n2jFxLeY0JmKfUqy3P70rs6vdoPjHK8P/w+zJcV3fk0b0BwRXC/zxRTEnAsgYT7MwdQDt/ZEbtdzdVC+hcpF0A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.3.0", - "@typescript-eslint/visitor-keys": "8.3.0" + "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/visitor-keys": "8.4.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -613,13 +613,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.3.0.tgz", - "integrity": "sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.4.0.tgz", + "integrity": "sha512-pu2PAmNrl9KX6TtirVOrbLPLwDmASpZhK/XU7WvoKoCUkdtq9zF7qQ7gna0GBZFN0hci0vHaSusiL2WpsQk37A==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.3.0", - "@typescript-eslint/utils": "8.3.0", + "@typescript-eslint/typescript-estree": "8.4.0", + "@typescript-eslint/utils": "8.4.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -637,9 +637,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.3.0.tgz", - "integrity": "sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.4.0.tgz", + "integrity": "sha512-T1RB3KQdskh9t3v/qv7niK6P8yvn7ja1mS7QK7XfRVL6wtZ8/mFs/FHf4fKvTA0rKnqnYxl/uHFNbnEt0phgbw==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -650,13 +650,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.3.0.tgz", - "integrity": "sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.4.0.tgz", + "integrity": "sha512-kJ2OIP4dQw5gdI4uXsaxUZHRwWAGpREJ9Zq6D5L0BweyOrWsL6Sz0YcAZGWhvKnH7fm1J5YFE1JrQL0c9dd53A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.3.0", - "@typescript-eslint/visitor-keys": "8.3.0", + "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/visitor-keys": "8.4.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -702,15 +702,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.3.0.tgz", - "integrity": "sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.4.0.tgz", + "integrity": "sha512-swULW8n1IKLjRAgciCkTCafyTHHfwVQFt8DovmaF69sKbOxTSFMmIZaSHjqO9i/RV0wIblaawhzvtva8Nmm7lQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.3.0", - "@typescript-eslint/types": "8.3.0", - "@typescript-eslint/typescript-estree": "8.3.0" + "@typescript-eslint/scope-manager": "8.4.0", + "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/typescript-estree": "8.4.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -724,12 +724,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.3.0.tgz", - "integrity": "sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.4.0.tgz", + "integrity": "sha512-zTQD6WLNTre1hj5wp09nBIDiOc2U5r/qmzo7wxPn4ZgAjHql09EofqhF9WF+fZHzL5aCyaIpPcT2hyxl73kr9A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.3.0", + "@typescript-eslint/types": "8.4.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { diff --git a/vscode/microsoft-kiota/package.json b/vscode/microsoft-kiota/package.json index e2a368f018..5733280fdc 100644 --- a/vscode/microsoft-kiota/package.json +++ b/vscode/microsoft-kiota/package.json @@ -464,8 +464,8 @@ "@types/mocha": "^10.0.7", "@types/node": "22.x", "@types/vscode": "^1.92.0", - "@typescript-eslint/eslint-plugin": "^8.3.0", - "@typescript-eslint/parser": "^8.3.0", + "@typescript-eslint/eslint-plugin": "^8.4.0", + "@typescript-eslint/parser": "^8.4.0", "@vscode/test-electron": "^2.4.1", "eslint": "^9.9.1", "glob": "^11.0.0", From ba708a6544a330648809d3d2576fcc517c40c760 Mon Sep 17 00:00:00 2001 From: Charles Wahome Date: Tue, 3 Sep 2024 14:21:43 +0300 Subject: [PATCH 11/11] Task: Use a temporary folder (#5299) --- vscode/microsoft-kiota/src/extension.ts | 19 +++-- vscode/microsoft-kiota/src/steps.ts | 69 ++++++++++--------- .../src/utilities/temporary-folder.ts | 33 +++++++++ 3 files changed, 77 insertions(+), 44 deletions(-) create mode 100644 vscode/microsoft-kiota/src/utilities/temporary-folder.ts diff --git a/vscode/microsoft-kiota/src/extension.ts b/vscode/microsoft-kiota/src/extension.ts index cf86cb190d..dafe671129 100644 --- a/vscode/microsoft-kiota/src/extension.ts +++ b/vscode/microsoft-kiota/src/extension.ts @@ -145,9 +145,9 @@ export async function activate( let languagesInformation = await getLanguageInformation(context); let availableStateInfo: Partial; - if(Object.keys(deepLinkParams).length > 0){ - if (!deepLinkParams["name"] && openApiTreeProvider.apiTitle ){ - deepLinkParams["name"] = getSanitizedString(openApiTreeProvider.apiTitle); + if (Object.keys(deepLinkParams).length > 0) { + if (!deepLinkParams.name && openApiTreeProvider.apiTitle) { + deepLinkParams.name = getSanitizedString(openApiTreeProvider.apiTitle); } availableStateInfo = transformToGenerationconfig(deepLinkParams); } else { @@ -212,8 +212,7 @@ export async function activate( 'fx-extension.createprojectfromkiota', [ pathOfSpec, - pathPluginManifest, - true + pathPluginManifest ] ); } catch (error) { @@ -248,12 +247,12 @@ export async function activate( ) => { // set deeplink params if exists if (Object.keys(searchParams).length > 0) { - let errorsArray: string []; + let errorsArray: string[]; [deepLinkParams, errorsArray] = validateDeepLinkQueryParams(searchParams); - reporter.sendTelemetryEvent("DeepLinked searchOrOpenApiDescription", { - "searchParameters": JSON.stringify(searchParams), - "validationErrors": errorsArray.join(", ") - }); + reporter.sendTelemetryEvent("DeepLinked searchOrOpenApiDescription", { + "searchParameters": JSON.stringify(searchParams), + "validationErrors": errorsArray.join(", ") + }); } // proceed to enable loading of openapi description diff --git a/vscode/microsoft-kiota/src/steps.ts b/vscode/microsoft-kiota/src/steps.ts index 3a6a661f62..3a7667de70 100644 --- a/vscode/microsoft-kiota/src/steps.ts +++ b/vscode/microsoft-kiota/src/steps.ts @@ -3,6 +3,7 @@ import * as vscode from 'vscode'; import { Disposable, l10n, OpenDialogOptions, QuickInput, QuickInputButton, QuickInputButtons, QuickPickItem, Uri, window, workspace } from 'vscode'; import { allGenerationLanguages, generationLanguageToString, KiotaSearchResultItem, LanguagesInformation, maturityLevelToString } from './kiotaInterop'; import { findAppPackageDirectory, getWorkspaceJsonDirectory } from './util'; +import { createTemporaryFolder, isTemporaryDirectory } from './utilities/temporary-folder'; export async function filterSteps(existingFilter: string, filterCallback: (searchQuery: string) => void) { const state = {} as Partial; @@ -116,37 +117,37 @@ export async function searchSteps(searchCallBack: (searchQuery: string) => Thena return state; } -export function transformToGenerationconfig(deepLinkParams: Record) - : Partial -{ +export function transformToGenerationconfig(deepLinkParams: Record) + : Partial { const generationConfig: Partial = {}; - if (deepLinkParams.kind === "client") - { - generationConfig["generationType"] = "client"; - generationConfig["clientClassName"] = deepLinkParams.name; - generationConfig["language"] = deepLinkParams.language; + if (deepLinkParams.kind === "client") { + generationConfig.generationType = "client"; + generationConfig.clientClassName = deepLinkParams.name; + generationConfig.language = deepLinkParams.language; } - else if (deepLinkParams.kind === "plugin") - { - generationConfig["pluginName"] = deepLinkParams.name; - switch(deepLinkParams.type){ + else if (deepLinkParams.kind === "plugin") { + generationConfig.pluginName = deepLinkParams.name; + switch (deepLinkParams.type) { case "apiplugin": - generationConfig["generationType"] = "plugin"; - generationConfig["pluginTypes"] = ["ApiPlugin"]; + generationConfig.generationType = "plugin"; + generationConfig.pluginTypes = ["ApiPlugin"]; break; case "openai": - generationConfig["generationType"] = "plugin"; - generationConfig["pluginTypes"] = ['OpenAI']; + generationConfig.generationType = "plugin"; + generationConfig.pluginTypes = ['OpenAI']; break; case "apimanifest": - generationConfig["generationType"] = "apimanifest"; + generationConfig.generationType = "apimanifest"; break; - } + } + generationConfig.outputPath = + (deepLinkParams.source && deepLinkParams.source?.toLowerCase() === 'ttk') + ? createTemporaryFolder() + : undefined; } return generationConfig; } - export async function generateSteps(existingConfiguration: Partial, languagesInformation?: LanguagesInformation) { const state = { ...existingConfiguration } as Partial; if (existingConfiguration.generationType && existingConfiguration.clientClassName && existingConfiguration.clientNamespaceName && existingConfiguration.outputPath && existingConfiguration.language && @@ -155,7 +156,7 @@ export async function generateSteps(existingConfiguration: Partial 0; @@ -184,8 +185,8 @@ export async function generateSteps(existingConfiguration: Partial) { - if (!state.generationType){ + if (!state.generationType) { const items = [l10n.t('Generate an API client'), l10n.t('Generate a plugin'), l10n.t('Generate an API manifest')]; const option = await input.showQuickPick({ title: l10n.t('What do you want to generate?'), step: 1, totalSteps: 1, placeholder: l10n.t('Select an option'), - items: items.map(x => ({label: x})), + items: items.map(x => ({ label: x })), validate: validateIsNotEmpty, shouldResume: shouldResume }); - if(option.label === l10n.t('Generate an API client')) { + if (option.label === l10n.t('Generate an API client')) { state.generationType = "client"; } - else if(option.label === l10n.t('Generate a plugin')) { + else if (option.label === l10n.t('Generate a plugin')) { state.generationType = "plugin"; } - else if(option.label === l10n.t('Generate an API manifest')) { + else if (option.label === l10n.t('Generate an API manifest')) { state.generationType = "apimanifest"; } } let nextStep = getNextStepForGenerationType(state.generationType?.toString() || ''); return (input: MultiStepInput) => nextStep(input, state); - } + } async function inputClientClassName(input: MultiStepInput, state: Partial) { if (!state.clientClassName) { state.clientClassName = await input.showInputBox({ @@ -312,7 +313,7 @@ export async function generateSteps(existingConfiguration: Partial) { - if (!state.pluginName){ + if (!state.pluginName) { state.pluginName = await input.showInputBox({ title: `${l10n.t('Create a new plugin')} - ${l10n.t('plugin name')}`, step: step++, @@ -325,11 +326,11 @@ export async function generateSteps(existingConfiguration: Partial inputPluginType(input, state); - } + return (input: MultiStepInput) => inputPluginType(input, state); + } async function inputPluginType(input: MultiStepInput, state: Partial) { if (!state.pluginTypes) { - const items = ['API Plugin','Open AI'].map(x => ({ label: x})as QuickPickItem); + const items = ['API Plugin', 'Open AI'].map(x => ({ label: x }) as QuickPickItem); const pluginTypes = await input.showQuickPick({ title: l10n.t('Choose a plugin type'), step: step++, @@ -344,7 +345,7 @@ export async function generateSteps(existingConfiguration: Partial inputPluginOutputPath(input, state); } async function inputPluginOutputPath(input: MultiStepInput, state: Partial) { - while (true) { + while (!state.outputPath) { const selectedOption = await input.showQuickPick({ title: `${l10n.t('Create a new plugin')} - ${l10n.t('output directory')}`, step: 3, @@ -382,7 +383,7 @@ export async function generateSteps(existingConfiguration: Partial) { - if (!state.pluginName){ + if (!state.pluginName) { state.pluginName = await input.showInputBox({ title: `${l10n.t('Create a new manifest')} - ${l10n.t('manifest name')}`, step: step++, diff --git a/vscode/microsoft-kiota/src/utilities/temporary-folder.ts b/vscode/microsoft-kiota/src/utilities/temporary-folder.ts new file mode 100644 index 0000000000..50ba33dba5 --- /dev/null +++ b/vscode/microsoft-kiota/src/utilities/temporary-folder.ts @@ -0,0 +1,33 @@ +import * as fs from 'fs'; +import * as os from 'os'; +import * as path from 'path'; + +export function createTemporaryFolder(): string | undefined { + const uniqueFolderIdentifier = `kiota-${Date.now()}`; + const temporaryDirectory = os.tmpdir(); + const temporaryDirectoryPath = path.join(temporaryDirectory, uniqueFolderIdentifier); + + try { + createFolderInFileSystem(temporaryDirectoryPath); + return path.resolve(temporaryDirectoryPath); + } catch (error) { + return undefined; + } +} + +function createFolderInFileSystem(directoryPath: string) { + const exists = fs.existsSync(directoryPath); + if (exists) { + return createTemporaryFolder(); + } + + try { + fs.mkdirSync(directoryPath); + } catch (err: unknown) { + throw new Error(`Error creating temporary directory: ${(err as Error).message}`); + } +} + +export function isTemporaryDirectory(path: string): boolean { + return path.startsWith(os.tmpdir()); +} \ No newline at end of file