/**
 * raw script by path
 *
 */
export async function main(workspace: string, path: string) {
  const url = new URL(`${BASE_URL}/api/w/${workspace}/scripts/raw/p/${path}`);
  const response = await fetch(url, {
    method: "GET",
    headers: {
      Authorization: "Bearer " + WM_TOKEN,
    },
    body: undefined,
  });
  if (!response.ok) {
    const text = await response.text();
    throw new Error(`${response.status} ${text}`);
  }
  return await response.text();
}
 Submitted by hugo697 181 days ago
/**
 * raw script by path
 *
 */
export async function main(workspace: string, path: string) {
  const url = new URL(`${BASE_URL}/api/w/${workspace}/scripts/raw/p/${path}`);
  const response = await fetch(url, {
    method: "GET",
    headers: {
      Authorization: "Bearer " + WM_TOKEN,
    },
    body: undefined,
  });
  if (!response.ok) {
    const text = await response.text();
    throw new Error(`${response.status} ${text}`);
  }
  return await response.text();
}
 Submitted by hugo697 742 days ago
/**
 * raw script by path
 *
 */
export async function main(workspace: string, path: string) {
  const url = new URL(`${BASE_URL}/api/w/${workspace}/scripts/raw/p/${path}`);
  const response = await fetch(url, {
    method: "GET",
    headers: {
      Authorization: "Bearer " + WM_TOKEN,
    },
    body: undefined,
  });
  return await response.text();
}
 Submitted by admin 814 days ago