// cliffy
import * as dntShim from "./_dnt.shims.js";
export { Command } from "./deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/mod.js";
export { Table } from "./deps/jsr.io/@windmill-labs/cliffy-table/1.0.0-rc.5/mod.js";
export { colors } from "./deps/jsr.io/@windmill-labs/cliffy-ansi/1.0.0-rc.5/colors.js";
export { Secret } from "./deps/jsr.io/@windmill-labs/cliffy-prompt/1.0.0-rc.6/secret.js";
export { Select } from "./deps/jsr.io/@windmill-labs/cliffy-prompt/1.0.0-rc.6/select.js";
export { Confirm } from "./deps/jsr.io/@windmill-labs/cliffy-prompt/1.0.0-rc.6/confirm.js";
export { Input } from "./deps/jsr.io/@windmill-labs/cliffy-prompt/1.0.0-rc.6/input.js";
export { UpgradeCommand } from "./deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/upgrade/mod.js";
export { NpmProvider } from "./deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/upgrade/provider/npm.js";
export { Provider } from "./deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/upgrade/mod.js";
export { CompletionsCommand } from "./deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/completions/mod.js";
// std
export { ensureDir } from "./deps/jsr.io/@std/fs/1.0.19/mod.js";
export { SEPARATOR as SEP } from "./deps/jsr.io/@std/path/1.1.2/mod.js";
export * as path from "./deps/jsr.io/@std/path/1.1.2/mod.js";
export { encodeHex } from "./deps/jsr.io/@std/encoding/1.0.4/mod.js";
export { writeAllSync } from "./deps/jsr.io/@std/io/0.225.2/write_all.js";
export { copy } from "./deps/jsr.io/@std/io/0.225.2/copy.js";
export { readAll } from "./deps/jsr.io/@std/io/0.225.2/read_all.js";
export * as log from "./deps/jsr.io/@std/log/0.224.14/mod.js";
export { stringify as yamlStringify } from "./deps/jsr.io/@std/yaml/1.0.10/mod.js";
import { parse as yamlParse } from "./deps/jsr.io/@std/yaml/1.0.10/mod.js";
export async function yamlParseFile(path, options = {}) {
    try {
        return yamlParse(await dntShim.Deno.readTextFile(path), options);
    }
    catch (e) {
        throw new Error(`Error parsing yaml ${path}`, { cause: e });
    }
}
export function yamlParseContent(path, content, options = {}) {
    try {
        return yamlParse(content, options);
    }
    catch (e) {
        throw new Error(`Error parsing yaml ${path}`, { cause: e });
    }
}
// other
export * as Diff from "diff";
export { minimatch } from "minimatch";
export { default as JSZip } from "jszip";
export * as express from "express";
export * as http from "node:http";
export { WebSocketServer, WebSocket } from "ws";
export * as getPort from "get-port";
export * as open from "open";
export * as esMain from "es-main";
import { OpenAPI } from "./gen/index.js";
export function setClient(token, baseUrl) {
    if (baseUrl === undefined) {
        baseUrl =
            getEnv("BASE_INTERNAL_URL") ??
                getEnv("BASE_URL") ??
                "http://localhost:8000";
    }
    if (token === undefined) {
        token = getEnv("WM_TOKEN") ?? "no_token";
    }
    OpenAPI.WITH_CREDENTIALS = true;
    OpenAPI.TOKEN = token;
    OpenAPI.BASE = baseUrl + "/api";
}
const getEnv = (key) => {
    return dntShim.Deno.env.get(key);
};
