fix(cli): make CLI not require latest version of windmill

This commit is contained in:
Ruben Fiszel
2024-09-20 14:49:06 +02:00
parent 9e9562e1a4
commit 794f87aa0d
+12 -4
View File
@@ -900,10 +900,14 @@ export async function pull(opts: GlobalOptions & SyncOptions) {
)
);
const resourceTypeToFormatExtension =
(await wmill.fileResourceTypeToFileExtMap({
let resourceTypeToFormatExtension: Record<string, string> = {};
try {
resourceTypeToFormatExtension = (await wmill.fileResourceTypeToFileExtMap({
workspace: workspace.workspaceId,
})) as Record<string, string>;
} catch {
// ignore
}
const remote = ZipFSElement(
(await downloadZip(
workspace,
@@ -1195,10 +1199,14 @@ export async function push(opts: GlobalOptions & SyncOptions) {
"Computing the files to update on the remote to match local (taking wmill.yaml includes/excludes into account)"
)
);
const resourceTypeToFormatExtension =
(await wmill.fileResourceTypeToFileExtMap({
let resourceTypeToFormatExtension: Record<string, string> = {};
try {
resourceTypeToFormatExtension = (await wmill.fileResourceTypeToFileExtMap({
workspace: workspace.workspaceId,
})) as Record<string, string>;
} catch {
// ignore
}
const remote = ZipFSElement(
(await downloadZip(
workspace,