change-image-suffix 2.1.14 → 2.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/index.js +13 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.1.15](https://github.com/GuoSirius/change-image-suffix/compare/v2.1.14...v2.1.15) (2026-05-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* use AllFilesystemObjects to support mixed file+directory selection ([5a67d8f](https://github.com/GuoSirius/change-image-suffix/commit/5a67d8f3a436f24b1b9cff2c173d5aeea661f907))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Documentation
|
|
14
|
+
|
|
15
|
+
* update CLAUDE.md for AllFilesystemObjects architecture ([5957326](https://github.com/GuoSirius/change-image-suffix/commit/59573263dfb01c9d27239d06878068d63de96229))
|
|
16
|
+
|
|
5
17
|
### [2.1.14](https://github.com/GuoSirius/change-image-suffix/compare/v2.1.13...v2.1.14) (2026-05-25)
|
|
6
18
|
|
|
7
19
|
|
package/dist/index.js
CHANGED
|
@@ -68,10 +68,10 @@ function installContextMenu() {
|
|
|
68
68
|
{ verb: 'tiff', label: '📋 TIFF' },
|
|
69
69
|
];
|
|
70
70
|
// ── 使用 ExtendedSubCommandsKey,直接调用 node.exe(无 bat 中转)──
|
|
71
|
+
// AllFilesystemObjects 覆盖文件和目录,支持混合多选
|
|
71
72
|
const menuBases = [
|
|
72
73
|
{ base: 'HKCU\\Software\\Classes\\Directory\\Background\\shell\\cis', subMenu: 'Directory\\ContextMenus\\cis', arg: '-p "%V"' },
|
|
73
|
-
{ base: 'HKCU\\Software\\Classes\\
|
|
74
|
-
{ base: 'HKCU\\Software\\Classes\\*\\shell\\cis', subMenu: 'Directory\\ContextMenus\\cis_file', arg: '-f "%1"' },
|
|
74
|
+
{ base: 'HKCU\\Software\\Classes\\AllFilesystemObjects\\shell\\cis', subMenu: 'Directory\\ContextMenus\\cis_afo', arg: '%*', multiSelect: true },
|
|
75
75
|
];
|
|
76
76
|
// 1. 注册格式子菜单
|
|
77
77
|
const REG_ROOT = 'HKCU\\Software\\Classes\\';
|
|
@@ -89,6 +89,9 @@ function installContextMenu() {
|
|
|
89
89
|
execSync(`reg add "${menu.base}" /ve /d "🖼 转换图片 (cis)" /f`, { stdio: 'ignore' });
|
|
90
90
|
execSync(`reg add "${menu.base}" /v Icon /d "${iconPath}" /f`, { stdio: 'ignore' });
|
|
91
91
|
execSync(`reg add "${menu.base}" /v ExtendedSubCommandsKey /d "${menu.subMenu}" /f`, { stdio: 'ignore' });
|
|
92
|
+
if (menu.multiSelect) {
|
|
93
|
+
execSync(`reg add "${menu.base}" /v MultiSelectModel /d Player /f`, { stdio: 'ignore' });
|
|
94
|
+
}
|
|
92
95
|
}
|
|
93
96
|
// 写入版本标记,用于检测 npm update 后自动刷新菜单
|
|
94
97
|
const versionFile = path.join(appDataDir, 'version.json');
|
|
@@ -103,11 +106,12 @@ function installContextMenu() {
|
|
|
103
106
|
}
|
|
104
107
|
function uninstallContextMenu() {
|
|
105
108
|
requireWindows();
|
|
106
|
-
//
|
|
109
|
+
// 删除主菜单项(含旧版残留)
|
|
107
110
|
const mainKeys = [
|
|
108
111
|
'HKCU\\Software\\Classes\\Directory\\Background\\shell\\cis',
|
|
109
|
-
'HKCU\\Software\\Classes\\
|
|
110
|
-
'HKCU\\Software\\Classes
|
|
112
|
+
'HKCU\\Software\\Classes\\AllFilesystemObjects\\shell\\cis',
|
|
113
|
+
'HKCU\\Software\\Classes\\Directory\\shell\\cis', // 旧版残留
|
|
114
|
+
'HKCU\\Software\\Classes\\*\\shell\\cis', // 旧版残留
|
|
111
115
|
];
|
|
112
116
|
for (const key of mainKeys) {
|
|
113
117
|
try {
|
|
@@ -115,11 +119,12 @@ function uninstallContextMenu() {
|
|
|
115
119
|
}
|
|
116
120
|
catch { /* ignore */ }
|
|
117
121
|
}
|
|
118
|
-
//
|
|
122
|
+
// 删除公共子菜单
|
|
119
123
|
const subMenuRoots = [
|
|
120
124
|
'HKCU\\Software\\Classes\\Directory\\ContextMenus\\cis',
|
|
121
|
-
'HKCU\\Software\\Classes\\Directory\\ContextMenus\\cis_dir',
|
|
122
|
-
'HKCU\\Software\\Classes\\Directory\\ContextMenus\\cis_file',
|
|
125
|
+
'HKCU\\Software\\Classes\\Directory\\ContextMenus\\cis_dir', // 旧版残留
|
|
126
|
+
'HKCU\\Software\\Classes\\Directory\\ContextMenus\\cis_file', // 旧版残留
|
|
127
|
+
'HKCU\\Software\\Classes\\Directory\\ContextMenus\\cis_afo',
|
|
123
128
|
];
|
|
124
129
|
for (const root of subMenuRoots) {
|
|
125
130
|
try {
|