From ced06e1ca8213f781dddba809d266744551b305c Mon Sep 17 00:00:00 2001 From: "S.Gromov" Date: Thu, 2 Apr 2026 22:35:09 +0300 Subject: [PATCH] =?UTF-8?q?refactor:=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B8?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20=D1=80=D0=B0?= =?UTF-8?q?=D1=81=D1=88=D0=B8=D1=80=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B2=20tem?= =?UTF-8?q?plateFileGenerator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - идентификатор расширения переименован с templateForge на templateFileGenerator - обновлены команды, настройки и конфигурация - обновлены ссылки на репозиторий - версия обновлена до 1.0.2 - обновлены локализации (en, ru) - обновлена документация (README, CHANGELOG) --- .github/README.md | 8 ++--- CHANGELOG.md | 2 +- README.md | 8 ++--- package-lock.json | 62 ++++++++++++++++++------------------ package.json | 46 +++++++++++++------------- package.nls.json | 14 ++++---- package.nls.ru.json | 14 ++++---- src/core/config.ts | 10 +++--- src/extension.ts | 4 +-- src/webview/configWebview.ts | 4 +-- 10 files changed, 86 insertions(+), 86 deletions(-) diff --git a/.github/README.md b/.github/README.md index ad2ce42..1ffcdb0 100644 --- a/.github/README.md +++ b/.github/README.md @@ -79,7 +79,7 @@ UserProfile/ | Ключ | Описание | По умолчанию | |---|---|---| -| `templateForge.templatesPath` | Путь к шаблонам | `.templates` | -| `templateForge.overwriteFiles` | Перезапись существующих файлов | `false` | -| `templateForge.inputMode` | Режим ввода: `webview` или `inputBox` | `webview` | -| `templateForge.language` | Язык интерфейса (`ru` / `en`) | `en` | +| `templateFileGenerator.templatesPath` | Путь к шаблонам | `.templates` | +| `templateFileGenerator.overwriteFiles` | Перезапись существующих файлов | `false` | +| `templateFileGenerator.inputMode` | Режим ввода: `webview` или `inputBox` | `webview` | +| `templateFileGenerator.language` | Язык интерфейса (`ru` / `en`) | `en` | diff --git a/CHANGELOG.md b/CHANGELOG.md index 44c4ee3..095078c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -All notable changes to the "templateforge" extension will be documented in this file. +All notable changes to the "templateFileGenerator" extension will be documented in this file. Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. diff --git a/README.md b/README.md index ad2ce42..1ffcdb0 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ UserProfile/ | Ключ | Описание | По умолчанию | |---|---|---| -| `templateForge.templatesPath` | Путь к шаблонам | `.templates` | -| `templateForge.overwriteFiles` | Перезапись существующих файлов | `false` | -| `templateForge.inputMode` | Режим ввода: `webview` или `inputBox` | `webview` | -| `templateForge.language` | Язык интерфейса (`ru` / `en`) | `en` | +| `templateFileGenerator.templatesPath` | Путь к шаблонам | `.templates` | +| `templateFileGenerator.overwriteFiles` | Перезапись существующих файлов | `false` | +| `templateFileGenerator.inputMode` | Режим ввода: `webview` или `inputBox` | `webview` | +| `templateFileGenerator.language` | Язык интерфейса (`ru` / `en`) | `en` | diff --git a/package-lock.json b/package-lock.json index b2c6f6e..16b927f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "vscode-templateforge", - "version": "1.0.1", + "name": "vscode-templateFileGenerator", + "version": "1.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "vscode-templateforge", - "version": "1.0.1", + "name": "vscode-templateFileGenerator", + "version": "1.0.2", "dependencies": { "@gromlab/create": "^0.2.0" }, @@ -37,7 +37,7 @@ "license": "BSD-3-Clause" }, "node_modules/@azu/style-format": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/@azu/style-format/-/style-format-1.0.1.tgz", "integrity": "sha512-AHcTojlNBdD/3/KxIKlg8sxIWHfOtQszLvOpagLTO+bjC3u7SAszu1lf//u7JJC50aUSH+BVWDD/KvaA6Gfn5g==", "dev": true, @@ -484,7 +484,7 @@ } }, "node_modules/@gromlab/create/node_modules/is-interactive": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", "license": "MIT", @@ -600,7 +600,7 @@ } }, "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, @@ -826,7 +826,7 @@ } }, "node_modules/@secretlint/config-loader/node_modules/json-schema-traverse": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true, @@ -2119,7 +2119,7 @@ } }, "node_modules/ajv-formats/node_modules/json-schema-traverse": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true, @@ -2234,7 +2234,7 @@ } }, "node_modules/archy": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", "license": "MIT" @@ -2365,7 +2365,7 @@ } }, "node_modules/boolbase": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true, @@ -2568,7 +2568,7 @@ } }, "node_modules/buffer-equal-constant-time": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", "dev": true, @@ -3332,7 +3332,7 @@ } }, "node_modules/delayed-stream": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, @@ -3438,7 +3438,7 @@ } }, "node_modules/dunder-proto": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "dev": true, @@ -3579,7 +3579,7 @@ } }, "node_modules/es-define-property": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "dev": true, @@ -4150,7 +4150,7 @@ } }, "node_modules/fs-constants": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "dev": true, @@ -4173,7 +4173,7 @@ } }, "node_modules/fs.realpath": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true, @@ -4253,7 +4253,7 @@ } }, "node_modules/get-proto": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", "dev": true, @@ -4755,7 +4755,7 @@ } }, "node_modules/is-inside-container": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", "dev": true, @@ -4848,7 +4848,7 @@ } }, "node_modules/isarray": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", "dev": true, @@ -5030,7 +5030,7 @@ "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true, @@ -5978,7 +5978,7 @@ } }, "node_modules/package-json-from-dist": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true, @@ -5992,7 +5992,7 @@ "license": "(MIT AND Zlib)" }, "node_modules/parent-module": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, @@ -6106,7 +6106,7 @@ } }, "node_modules/path-is-absolute": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, @@ -6740,7 +6740,7 @@ } }, "node_modules/schema-utils/node_modules/json-schema-traverse": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true, @@ -6855,7 +6855,7 @@ } }, "node_modules/side-channel-list": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", "dev": true, @@ -6872,7 +6872,7 @@ } }, "node_modules/side-channel-map": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", "dev": true, @@ -6924,7 +6924,7 @@ } }, "node_modules/simple-concat": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", "dev": true, @@ -7276,7 +7276,7 @@ } }, "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, @@ -7379,7 +7379,7 @@ "license": "MIT" }, "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true, @@ -7955,7 +7955,7 @@ } }, "node_modules/wcwidth": { - "version": "1.0.1", + "version": "1.0.2", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", "license": "MIT", diff --git a/package.json b/package.json index d137fd5..4c12a7e 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "vscode-templateforge", - "displayName": "Template File Generator (gromlab)", + "name": "vscode-templateFileGenerator", + "displayName": "Template File Generator | gromlab", "description": "Generate files and folders from templates with variable substitution and case modifiers. Syntax highlighting and autocomplete for template variables.", - "version": "1.0.1", + "version": "1.0.2", "publisher": "gromlab", "author": "Sergey Gromov", "scripts": { @@ -33,13 +33,13 @@ "snippets" ], "icon": "logo.png", - "homepage": "https://gromlab.ru/gromov/templateforge", + "homepage": "https://gromlab.ru/gromov/vscode-template-file-generator", "repository": { "type": "git", - "url": "https://gromlab.ru/gromov/templateforge.git" + "url": "https://gromlab.ru/gromov/vscode-template-file-generator.git" }, "bugs": { - "url": "https://gromlab.ru/gromov/templateforge/issues" + "url": "https://gromlab.ru/gromov/vscode-template-file-generator/issues" }, "engines": { "vscode": "^1.60.0" @@ -51,18 +51,18 @@ "contributes": { "commands": [ { - "command": "templateforge.createFromTemplate", - "title": "%templateforge.createFromTemplate.title%" + "command": "templateFileGenerator.createFromTemplate", + "title": "%templateFileGenerator.createFromTemplate.title%" }, { - "command": "templateforge.configure", - "title": "%templateforge.configure.title%" + "command": "templateFileGenerator.configure", + "title": "%templateFileGenerator.configure.title%" } ], "menus": { "explorer/context": [ { - "command": "templateforge.createFromTemplate", + "command": "templateFileGenerator.createFromTemplate", "group": "navigation@10" } ] @@ -70,40 +70,40 @@ "configuration": { "title": "Template Forge", "properties": { - "templateForge.templatesPath": { + "templateFileGenerator.templatesPath": { "type": "string", "default": ".templates", - "description": "%templateforge.config.templatesPath.description%", - "markdownDescription": "%templateforge.config.templatesPath.description%", + "description": "%templateFileGenerator.config.templatesPath.description%", + "markdownDescription": "%templateFileGenerator.config.templatesPath.description%", "scope": "application" }, - "templateForge.overwriteFiles": { + "templateFileGenerator.overwriteFiles": { "type": "boolean", "default": false, - "description": "%templateforge.config.overwriteFiles.description%", - "markdownDescription": "%templateforge.config.overwriteFiles.description%", + "description": "%templateFileGenerator.config.overwriteFiles.description%", + "markdownDescription": "%templateFileGenerator.config.overwriteFiles.description%", "scope": "application" }, - "templateForge.inputMode": { + "templateFileGenerator.inputMode": { "type": "string", "enum": [ "webview", "inputBox" ], "default": "webview", - "description": "%templateforge.config.inputMode.description%", - "markdownDescription": "%templateforge.config.inputMode.description%", + "description": "%templateFileGenerator.config.inputMode.description%", + "markdownDescription": "%templateFileGenerator.config.inputMode.description%", "scope": "application" }, - "templateForge.language": { + "templateFileGenerator.language": { "type": "string", "enum": [ "ru", "en" ], "default": "en", - "description": "%templateforge.config.language.description%", - "markdownDescription": "%templateforge.config.language.description%", + "description": "%templateFileGenerator.config.language.description%", + "markdownDescription": "%templateFileGenerator.config.language.description%", "scope": "application" } } diff --git a/package.nls.json b/package.nls.json index fb803e0..8b7b21c 100644 --- a/package.nls.json +++ b/package.nls.json @@ -1,8 +1,8 @@ { - "templateforge.createFromTemplate.title": "Create from template...", - "templateforge.configure.title": "Configure Template Forge...", - "templateforge.config.templatesPath.description": "Path to the templates folder (relative to the project root)", - "templateforge.config.overwriteFiles.description": "Overwrite existing files when generating from template", - "templateforge.config.inputMode.description": "Variable input mode: webview or inputBox", - "templateforge.config.language.description": "Extension interface language" -} + "templateFileGenerator.createFromTemplate.title": "Create from template...", + "templateFileGenerator.configure.title": "Configure Template File Generator...", + "templateFileGenerator.config.templatesPath.description": "Path to the templates folder (relative to the project root)", + "templateFileGenerator.config.overwriteFiles.description": "Overwrite existing files when generating from template", + "templateFileGenerator.config.inputMode.description": "Variable input mode: webview or inputBox", + "templateFileGenerator.config.language.description": "Extension interface language" +} diff --git a/package.nls.ru.json b/package.nls.ru.json index 3d06a44..28d9a35 100644 --- a/package.nls.ru.json +++ b/package.nls.ru.json @@ -1,8 +1,8 @@ { - "templateforge.createFromTemplate.title": "Создать из шаблона...", - "templateforge.configure.title": "Настроить Template Forge...", - "templateforge.config.templatesPath.description": "Путь к папке с шаблонами (относительно корня проекта)", - "templateforge.config.overwriteFiles.description": "Перезаписывать ли существующие файлы при генерации", - "templateforge.config.inputMode.description": "Режим ввода переменных: webview или inputBox", - "templateforge.config.language.description": "Язык интерфейса расширения" -} + "templateFileGenerator.createFromTemplate.title": "Создать из шаблона...", + "templateFileGenerator.configure.title": "Настроить генератор шаблонов...", + "templateFileGenerator.config.templatesPath.description": "Путь к папке с шаблонами (относительно корня проекта)", + "templateFileGenerator.config.overwriteFiles.description": "Перезаписывать ли существующие файлы при генерации", + "templateFileGenerator.config.inputMode.description": "Режим ввода переменных: webview или inputBox", + "templateFileGenerator.config.language.description": "Язык интерфейса расширения" +} diff --git a/src/core/config.ts b/src/core/config.ts index 23f80dd..60d5022 100644 --- a/src/core/config.ts +++ b/src/core/config.ts @@ -3,15 +3,15 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; -export interface TemplateForgeConfig { +export interface TemplateFileGeneratorConfig { templatesPath: string; overwriteFiles: boolean; inputMode: 'webview' | 'inputBox'; language?: string; } -export function readConfig(): TemplateForgeConfig { - const config = vscode.workspace.getConfiguration('templateForge'); +export function readConfig(): TemplateFileGeneratorConfig { + const config = vscode.workspace.getConfiguration('templateFileGenerator'); return { templatesPath: config.get('templatesPath', '.templates'), overwriteFiles: config.get('overwriteFiles', false), @@ -20,8 +20,8 @@ export function readConfig(): TemplateForgeConfig { }; } -export async function writeConfig(newConfig: Partial) { - const config = vscode.workspace.getConfiguration('templateForge'); +export async function writeConfig(newConfig: Partial) { + const config = vscode.workspace.getConfiguration('templateFileGenerator'); if (newConfig.templatesPath !== undefined) { await config.update('templatesPath', newConfig.templatesPath, vscode.ConfigurationTarget.Global); } diff --git a/src/extension.ts b/src/extension.ts index d670d59..b8854e1 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -12,7 +12,7 @@ import { discoverTemplates, resolveTemplate } from './core/templateResolver'; export function activate(context: vscode.ExtensionContext) { - const createFromTemplate = vscode.commands.registerCommand('templateforge.createFromTemplate', async (uri: vscode.Uri) => { + const createFromTemplate = vscode.commands.registerCommand('templateFileGenerator.createFromTemplate', async (uri: vscode.Uri) => { const config = readConfig(); const dict = I18N_DICTIONARIES[config.language || 'ru'] || I18N_DICTIONARIES['ru']; const workspaceFolders = vscode.workspace.workspaceFolders; @@ -81,7 +81,7 @@ export function activate(context: vscode.ExtensionContext) { context.subscriptions.push( createFromTemplate, - vscode.commands.registerCommand('templateforge.configure', async () => { + vscode.commands.registerCommand('templateFileGenerator.configure', async () => { await showConfigWebview(context); }) ); diff --git a/src/webview/configWebview.ts b/src/webview/configWebview.ts index 07605c2..e15859a 100644 --- a/src/webview/configWebview.ts +++ b/src/webview/configWebview.ts @@ -1,6 +1,6 @@ // Webview для конфигурации расширения import * as vscode from 'vscode'; -import { TemplateForgeConfig, readConfig, writeConfig } from '../core/config'; +import { TemplateFileGeneratorConfig, readConfig, writeConfig } from '../core/config'; const LOCALIZATION: Record<'ru'|'en', { title: string; @@ -42,7 +42,7 @@ const LOCALIZATION: Record<'ru'|'en', { export async function showConfigWebview(context: vscode.ExtensionContext) { const panel = vscode.window.createWebviewPanel( - 'templateForgeConfig', + 'templateFileGeneratorConfig', 'Template Forge Settings', vscode.ViewColumn.One, { enableScripts: true }