@jtoar/redwood-issues
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -44,2 +44,2 @@ import * as dntShim from "./_dnt.shims.js"; | ||
// ─── Server ────────────────────────────────────────────────────────────────── | ||
export const SERVER_URL = "redwood-triage.deno.dev"; | ||
export const SERVER_URL = "https://redwood-issues.deno.dev"; |
#!/usr/bin/env node | ||
import "./_dnt.polyfills.js"; | ||
import * as dntShim from "./_dnt.shims.js"; | ||
import { exists, getDataFromRedwoodProjectPathRef, getRedwoodProjectPathRef, promptFromData, SERVER_URL } from "./lib.js"; | ||
import { exists, getDataFromRedwoodProjectPathRef, getRedwoodProjectPathRef, promptFromData, SERVER_URL, } from "./lib.js"; | ||
export async function main() { | ||
@@ -19,7 +19,6 @@ let redwoodProjectPathRef; | ||
} | ||
const body = JSON.stringify(Object.entries(data).filter(exists).map(([file, { contents }]) => { | ||
return { | ||
[file]: contents, | ||
}; | ||
})); | ||
const body = JSON.stringify(Object.entries(data).filter(exists).reduce((body, [file, { contents }]) => { | ||
body[file] = contents; | ||
return body; | ||
}, {})); | ||
const serverRes = await fetch(SERVER_URL, { | ||
@@ -32,3 +31,4 @@ method: "POST", | ||
}); | ||
console.log(`Uploaded ${Object.keys(data).length} files to ${await serverRes.text()}`); | ||
const { url } = await serverRes.json(); | ||
console.log(`Uploaded ${Object.keys(data).length} files to ${url}`); | ||
} | ||
@@ -35,0 +35,0 @@ if ((import.meta.url === ("file:///" + process.argv[1].replace(/\\/g, "/")).replace(/\/{3,}/, "///"))) { |
@@ -6,3 +6,3 @@ { | ||
"name": "@jtoar/redwood-issues", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Tooling for Redwood issues", | ||
@@ -9,0 +9,0 @@ "dependencies": { |
846317