diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.ar.json b/vscode/microsoft-kiota/l10n/bundle.l10n.ar.json index 441b9e14fb..62293e9155 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.ar.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.ar.json @@ -70,5 +70,12 @@ "Generating manifest...": "", "Generating plugin...": "", "Re-generating client...": "", - "Re-generating plugin...": "" + "Re-generating plugin...": "", + "Please migrate your API clients to Kiota workspace.":"", + "Remind me later":"", + "Migrating your API clients...":"", + "Migration completed, but no changes were detected.":"", + "Migration failed":"", + "Api clients migrated successfully!":"", + "Could not determine the workspace folder.": "لا يمكن تحديد مجلد مساحة العمل." } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.cs.json b/vscode/microsoft-kiota/l10n/bundle.l10n.cs.json index 108bae1484..399db84bfc 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.cs.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.cs.json @@ -70,5 +70,12 @@ "Generating manifest...": "Generování manifestu...", "Generating plugin...": "Generování pluginu...", "Re-generating client...": "Opětovné generování klienta...", - "Re-generating plugin...": "Opětovné generování pluginu..." + "Re-generating plugin...": "Opětovné generování pluginu...", + "Please migrate your API clients to Kiota workspace.":"", + "Remind me later":"", + "Migrating your API clients...":"", + "Migration completed, but no changes were detected.":"", + "Migration failed":"", + "Api clients migrated successfully!":"", + "Could not determine the workspace folder.": "Nepodařilo se určit složku pracovního prostoru." } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.es.json b/vscode/microsoft-kiota/l10n/bundle.l10n.es.json index 417be3b3d3..92f9942590 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.es.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.es.json @@ -70,5 +70,12 @@ "Generating manifest...": "Generando manifesto...", "Generating plugin...": "Generando plugin...", "Re-generating client...": "Re-generando cliente...", - "Re-generating plugin...": "Re-generando plugin..." + "Re-generating plugin...": "Re-generando plugin...", + "Please migrate your API clients to Kiota workspace.":"", + "Remind me later":"", + "Migrating your API clients...":"", + "Migration completed, but no changes were detected.":"", + "Migration failed":"", + "Api clients migrated successfully!":"", + "Could not determine the workspace folder.": "No se pudo determinar la carpeta de espacio de trabajo." } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.fr.json b/vscode/microsoft-kiota/l10n/bundle.l10n.fr.json index e639041a90..68cb0b95a6 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.fr.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.fr.json @@ -70,5 +70,12 @@ "Generating manifest...": "Génération du manifeste...", "Generating plugin...": "Génération du composant...", "Re-generating client...": "Rafraichissement du client...", - "Re-generating plugin...": "Refraichissement du composant..." + "Re-generating plugin...": "Refraichissement du composant...", + "Please migrate your API clients to Kiota workspace.":"", + "Remind me later":"", + "Migrating your API clients...":"", + "Migration completed, but no changes were detected.":"", + "Migration failed":"", + "Api clients migrated successfully!":"", + "Could not determine the workspace folder.": "Impossible de déterminer le dossier de l'espace de travail." } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.it.json b/vscode/microsoft-kiota/l10n/bundle.l10n.it.json index b10609f433..e4c3c0e301 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.it.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.it.json @@ -70,5 +70,12 @@ "Generating manifest...": "Generando il manifest...", "Generating plugin...": "Generando il plugin...", "Re-generating client...": "Ri-generando il client...", - "Re-generating plugin...": "Ri-generando il plugin..." + "Re-generating plugin...": "Ri-generando il plugin...", + "Please migrate your API clients to Kiota workspace.":"", + "Remind me later":"", + "Migrating your API clients...":"", + "Migration completed, but no changes were detected.":"", + "Migration failed":"", + "Api clients migrated successfully!":"", + "Could not determine the workspace folder.": "Impossibile determinare la cartella di lavoro." } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.ja.json b/vscode/microsoft-kiota/l10n/bundle.l10n.ja.json index e248530e02..a2f3b17c96 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.ja.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.ja.json @@ -70,5 +70,12 @@ "Generating manifest...": "", "Generating plugin...": "", "Re-generating client...": "", - "Re-generating plugin...": "" + "Re-generating plugin...": "", + "Please migrate your API clients to Kiota workspace.":"", + "Remind me later":"", + "Migrating your API clients...":"", + "Migration completed, but no changes were detected.":"", + "Migration failed":"", + "Api clients migrated successfully!":"", + "Could not determine the workspace folder.": "ワークスペースフォルダを特定できませんでした。" } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.pl.json b/vscode/microsoft-kiota/l10n/bundle.l10n.pl.json index 828b872e19..df0f952569 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.pl.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.pl.json @@ -70,5 +70,12 @@ "Generating manifest...": "Generowanie manifestu...", "Generating plugin...": "Generowanie wtyczki", "Re-generating client...": "Ponowne generowanie klienta...", - "Re-generating plugin...": "Ponowne generowanie wtyczki..." + "Re-generating plugin...": "Ponowne generowanie wtyczki...", + "Please migrate your API clients to Kiota workspace.":"", + "Remind me later":"", + "Migrating your API clients...":"", + "Migration completed, but no changes were detected.":"", + "Migration failed":"", + "Api clients migrated successfully!":"", + "Could not determine the workspace folder.": "Nie można określić folderu przestrzeni roboczej." } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.pt.json b/vscode/microsoft-kiota/l10n/bundle.l10n.pt.json index 7f9a96542f..f7e2ce2e15 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.pt.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.pt.json @@ -70,5 +70,12 @@ "Generating manifest...": "Gerando o manifesto...", "Generating plugin...": "Gerando o plugin...", "Re-generating client...": "Regerando o cliente...", - "Re-generating plugin...": "Regerando o plugin..." + "Re-generating plugin...": "Regerando o plugin...", + "Please migrate your API clients to Kiota workspace.":"", + "Remind me later":"", + "Migrating your API clients...":"", + "Migration completed, but no changes were detected.":"", + "Migration failed":"", + "Api clients migrated successfully!":"", + "Could not determine the workspace folder.": "Não foi possível determinar a pasta de trabalho." } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.ru.json b/vscode/microsoft-kiota/l10n/bundle.l10n.ru.json index 031b80012c..9b5e5c3145 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.ru.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.ru.json @@ -69,5 +69,12 @@ "Generating manifest...": "Генерация манифеста...", "Generating plugin...": "Генерация плагина...", "Re-generating client...": "Перегенерация клиента...", - "Re-generating plugin...": "Перегенерация плагина..." + "Re-generating plugin...": "Перегенерация плагина...", + "Please migrate your API clients to Kiota workspace.":"", + "Remind me later":"", + "Migrating your API clients...":"", + "Migration completed, but no changes were detected.":"", + "Migration failed":"", + "Api clients migrated successfully!":"", + "Could not determine the workspace folder.": "Не удалось определить папку рабочего пространства." } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.sw.json b/vscode/microsoft-kiota/l10n/bundle.l10n.sw.json index 1d1613baa8..e8f8e1e75a 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.sw.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.sw.json @@ -70,5 +70,12 @@ "Generating manifest...": "Inatengeneza dhariri..", "Generating plugin...": "Inatengeneza programu-jalizi...", "Re-generating client...": "Inatengeneza mteja upya...", - "Re-generating plugin...": "Inatengeneza programu-jalizi upya ..." + "Re-generating plugin...": "Inatengeneza programu-jalizi upya ...", + "Please migrate your API clients to Kiota workspace.":"", + "Remind me later":"", + "Migrating your API clients...":"", + "Migration completed, but no changes were detected.":"", + "Migration failed":"", + "Api client migrateds successfully!":"", + "Could not determine the workspace folder.": "Haiwezekani kubaini folda ya kazi." } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.tr.json b/vscode/microsoft-kiota/l10n/bundle.l10n.tr.json index 1db954277f..c252995721 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.tr.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.tr.json @@ -70,5 +70,12 @@ "Generating manifest...": "", "Generating plugin...": "", "Re-generating client...": "", - "Re-generating plugin...": "" + "Re-generating plugin...": "", + "Please migrate your API clients to Kiota workspace.":"", + "Remind me later":"", + "Migrating your API clients...":"", + "Migration completed, but no changes were detected.":"", + "Migration failed":"", + "Api clients migrated successfully!":"", + "Could not determine the workspace folder.": "" } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.zh-cn.json b/vscode/microsoft-kiota/l10n/bundle.l10n.zh-cn.json index ffc8d9e7ec..fffd320503 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.zh-cn.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.zh-cn.json @@ -69,5 +69,12 @@ "Generating manifest...": "正在生成清单...", "Generating plugin...": "正在生成插件...", "Re-generating client...": "重新生成客户端...", - "Re-generating plugin...": "正在重新生成插件..." + "Re-generating plugin...": "正在重新生成插件...", + "Please migrate your API clients to Kiota workspace.":"", + "Remind me later":"", + "Migrating your API clients...":"", + "Migration completed, but no changes were detected.":"", + "Migration failed":"", + "Api clients migrated successfully!":"", + "Could not determine the workspace folder.": "无法确定工作区文件夹" } diff --git a/vscode/microsoft-kiota/package.json b/vscode/microsoft-kiota/package.json index d8b1eb9652..1c95006df8 100644 --- a/vscode/microsoft-kiota/package.json +++ b/vscode/microsoft-kiota/package.json @@ -234,6 +234,11 @@ "command": "kiota.selectLock", "group": "2_kiota@1", "when": "resourceLangId == json && resourceFilename =~ /workspace\\.json$/" + }, + { + "command": "kiota.migrateFromLockFile", + "when": "resourceExtname == .json && resourceFilename == kiota-lock.json", + "group": "navigation" } ], "view/title": [ @@ -315,6 +320,13 @@ "command": "kiota.openApiExplorer.removeAllFromSelectedEndpoints", "when": "false" } + ], + "editor/context": [ + { + "command": "kiota.migrateFromLockFile", + "when": "resourceExtname == .json && resourceFilename == kiota-lock.json", + "group": "navigation" + } ] }, "commands": [ @@ -413,7 +425,12 @@ { "command": "kiota.workspace.refresh", "title": "%kiota.openApiExplorer.refresh.title%" + }, + { + "command": "kiota.migrateFromLockFile", + "title": "%kiota.migrateClients.title%" } + ], "languages": [ { diff --git a/vscode/microsoft-kiota/package.nls.ar.json b/vscode/microsoft-kiota/package.nls.ar.json index 8f80d7c77a..fc42890243 100644 --- a/vscode/microsoft-kiota/package.nls.ar.json +++ b/vscode/microsoft-kiota/package.nls.ar.json @@ -28,5 +28,6 @@ "kiota.generate.includeAdditionalData.description": "سيتم تضمين خاصية 'Additional Data' للنماذج", "kiota.workspace.name": "", "kiota.openApiExplorer.regenerateButton.title": "", - "kiota.openApiExplorer.editPaths.title": "" + "kiota.openApiExplorer.editPaths.title": "", + "kiota.migrateClients.title": "" } diff --git a/vscode/microsoft-kiota/package.nls.cs.json b/vscode/microsoft-kiota/package.nls.cs.json index eebfa55d3d..f010aeb6f0 100644 --- a/vscode/microsoft-kiota/package.nls.cs.json +++ b/vscode/microsoft-kiota/package.nls.cs.json @@ -28,5 +28,6 @@ "kiota.generate.includeAdditionalData.description": "Bude zahrnuta vlastnost 'AdditionalData' pro modely", "kiota.workspace.name": "Můj pracovní prostor", "kiota.openApiExplorer.regenerateButton.title": "Znovu vygenerovat", - "kiota.openApiExplorer.editPaths.title": "Upravit cesty" + "kiota.openApiExplorer.editPaths.title": "Upravit cesty", + "kiota.migrateClients.title": "Migrovat API klienty" } diff --git a/vscode/microsoft-kiota/package.nls.es.json b/vscode/microsoft-kiota/package.nls.es.json index 60a2d1fdaa..2265e8f1a2 100644 --- a/vscode/microsoft-kiota/package.nls.es.json +++ b/vscode/microsoft-kiota/package.nls.es.json @@ -28,5 +28,7 @@ "kiota.generate.includeAdditionalData.description": "Incluirá la propiedad 'AdditionalData' para modelos.", "kiota.workspace.name": "Mi espacio de trabajo", "kiota.openApiExplorer.regenerateButton.title": "Re-generar", - "kiota.openApiExplorer.editPaths.title": "Editar ruta de acceso" + "kiota.openApiExplorer.editPaths.title": "Editar ruta de acceso", + "kiota.openApiExplorer.refresh.title": "Actualizar", + "kiota.migrateClients.title": "Migrar clientes del API" } diff --git a/vscode/microsoft-kiota/package.nls.fr.json b/vscode/microsoft-kiota/package.nls.fr.json index 6fc8376876..a21a66347a 100644 --- a/vscode/microsoft-kiota/package.nls.fr.json +++ b/vscode/microsoft-kiota/package.nls.fr.json @@ -28,5 +28,7 @@ "kiota.generate.includeAdditionalData.description": "Incluera la propriété 'AdditionalData' pour les modèles générés.", "kiota.workspace.name": "Mon espace de travail", "kiota.openApiExplorer.regenerateButton.title": "Générer de nouveau", - "kiota.openApiExplorer.editPaths.title": "Modifier les chemins" + "kiota.openApiExplorer.editPaths.title": "Modifier les chemins", + "kiota.openApiExplorer.refresh.title": "Rafraîchir", + "kiota.migrateClients.title": "Migrer les clients d'API" } diff --git a/vscode/microsoft-kiota/package.nls.it.json b/vscode/microsoft-kiota/package.nls.it.json index ac68bf7ec4..7f7155d26a 100644 --- a/vscode/microsoft-kiota/package.nls.it.json +++ b/vscode/microsoft-kiota/package.nls.it.json @@ -28,5 +28,7 @@ "kiota.generate.includeAdditionalData.description": "Includerà la proprietà 'AdditionalData' per i modelli", "kiota.workspace.name": "Il mio spazio di lavoro", "kiota.openApiExplorer.regenerateButton.title": "Rigener", - "kiota.openApiExplorer.editPaths.title": "Modifica i percorsi" + "kiota.openApiExplorer.editPaths.title": "Modifica i percorsi", + "kiota.openApiExplorer.refresh.title": "Aggiorna", + "kiota.migrateClients.title": "Migra i client API" } diff --git a/vscode/microsoft-kiota/package.nls.ja.json b/vscode/microsoft-kiota/package.nls.ja.json index 20e515b42a..9a6efa3282 100644 --- a/vscode/microsoft-kiota/package.nls.ja.json +++ b/vscode/microsoft-kiota/package.nls.ja.json @@ -26,7 +26,9 @@ "kiota.generate.deserializer.description": "デシリアライザの完全修飾クラス名", "kiota.generate.structuredMimeTypes.description": "構造化データモデル生成に使用するMIMEタイプと設定(RFC 9110のAcceptヘッダー表記)", "kiota.generate.includeAdditionalData.description": "モデルのための“AdditionalData”プロパティを含める", - "kiota.workspace.name": "My Workspace", - "kiota.openApiExplorer.regenerateButton.title": "Re-generate", - "kiota.openApiExplorer.editPaths.title": "Edit paths" + "kiota.workspace.name": "ワークスペース", + "kiota.openApiExplorer.regenerateButton.title": "再生成", + "kiota.openApiExplorer.editPaths.title": "パスを編集", + "kiota.openApiExplorer.refresh.title": "リフレッシュ", + "kiota.migrateClients.title": "APIクライアントを移行" } diff --git a/vscode/microsoft-kiota/package.nls.json b/vscode/microsoft-kiota/package.nls.json index 00e54d3cb5..5c7baf619a 100644 --- a/vscode/microsoft-kiota/package.nls.json +++ b/vscode/microsoft-kiota/package.nls.json @@ -30,5 +30,6 @@ "kiota.workspace.name": "My Workspace", "kiota.openApiExplorer.regenerateButton.title": "Re-generate", "kiota.openApiExplorer.editPaths.title": "Edit paths", - "kiota.openApiExplorer.refresh.title": "Refresh" + "kiota.openApiExplorer.refresh.title": "Refresh", + "kiota.migrateClients.title": "Migrate API clients" } diff --git a/vscode/microsoft-kiota/package.nls.pl.json b/vscode/microsoft-kiota/package.nls.pl.json index db57de062a..91b4870fb8 100644 --- a/vscode/microsoft-kiota/package.nls.pl.json +++ b/vscode/microsoft-kiota/package.nls.pl.json @@ -27,7 +27,9 @@ "kiota.generate.deserializer.description": "Pełne nazwy klas dla deserializatorów", "kiota.generate.structuredMimeTypes.description": "Typy MIME i preferencje do użycia dla generacji modeli danych strukturalnych. Zgodnie z notacją nagłówka Accept RFC9110.", "kiota.generate.includeAdditionalData.description": "Doda właściwości 'AdditionalData' do modeli", - "kiota.workspace.name": "My Workspace", - "kiota.openApiExplorer.regenerateButton.title": "Re-generate", - "kiota.openApiExplorer.editPaths.title": "Edit paths" + "kiota.workspace.name": "Moja przestrzeń robocza", + "kiota.openApiExplorer.regenerateButton.title": "Ponownie wygeneruj", + "kiota.openApiExplorer.editPaths.title": "Edytuj ścieżki", + "kiota.openApiExplorer.refresh.title": "Odśwież", + "kiota.migrateClients.title": "Migruj klientów API" } diff --git a/vscode/microsoft-kiota/package.nls.pt.json b/vscode/microsoft-kiota/package.nls.pt.json index 8128a1e643..76f1b780b8 100644 --- a/vscode/microsoft-kiota/package.nls.pt.json +++ b/vscode/microsoft-kiota/package.nls.pt.json @@ -28,5 +28,7 @@ "kiota.generate.includeAdditionalData.description": "Será incluído a propriedade 'AdditionalData' para modelos", "kiota.workspace.name": "Meu espaço de trabalho", "kiota.openApiExplorer.regenerateButton.title": "Gerar novamente", - "kiota.openApiExplorer.editPaths.title": "Modificar endpoints" + "kiota.openApiExplorer.editPaths.title": "Modificar endpoints", + "kiota.openApiExplorer.refresh.title": "Atualizar", + "kiota.migrateClients.title": "Migrar clientes de API" } diff --git a/vscode/microsoft-kiota/package.nls.ru.json b/vscode/microsoft-kiota/package.nls.ru.json index e5bde6083a..5e4db32ccc 100644 --- a/vscode/microsoft-kiota/package.nls.ru.json +++ b/vscode/microsoft-kiota/package.nls.ru.json @@ -16,5 +16,19 @@ "kiota.openApiExplorer.openDescription.title": "Открыть описание API", "kiota.searchLock.title": "Искать файл блокировки", "kiota.openApiExplorer.filterDescription.title": "Отфильтровать описание API", - "kiota.openApiExplorer.openDocumentationPage.title": "Открыть страницу документации" + "kiota.openApiExplorer.openDocumentationPage.title": "Открыть страницу документации", + "kiota.generate.backingStore.description": "Включить резервное хранилище для моделей", + "kiota.generate.excludeBackwardCompatible.description": "Исключить совместимые с предыдущими версиями и устаревшие активы из сгенерированного результата. Следует использовать для новых клиентов", + "kiota.cleanOutput.description": "Удалить все файлы из каталога вывода перед созданием файлов кода", + "kiota.generate.disabledValidationRules.description": "Правила проверки описания OpenAPI для отключения: \nDivergentResponseSchema\nGetWithBody\nInconsistentTypeFormatPair\nKnownAndNotSupportedFormats\nMissingDiscriminator\nMultipleServerEntries\nNoContentWithBody\nNoServerEntry\nUrlFormEncodedComplex\nValidationRuleSetExtensions\nAll", + "kiota.clearCache.description": "Очистить любые кэшированные данные", + "kiota.generate.serializer.description": "Полностью квалифицированные имена классов для сериализаторов", + "kiota.generate.deserializer.description": "Полностью квалифицированные имена классов для десериализаторов", + "kiota.generate.structuredMimeTypes.description": "Типы MIME и предпочтения для использования при создании структурированных моделей данных. Согласно нотации заголовка Accept RFC9110.", + "kiota.generate.includeAdditionalData.description": "Будет включено свойство 'Дополнительные данные' для моделей", + "kiota.workspace.name": "Мое рабочее пространство", + "kiota.openApiExplorer.regenerateButton.title": "Пересоздать", + "kiota.openApiExplorer.editPaths.title": "Изменить пути", + "kiota.openApiExplorer.refresh.title": "Обновить", + "kiota.migrateClients.title": "Перенести API-клиенты" } diff --git a/vscode/microsoft-kiota/package.nls.sw.json b/vscode/microsoft-kiota/package.nls.sw.json index 254f2975c7..b4946bacb8 100644 --- a/vscode/microsoft-kiota/package.nls.sw.json +++ b/vscode/microsoft-kiota/package.nls.sw.json @@ -20,5 +20,7 @@ "kiota.openApiExplorer.openFile.title": "fungua faili", "kiota.workspace.name": "Mahali pa kazi yangu", "kiota.openApiExplorer.regenerateButton.title": "Kuunda upya", - "kiota.openApiExplorer.editPaths.title": "Hariri pointi za mwisho" + "kiota.openApiExplorer.editPaths.title": "Hariri pointi za mwisho", + "kiota.openApiExplorer.refresh.title": "Sasisha", + "kiota.migrateClients.title": "Hamisha wateja wa API" } diff --git a/vscode/microsoft-kiota/package.nls.tr.json b/vscode/microsoft-kiota/package.nls.tr.json index 04006690ea..2956d11157 100644 --- a/vscode/microsoft-kiota/package.nls.tr.json +++ b/vscode/microsoft-kiota/package.nls.tr.json @@ -26,7 +26,9 @@ "kiota.generate.deserializer.description": "Seri durumdan çıkarma işlemleri için tam nitelikli sınıf adları", "kiota.generate.structuredMimeTypes.description": "Yapılandırılmış veri modeli oluşturmak için kullanılacak MIME türleri ve tercihi. RFC9110'a göre Başlık gösterimini kabul et.", "kiota.generate.includeAdditionalData.description": "Modeller için 'AdditionalData' özelliğini içerecektir", - "kiota.workspace.name": "My Workspace", - "kiota.openApiExplorer.regenerateButton.title": "Re-generate", - "kiota.openApiExplorer.editPaths.title": "Edit paths" + "kiota.workspace.name": "Çalışma Alanım", + "kiota.openApiExplorer.regenerateButton.title": "Yeniden oluştur", + "kiota.openApiExplorer.editPaths.title": "Yolları düzenle", + "kiota.openApiExplorer.refresh.title": "Yenile", + "kiota.migrateClients.title": "API istemcilerini taşı" } diff --git a/vscode/microsoft-kiota/src/constants.ts b/vscode/microsoft-kiota/src/constants.ts index c604466f7e..45c775da13 100644 --- a/vscode/microsoft-kiota/src/constants.ts +++ b/vscode/microsoft-kiota/src/constants.ts @@ -4,6 +4,7 @@ export const statusBarCommandId = `${extensionId}.status`; export const treeViewId = `${extensionId}.openApiExplorer`; export const treeViewFocusCommand = `${treeViewId}${focusCommandId}`; export const dependenciesInfo = `${extensionId}.dependenciesInfo`; +export const KIOTA_LOCK_FILE = "kiota-lock.json"; export const KIOTA_WORKSPACE_FILE = "workspace.json"; export const KIOTA_DIRECTORY = '.kiota'; export const CLIENTS = "clients"; @@ -11,4 +12,5 @@ export const PLUGINS = "plugins"; export const CLIENT = "client"; export const PLUGIN = "plugin"; export const APIMANIFEST = "apimanifest"; +export const REMIND_ME_LATER_FLAG = 'remindMeLater'; diff --git a/vscode/microsoft-kiota/src/extension.ts b/vscode/microsoft-kiota/src/extension.ts index 45576ea78b..c7cdc97884 100644 --- a/vscode/microsoft-kiota/src/extension.ts +++ b/vscode/microsoft-kiota/src/extension.ts @@ -28,8 +28,9 @@ import { ExtensionSettings, getExtensionSettings } from "./extensionSettings"; import { loadTreeView } from "./workspaceTreeProvider"; import { generatePlugin } from "./generatePlugin"; import { CodeLensProvider } from "./codelensProvider"; -import { KIOTA_DIRECTORY, KIOTA_WORKSPACE_FILE, dependenciesInfo, extensionId, statusBarCommandId, treeViewFocusCommand, treeViewId } from "./constants"; -import { getWorkspaceJsonDirectory, getWorkspaceJsonPath, isClientType, isPluginType, updateTreeViewIcons } from "./util"; +import { KIOTA_WORKSPACE_FILE, dependenciesInfo, extensionId, statusBarCommandId, treeViewFocusCommand, treeViewId } from "./constants"; +import { getWorkspaceJsonDirectory, getWorkspaceJsonPath, handleMigration, isClientType, isPluginType, updateTreeViewIcons } from "./util"; +import { checkForLockFileAndPrompt } from "./migrateFromLockFile"; let kiotaStatusBarItem: vscode.StatusBarItem; let kiotaOutputChannel: vscode.LogOutputChannel; @@ -57,6 +58,7 @@ export async function activate( ); const reporter = new TelemetryReporter(context.extension.packageJSON.telemetryInstrumentationKey); await loadTreeView(context); + await checkForLockFileAndPrompt(context); let codeLensProvider = new CodeLensProvider(); context.subscriptions.push( vscode.window.registerUriHandler({ @@ -294,7 +296,17 @@ export async function activate( await regeneratePlugin(clientKey, clientObject, settings); } }), - ); + registerCommandWithTelemetry(reporter, `${extensionId}.migrateFromLockFile`, async (uri: vscode.Uri) => { + const workspaceFolder = vscode.workspace.getWorkspaceFolder(uri); + + if (!workspaceFolder) { + vscode.window.showErrorMessage(vscode.l10n.t("Could not determine the workspace folder.")); + return; + } + + await handleMigration(context, workspaceFolder); + }) +); async function generateManifestAndRefreshUI(config: Partial, settings: ExtensionSettings, outputPath: string, selectedPaths: string[]):Promise { const pluginTypes = KiotaPluginType.ApiManifest; diff --git a/vscode/microsoft-kiota/src/migrateFromLockFile.ts b/vscode/microsoft-kiota/src/migrateFromLockFile.ts index 33593b8590..9c77d8dfd1 100644 --- a/vscode/microsoft-kiota/src/migrateFromLockFile.ts +++ b/vscode/microsoft-kiota/src/migrateFromLockFile.ts @@ -1,6 +1,8 @@ -import { connectToKiota, KiotaLogEntry } from "./kiotaInterop"; +import { connectToKiota, KiotaLogEntry, LogLevel } from "./kiotaInterop"; import * as rpc from "vscode-jsonrpc/node"; import * as vscode from "vscode"; +import { KIOTA_LOCK_FILE } from "./constants"; +import { getWorkspaceJsonPath, handleMigration } from "./util"; export function migrateFromLockFile(context: vscode.ExtensionContext, lockFileDirectory: string): Promise { return connectToKiota(context, async (connection) => { @@ -13,4 +15,54 @@ export function migrateFromLockFile(context: vscode.ExtensionContext, lockFileDi ); return result; }); -}; \ No newline at end of file +}; + +export async function checkForLockFileAndPrompt(context: vscode.ExtensionContext) { + const workspaceFolders = vscode.workspace.workspaceFolders; + + if(workspaceFolders) { + const lockFile = await vscode.workspace.findFiles(`{**/${KIOTA_LOCK_FILE},${KIOTA_LOCK_FILE}}`); + + if (lockFile.length > 0) { + const result = await vscode.window.showInformationMessage( + vscode.l10n.t("Please migrate your API clients to Kiota workspace."), + vscode.l10n.t("OK"), + vscode.l10n.t("Remind me later") + ); + + if (result === vscode.l10n.t("OK")) { + await handleMigration(context, workspaceFolders![0]); + await vscode.commands.executeCommand('kiota.workspace.refresh'); + } + } + } + }; + +export function displayMigrationMessages(logEntries: KiotaLogEntry[]) { + const workspaceJsonUri = vscode.Uri.file(getWorkspaceJsonPath()); + const successEntries = logEntries.filter(entry => + entry.level === LogLevel.information && entry.message.includes("migrated successfully") + ); + + if (successEntries.length > 0) { + successEntries.forEach(entry => { + vscode.window.showInformationMessage(vscode.l10n.t("Api clients migrated successfully!")); + vscode.commands.executeCommand('kiota.workspace.refresh'); + vscode.commands.executeCommand('kiota.workspace.openWorkspaceFile', workspaceJsonUri); + }); + } else { + logEntries.forEach(entry => { + switch (entry.level) { + case LogLevel.warning: + vscode.window.showWarningMessage(vscode.l10n.t(entry.message)); + break; + case LogLevel.error: + case LogLevel.critical: + vscode.window.showErrorMessage(vscode.l10n.t(entry.message)); + break; + default: + break; + } + }); + } +} \ No newline at end of file diff --git a/vscode/microsoft-kiota/src/util.ts b/vscode/microsoft-kiota/src/util.ts index 087dc03fde..cd67dd6d35 100644 --- a/vscode/microsoft-kiota/src/util.ts +++ b/vscode/microsoft-kiota/src/util.ts @@ -2,6 +2,7 @@ import * as vscode from 'vscode'; import * as path from 'path'; import * as fs from 'fs'; import { APIMANIFEST, CLIENT, CLIENTS, KIOTA_DIRECTORY, KIOTA_WORKSPACE_FILE, PLUGIN, PLUGINS } from './constants'; +import { migrateFromLockFile, displayMigrationMessages } from './migrateFromLockFile'; const clientTypes = [CLIENT, CLIENTS]; const pluginTypes = [PLUGIN, PLUGINS, APIMANIFEST]; @@ -66,4 +67,31 @@ export function findAppPackageDirectory(directory: string): string | null { } return null; +} + +export async function handleMigration( + context: vscode.ExtensionContext, + workspaceFolder: vscode.WorkspaceFolder +): Promise { + vscode.window.withProgress({ + location: vscode.ProgressLocation.Notification, + title: vscode.l10n.t("Migrating your API clients..."), + cancellable: false + }, async (progress) => { + progress.report({ increment: 0 }); + + try { + const migrationResult = await migrateFromLockFile(context, workspaceFolder.uri.fsPath); + + progress.report({ increment: 100 }); + + if (migrationResult && migrationResult.length > 0) { + displayMigrationMessages(migrationResult); + } else { + vscode.window.showWarningMessage(vscode.l10n.t("Migration completed, but no changes were detected.")); + } + } catch (error) { + vscode.window.showErrorMessage(vscode.l10n.t(`Migration failed: ${error}`)); + } + }); } \ No newline at end of file