triflux 10.57.2 → 10.57.3
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/bin/triflux.mjs +14 -7
- package/package.json +1 -1
package/bin/triflux.mjs
CHANGED
|
@@ -3217,6 +3217,14 @@ function resolveUpdateTargets({ installMode, pluginPath }) {
|
|
|
3217
3217
|
return [];
|
|
3218
3218
|
}
|
|
3219
3219
|
|
|
3220
|
+
// 키는 "<플러그인>@<마켓플레이스>"다. 접두어로 비교하면 triflux-mods@triflux 를
|
|
3221
|
+
// triflux 본체로 잡아 npm 설치본에서 git pull 을 시도한다.
|
|
3222
|
+
export function findTrifluxPluginEntry(installedPlugins) {
|
|
3223
|
+
for (const [key, entries] of Object.entries(installedPlugins?.plugins || {}))
|
|
3224
|
+
if (key.split("@")[0] === "triflux") return entries[0] ?? null;
|
|
3225
|
+
return null;
|
|
3226
|
+
}
|
|
3227
|
+
|
|
3220
3228
|
async function cmdUpdate(args = []) {
|
|
3221
3229
|
if (args.some(isHelpArg)) {
|
|
3222
3230
|
printCommandHelp("update");
|
|
@@ -3233,13 +3241,12 @@ async function cmdUpdate(args = []) {
|
|
|
3233
3241
|
// 플러그인 모드 감지
|
|
3234
3242
|
if (existsSync(pluginsFile)) {
|
|
3235
3243
|
try {
|
|
3236
|
-
const
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
}
|
|
3244
|
+
const entry = findTrifluxPluginEntry(
|
|
3245
|
+
JSON.parse(readFileSync(pluginsFile, "utf8")),
|
|
3246
|
+
);
|
|
3247
|
+
if (entry) {
|
|
3248
|
+
pluginPath = entry.installPath;
|
|
3249
|
+
installMode = "plugin";
|
|
3243
3250
|
}
|
|
3244
3251
|
} catch {}
|
|
3245
3252
|
}
|