mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-07 00:01:49 +00:00
fix(cli): make CLI compatible with Node 18
This commit is contained in:
+6
-2
@@ -3,6 +3,7 @@
|
||||
// @ts-nocheck This file is copied from a JS project, so it's not type-safe.
|
||||
|
||||
import { log, encodeHex, SEP } from "./deps.ts";
|
||||
import crypto from "node:crypto";
|
||||
|
||||
export function deepEqual<T>(a: T, b: T): boolean {
|
||||
if (a === b) return true;
|
||||
@@ -132,6 +133,9 @@ export function sleep(ms: number) {
|
||||
|
||||
export function isFileResource(path: string): boolean {
|
||||
const splitPath = path.split(".");
|
||||
return splitPath.length >= 4 && splitPath[1] == "resource" && splitPath[2] == "file";
|
||||
return (
|
||||
splitPath.length >= 4 &&
|
||||
splitPath[1] == "resource" &&
|
||||
splitPath[2] == "file"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user