Compare commits

..

No commits in common. "v0.1.0-develop.11" and "v0.1.0-develop.10" have entirely different histories.

4 changed files with 3 additions and 40 deletions

View File

@ -1,10 +1,3 @@
# [0.1.0-develop.11](https://git.lumeweb.com/LumeWeb/libkernel/compare/v0.1.0-develop.10...v0.1.0-develop.11) (2023-07-02)
### Bug Fixes
* add support for a hosted kernel, but only on localhost (for debugging) ([44e2a0d](https://git.lumeweb.com/LumeWeb/libkernel/commit/44e2a0d06d5c8511a505a6b5348db6cefac10a01))
# [0.1.0-develop.10](https://git.lumeweb.com/LumeWeb/libkernel/compare/v0.1.0-develop.9...v0.1.0-develop.10) (2023-07-02)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@lumeweb/libkernel",
"version": "0.1.0-develop.11",
"version": "0.1.0-develop.10",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/libkernel",
"version": "0.1.0-develop.11",
"version": "0.1.0-develop.10",
"dependencies": {
"@lumeweb/libweb": "0.2.0-develop.21",
"emittery": "^1.0.1"

View File

@ -1,6 +1,6 @@
{
"name": "@lumeweb/libkernel",
"version": "0.1.0-develop.11",
"version": "0.1.0-develop.10",
"main": "lib/index.js",
"type": "module",
"types": "lib/index.d.ts",

View File

@ -186,37 +186,12 @@ function handleMessage(event: MessageEvent) {
// Ignore any other messages as they might be from other applications.
}
function launchKernelFrame() {
const iframe = document.createElement("iframe");
iframe.src = "https://kernel.lumeweb.com";
iframe.width = "0";
iframe.height = "0";
iframe.style.border = "0";
iframe.style.position = "absolute";
document.body.appendChild(iframe);
kernelSource = <Window>iframe.contentWindow;
kernelOrigin = "https://kernel.lumeweb.com";
kernelAuthLocation = "https://kernel.lumeweb.com/auth.html";
sourceResolve();
// Set a timer to fail the login process if the kernel doesn't load in
// time.
setTimeout(() => {
if (initResolved === true) {
return;
}
initResolved = true;
initResolve("tried to open kernel in iframe, but hit a timeout");
}, 24000);
}
// messageBridge will send a message to the bridge of the lume extension to
// see if it exists. If it does not respond or if it responds with an error,
// messageBridge will open an iframe to skt.us and use that as the kernel.
let kernelSource: Window;
let kernelOrigin: string;
let kernelAuthLocation: string;
function messageBridge() {
// Establish the function that will handle the bridge's response.
let bridgeInitComplete = false;
@ -267,11 +242,6 @@ function messageBridge() {
return;
}
bridgeInitComplete = true;
if ("localhost" === window.location.hostname) {
log("browser extension not found, falling back to lumeweb.com");
launchKernelFrame();
}
}, 500);
return initPromise;