Skip to content

Commit

Permalink
uptake latest platform 3.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
shivajivarma authored Aug 19, 2023
1 parent ddc7eda commit 55053e5
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions main.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
import OS from 'https://raw.githubusercontent.com/justaos/os/v2.2.0/os/mod.ts';
import OS from 'https://raw.githubusercontent.com/justaos/os/v3.0.4/mod.ts';

import config from './config.json' assert { type: 'json' };
import FileUtils from "https://deno.land/x/[email protected]/file-utils/mod.ts";

if (!config.setupComplete) {
console.log("performing initial setup")
config.setupComplete = true;
const key = await crypto.subtle.generateKey(
{ name: 'HMAC', hash: 'SHA-512' },
true,
['sign', 'verify']
)
config.programs.platform.jwtKey = await crypto.subtle.exportKey("jwk", key);
FileUtils.writeTextFileSync('./config.json', JSON.stringify(config, null, 4));
}

new OS(Deno.cwd()).run();
await new OS(Deno.cwd()).run();

0 comments on commit 55053e5

Please sign in to comment.