chore: restructure repository into packages/ folder (#3197)
We're having a growing number of packages in this repository. This PR moves them into a `packages/` directory like it's commonly done in other projects.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { DAY } from "../../src/constants.ts";
|
||||
import { updateCheck } from "../../src/dev/update_check.ts";
|
||||
|
||||
// deno-lint-ignore require-await
|
||||
async function getLatestVersion() {
|
||||
// deno-lint-ignore no-console
|
||||
console.log("fetching latest version");
|
||||
return Deno.env.get("LATEST_VERSION") ?? "99.99.999";
|
||||
}
|
||||
|
||||
function getCurrentVersion() {
|
||||
return Deno.env.get("CURRENT_VERSION")!;
|
||||
}
|
||||
|
||||
const interval = +(Deno.env.get("UPDATE_INTERVAL") ?? DAY);
|
||||
await updateCheck(
|
||||
interval,
|
||||
() => Deno.env.get("TEST_HOME")!,
|
||||
getLatestVersion,
|
||||
Deno.env.has("CURRENT_VERSION") ? getCurrentVersion : undefined,
|
||||
);
|
||||
Reference in New Issue
Block a user