1import { spawn } from "node:child_process";
2import { readConfig } from "../util/config.js";
3import { resolveAuthToken } from "../util/resolveAuthToken.js";
4const PUSH_URL = (process.env.KURUMERA_PUSH_URL || "https://themekit.kurumera.com/_push").replace(/\/+$/, "");
5function openBrowser(url) {
6 try {
7 if (process.platform === "win32") {
8 spawn("cmd", ["/c", "start", "", url.replace(/&/g, "^&")], { stdio: "ignore", detached: true, windowsVerbatimArguments: true }).unref();
⋯
26const authToken = await resolveAuthToken();
27process.stdout.write("Waiting for the build");
28let previewUrl = "";
⋯
35const r = await fetch(`${PUSH_URL}/status?store=${encodeURIComponent(store)}`, { headers: authToken ? { Authorization: `Bearer ${authToken}` } : {} });