Skip to content

Commit 613031e

Browse files
Updater
1 parent b261b79 commit 613031e

1 file changed

Lines changed: 34 additions & 3 deletions

File tree

lib/updater.js

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,20 @@ const checkForUpdates = async (packageName = null) => {
1818
`Package '${packageName}' not found in installation history`
1919
);
2020
}
21-
return await checkSingleUpdate(installation, log);
21+
return await checkSingleUpdate(installation, log, true); // Force check for specific package
2222
}
2323

2424
// Check all packages
2525
const updates = [];
2626
for (const installation of config) {
27+
// Skip smart_url types during bulk updates
28+
if (installation.source.type === 'smart_url') {
29+
log.debug(`Skipping smart_url package ${installation.name} during bulk update`);
30+
continue;
31+
}
32+
2733
try {
28-
const updateInfo = await checkSingleUpdate(installation, log);
34+
const updateInfo = await checkSingleUpdate(installation, log, false);
2935
if (updateInfo.hasUpdate) {
3036
updates.push(updateInfo);
3137
}
@@ -39,7 +45,7 @@ const checkForUpdates = async (packageName = null) => {
3945
return updates;
4046
};
4147

42-
const checkSingleUpdate = async (installation, log) => {
48+
const checkSingleUpdate = async (installation, log, forceCheck = false) => {
4349
const { source, selected, name } = installation;
4450

4551
log.debug(`Checking for updates: ${name}`);
@@ -51,6 +57,8 @@ const checkSingleUpdate = async (installation, log) => {
5157
return await checkUrlUpdate(installation);
5258
case "file":
5359
return await checkFileUpdate(installation);
60+
case "smart_url":
61+
return await checkSmartUrlUpdate(installation, forceCheck);
5462
default:
5563
throw new Error(`Unknown source type: ${source.type}`);
5664
}
@@ -160,6 +168,29 @@ const checkFileUpdate = async (installation) => {
160168
};
161169
};
162170

171+
const checkSmartUrlUpdate = async (installation, forceCheck) => {
172+
const { source, selected, name } = installation;
173+
174+
if (!forceCheck) {
175+
// Skip smart_url during bulk updates
176+
return {
177+
name,
178+
hasUpdate: false,
179+
reason: "Smart URL type - skipped during bulk updates",
180+
canUpdate: false,
181+
};
182+
}
183+
184+
// For specific package updates, force update smart_url types
185+
return {
186+
name,
187+
hasUpdate: true,
188+
reason: "Smart URL source - forced update",
189+
canUpdate: true,
190+
source,
191+
};
192+
};
193+
163194
const performUpdate = async (updateInfo, customFilePath = null) => {
164195
const log = createLogger();
165196
const { name } = updateInfo;

0 commit comments

Comments
 (0)