-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ddc7eda
commit 55053e5
Showing
1 changed file
with
2 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |