-
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.
Deno as "server/" because their LSP has linting problems
- Loading branch information
Showing
7 changed files
with
102 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Build", | ||
"request": "launch", | ||
"type": "pwa-node", | ||
"program": "build.ts", | ||
"cwd": "${workspaceFolder}/", | ||
"runtimeExecutable": "deno", | ||
"runtimeArgs": [ | ||
"run", | ||
"--unstable", | ||
"--inspect-brk", | ||
"--allow-all" | ||
], | ||
"attachSimplePort": 9229 | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"deno.enable": true, | ||
"deno.lint": true, | ||
"deno.unstable": true, | ||
"deno.import_intellisense_origins": { | ||
"https://deno.land": true | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
## Features: | ||
|
||
- Webserver | ||
|
||
Serve the internal files and have a way to mount a directory. | ||
Argument passing via compiled binaries? | ||
Port. | ||
Directory. | ||
|
||
- Update check | ||
- Starboard check? | ||
- via npm ungz+untar | ||
- via github unzip | ||
- Deno check? | ||
- Self check? From our repo somehow... | ||
|
||
Notification is fine. | ||
|
||
## Packing/Building | ||
|
||
Two step build process since we don't officially know the size of the Deno | ||
executable since `--lite` and `--target` executables are downloaded from their | ||
server and could change size at any time. | ||
|
||
Step 1: | ||
|
||
``` | ||
deno compile --unstable --allow-all starboard-deno.ts | ||
``` | ||
|
||
- Deno itself | ||
- Starboard-Deno with EMBED_LOC=0 | ||
- Deno | ||
- U64 A | ||
- U64 B | ||
|
||
Next I have an embedWriter.ts script that: | ||
1) Reads the U64 A | ||
2) Copies Deno from 0-A to a new binary | ||
4) Generates the JSON of | ||
{ | ||
version: { | ||
self: commit/1.3.2 | ||
deno: commit/1.3.2 | ||
starboard: commit/1.3.2 | ||
} | ||
embeds: [ | ||
{ filePath, hash?, size } | ||
{ filePath, hash?, size } | ||
{ filePath, hash?, size } | ||
... | ||
] | ||
} | ||
5) Save this seek position: EO_DENO_SEEK | ||
6) Get size of JSON.stringify() JSON_SIZE | ||
7) Write JSON_SIZE immediately after Deno (TODO: U64? U32? Any? Probably.) | ||
8) Write the JSON immediately after JSON_SIZE | ||
9) For each file in the embed payload, in order, write it | ||
10) Save this seek position: EO_STARBOARD_SEEK | ||
11) Copy everything up to EOF-12 over | ||
1) no no no no no. EMBED_LOC update | ||
12) Assert the last 8 characters are DENOLAND | ||
13) New pointer = Old pointer + String(JSON_SIZE).length + JSON_SIZE + EMBEDS.reduce(...) | ||
Hmm. Or. Or. Um. Pointer += (Current seek - EO_DENO_SEEK) | ||
Or. | ||
Read old JS pointer. (OLD_JS) | ||
JS pointer = EO_STARBOARD_SEEK | ||
DIFF = JS - OLD_JS | ||
JSON = JSON + DIFF |