impel-cli 0.17.0 → 0.17.1
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/package.json +1 -1
- package/src/commands/apps.js +17 -0
package/package.json
CHANGED
package/src/commands/apps.js
CHANGED
|
@@ -180,6 +180,21 @@ export function installedAppTenantIds(targets, {
|
|
|
180
180
|
return installed.sort((left, right) => left.localeCompare(right));
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
+
async function maybeRunLegacyUpdateHandoff(argv, overrides) {
|
|
184
|
+
if (overrides.singleTenantUpdate) return null;
|
|
185
|
+
const [action, target, ...rest] = argv;
|
|
186
|
+
if (action !== "update" || target !== "all" || rest.length > 0) return null;
|
|
187
|
+
|
|
188
|
+
// impel-cli <=0.16.5 re-executes a newly installed build with this exact
|
|
189
|
+
// command. Route that cross-version handoff through the current full-tenant
|
|
190
|
+
// reconciler so first-time tenant targets are not limited to local installs.
|
|
191
|
+
const runConvergence = overrides.runAllTenantConvergence || (async () => {
|
|
192
|
+
const { cmdConverge } = await import("./converge.js");
|
|
193
|
+
return cmdConverge([]);
|
|
194
|
+
});
|
|
195
|
+
return runConvergence();
|
|
196
|
+
}
|
|
197
|
+
|
|
183
198
|
async function maybeUpdateAllInstalledTenants(argv, overrides, platform) {
|
|
184
199
|
if (overrides.singleTenantUpdate) return null;
|
|
185
200
|
const [action = "status", rawTarget, ...rest] = argv;
|
|
@@ -712,6 +727,8 @@ export async function cmdWindowsApps(argv, overrides = {}) {
|
|
|
712
727
|
|
|
713
728
|
export async function cmdApps(argv, overrides = {}) {
|
|
714
729
|
const platform = overrides.platform || process.platform;
|
|
730
|
+
const legacyUpdateHandoff = await maybeRunLegacyUpdateHandoff(argv, overrides);
|
|
731
|
+
if (legacyUpdateHandoff !== null) return legacyUpdateHandoff;
|
|
715
732
|
const allTenantUpdate = await maybeUpdateAllInstalledTenants(argv, overrides, platform);
|
|
716
733
|
if (allTenantUpdate !== null) return allTenantUpdate;
|
|
717
734
|
if (platform === "win32") return cmdWindowsApps(argv, overrides);
|