wherever-dev 0.10.13 → 0.10.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +51 -8
- package/dist/index.js.map +1 -1
- package/dist/session-pool.d.ts +6 -0
- package/dist/session-pool.d.ts.map +1 -1
- package/dist/session-pool.js +45 -28
- package/dist/session-pool.js.map +1 -1
- package/package.json +1 -1
- package/public/_app/immutable/chunks/{CtPQjCBP.js → BzFqVyJ_.js} +2 -2
- package/public/_app/immutable/chunks/{CtPQjCBP.js.map → BzFqVyJ_.js.map} +1 -1
- package/public/_app/immutable/chunks/{Dbf0zjW2.js → CDbw105l.js} +2 -2
- package/public/_app/immutable/chunks/{Dbf0zjW2.js.map → CDbw105l.js.map} +1 -1
- package/public/_app/immutable/chunks/{8eypMp_V.js → ClTMu0mO.js} +2 -2
- package/public/_app/immutable/chunks/{8eypMp_V.js.map → ClTMu0mO.js.map} +1 -1
- package/public/_app/immutable/entry/{app.BNS6jUfJ.js → app.CqLyltZH.js} +3 -3
- package/public/_app/immutable/entry/{app.BNS6jUfJ.js.map → app.CqLyltZH.js.map} +1 -1
- package/public/_app/immutable/entry/start.CQ4WvoOm.js +2 -0
- package/public/_app/immutable/entry/start.CQ4WvoOm.js.map +1 -0
- package/public/_app/immutable/nodes/{0.COQnYGwL.js → 0.D_7-7cgp.js} +2 -2
- package/public/_app/immutable/nodes/{0.COQnYGwL.js.map → 0.D_7-7cgp.js.map} +1 -1
- package/public/_app/immutable/nodes/{1.irnAmVhW.js → 1.CDxNOU-Q.js} +2 -2
- package/public/_app/immutable/nodes/{1.irnAmVhW.js.map → 1.CDxNOU-Q.js.map} +1 -1
- package/public/_app/immutable/nodes/2.D1gQZgOb.js +95 -0
- package/public/_app/immutable/nodes/2.D1gQZgOb.js.map +1 -0
- package/public/_app/version.json +1 -1
- package/public/index.html +14 -12
- package/public/service-worker.js +1 -1
- package/public/_app/immutable/entry/start.CY5doj7d.js +0 -2
- package/public/_app/immutable/entry/start.CY5doj7d.js.map +0 -1
- package/public/_app/immutable/nodes/2.kEWDQAI7.js +0 -95
- package/public/_app/immutable/nodes/2.kEWDQAI7.js.map +0 -1
package/public/_app/version.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"7d0f6d6"}
|
package/public/index.html
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<link rel="icon" href="./logo.svg" />
|
|
7
7
|
<meta name="description" content="Create & maintain apps from wherever with a beautiful remote workspace." />
|
|
8
|
+
<meta name="wherever-eruda-plugins" content="false" />
|
|
8
9
|
|
|
9
10
|
<!-- inject named-logs-console -->
|
|
10
11
|
<!-- prettier-ignore -->
|
|
@@ -12,17 +13,18 @@
|
|
|
12
13
|
"use strict";var noop=function(){},W="undefined"!=typeof window?window:globalThis,oldConsole=W.console,disabledRegexps=[],enabledRegexps=[];function bindCall(e,l,a,o,r){if(l.enabled&&(l.level>=o||factory.level>=o)){if(a>=o||factory.traceLevel>=o){if(factory.labelVisible){var t="string"==typeof factory.labelVisible?"".concat(factory.labelVisible).concat(l.namespace):l.namespace;return l.decoration?oldConsole.trace.bind(oldConsole,"%c".concat(t),l.decoration):oldConsole.trace.bind(oldConsole,t)}return oldConsole.trace.bind(oldConsole)}if(r&&factory.labelVisible){t="string"==typeof factory.labelVisible?"".concat(factory.labelVisible).concat(l.namespace):l.namespace;return l.decoration?e.bind(oldConsole,"%c".concat(t),l.decoration):e.bind(oldConsole,t)}return e.bind(oldConsole)}return noop}var loggers={};function write(e){process.stdout.write(e)}var factory=function(e,l){var a=loggers[e];if(a)return a;var o=factory.level,r=factory.traceLevel;return a=loggers[e]={namespace:e,decoration:null==l?void 0:l.decoration,get assert(){return bindCall(oldConsole.assert,a,r,1,!1)},get error(){return bindCall(oldConsole.error,a,r,1,!0)},get warn(){return bindCall(oldConsole.warn,a,r,2,!0)},get info(){return bindCall(oldConsole.info,a,r,3,!0)},get write(){return"undefined"!=typeof process?bindCall(write,a,r,3,!1):bindCall(oldConsole.info,a,r,3,!1)},get log(){return bindCall(oldConsole.log,a,r,4,!0)},get debug(){return bindCall(oldConsole.debug,a,r,5,!0)},get trace(){return bindCall(oldConsole.trace,a,r,6,!0)},get dir(){return bindCall(oldConsole.dir,a,r,5,!1)},get table(){return bindCall(oldConsole.table||oldConsole.debug,a,r,5,!1)},get time(){return bindCall(oldConsole.time||oldConsole.debug,a,r,5,!1)},get timeEnd(){return bindCall(oldConsole.timeEnd||oldConsole.debug,a,r,5,!1)},get timeLog(){return bindCall(oldConsole.timeLog||oldConsole.debug,a,r,5,!1)},get level(){return o},set level(e){o=e},get traceLevel(){return r},set traceLevel(e){r=e},enabled:enabled(e,{disabledRegexps:disabledRegexps,enabledRegexps:enabledRegexps})}},logLevels={error:1,warn:2,info:3,log:4,debug:5,trace:6};function enabled(e,l){var a,o,r=l.disabledRegexps,t=l.enabledRegexps;if("*"===e[e.length-1])return!0;for(a=0,o=r.length;a<o;a++)if(r[a].test(e))return!1;for(a=0,o=t.length;a<o;a++)if(t[a].test(e))return!0;return!1}function processNamespaces(e,l,a){for(var o=l.disabledRegexps,r=l.enabledRegexps,t=("string"==typeof e?e:"").split(/[\s,]+/),n=t.length,s=0;s<n;s++)t[s]&&("-"===(e=t[s].replace(/\*/g,".*?"))[0]?o.push(new RegExp("^"+e.substr(1)+"$")):r.push(new RegExp("^"+e+"$")));for(var i=0,d=Object.keys(loggers);i<d.length;i++){var c=d[i];a(c,enabled(c,{disabledRegexps:o,enabledRegexps:r}))}}if(factory.level=2,factory.traceLevel=0,factory.setTraceLevelFor=function(e,l){processNamespaces(e||"*",{disabledRegexps:[],enabledRegexps:[]},function(e,a){a&&(loggers[e].traceLevel=l)})},factory.disable=function(){disabledRegexps.splice(0,disabledRegexps.length),enabledRegexps.splice(0,enabledRegexps.length);for(var e=0,l=Object.keys(loggers);e<l.length;e++){var a=l[e];loggers[a].enabled=!1}try{localStorage.removeItem("debug")}catch(e){}},factory.enable=function(e){disabledRegexps.splice(0,disabledRegexps.length),enabledRegexps.splice(0,enabledRegexps.length),processNamespaces(e=""===e?"*":e||"*",{disabledRegexps:disabledRegexps,enabledRegexps:enabledRegexps},function(e,l){return loggers[e].enabled=l});try{localStorage.setItem("debug",e)}catch(e){}},"undefined"!=typeof localStorage)try{var str=localStorage.getItem("debug");str&&""!==str&&factory.enable(str)}catch(e){}else if("undefined"!=typeof process){(val=process.env.NAMED_LOGS)?factory.enable(val):factory.disable(),(val=process.env.NAMED_LOGS_LEVEL)&&(factory.level=logLevels[val]||parseInt(val)||factory.level),(val=process.env.NAMED_LOGS_TRACE_LEVEL)&&(factory.traceLevel=logLevels[val]||parseInt(val)||factory.level),(val=process.env.NAMED_LOGS_LABEL)&&(factory.labelVisible=!0)}for(var vars=W.location?W.location.search.slice(1).split("&"):[],_i=0,vars_1=vars;_i<vars_1.length;_i++){var variable=vars_1[_i];if(variable.startsWith("debug="))""===(val=variable.slice(6))?factory.disable():factory.enable(val);else if(variable.startsWith("debugLevel=")){var val=variable.slice(11);factory.level=logLevels[val]||parseInt(val)||factory.level}else if(variable.startsWith("traceLevel=")){val=variable.slice(11);factory.traceLevel=logLevels[val]||parseInt(val)||factory.level}else if(variable.startsWith("debugLabel")){val=variable.slice(11);factory.labelVisible=val||!0}}globalThis._logFactory=factory;
|
|
13
14
|
</script>
|
|
14
15
|
|
|
15
|
-
<!-- inject eruda loader (use ?eruda or even ?eruda=<plugin package name separated by ",">) -->
|
|
16
|
+
<!-- inject eruda loader (use ?eruda or even ?eruda=<plugin package name separated by ",">). Custom plugin loading is gated by the wherever-eruda-plugins meta flag above, which the server flips to the enabled value only when run with --debug; on a normal deployment it stays disabled so a crafted ?eruda=<payload> link cannot inject a <script src>. Core eruda still loads for phone debugging regardless. -->
|
|
16
17
|
<!--prettier-ignore -->
|
|
17
18
|
<script>
|
|
18
19
|
(function () {
|
|
19
20
|
let params = new URLSearchParams(window.location.search);
|
|
20
21
|
const eruda_options = params.get('eruda');
|
|
21
22
|
if (eruda_options !== "" && !eruda_options && localStorage.getItem('active-eruda') != 'true') return;
|
|
23
|
+
const erudaPluginsEnabled = document.querySelector('meta[name="wherever-eruda-plugins"]')?.content === 'true';
|
|
22
24
|
const _ = '';
|
|
23
25
|
let add_plugins = '';
|
|
24
26
|
let load_plugins = '';
|
|
25
|
-
if (eruda_options.length > 0) {
|
|
27
|
+
if (eruda_options.length > 0 && erudaPluginsEnabled) {
|
|
26
28
|
for (const plugin of eruda_options.split(",")) {
|
|
27
29
|
let [pkg, v] = plugin.split(":");
|
|
28
30
|
v = v || pkg.split('-').map((split, i) => i > 0 ? split[0].toUpperCase() + split.slice(1): split).join('');
|
|
@@ -47,17 +49,17 @@
|
|
|
47
49
|
})();
|
|
48
50
|
</script>
|
|
49
51
|
|
|
50
|
-
<link href="./_app/immutable/entry/start.
|
|
51
|
-
<link href="./_app/immutable/chunks/
|
|
52
|
+
<link href="./_app/immutable/entry/start.CQ4WvoOm.js" rel="modulepreload">
|
|
53
|
+
<link href="./_app/immutable/chunks/CDbw105l.js" rel="modulepreload">
|
|
52
54
|
<link href="./_app/immutable/chunks/CRRPBe07.js" rel="modulepreload">
|
|
53
|
-
<link href="./_app/immutable/entry/app.
|
|
55
|
+
<link href="./_app/immutable/entry/app.CqLyltZH.js" rel="modulepreload">
|
|
54
56
|
<link href="./_app/immutable/chunks/CAWbdcQM.js" rel="modulepreload">
|
|
55
57
|
<link href="./_app/immutable/chunks/itgD7vGH.js" rel="modulepreload">
|
|
56
58
|
<link href="./_app/immutable/chunks/Dtm96ZKi.js" rel="modulepreload">
|
|
57
|
-
<link href="./_app/immutable/nodes/0.
|
|
58
|
-
<link href="./_app/immutable/chunks/
|
|
59
|
-
<link href="./_app/immutable/chunks/
|
|
60
|
-
<link href="./_app/immutable/nodes/2.
|
|
59
|
+
<link href="./_app/immutable/nodes/0.D_7-7cgp.js" rel="modulepreload">
|
|
60
|
+
<link href="./_app/immutable/chunks/ClTMu0mO.js" rel="modulepreload">
|
|
61
|
+
<link href="./_app/immutable/chunks/BzFqVyJ_.js" rel="modulepreload">
|
|
62
|
+
<link href="./_app/immutable/nodes/2.D1gQZgOb.js" rel="modulepreload">
|
|
61
63
|
|
|
62
64
|
<link href="./_app/immutable/assets/0.BLdSNDwj.css" rel="stylesheet">
|
|
63
65
|
</head>
|
|
@@ -65,15 +67,15 @@
|
|
|
65
67
|
<div style="display: contents">
|
|
66
68
|
<script>
|
|
67
69
|
{
|
|
68
|
-
|
|
70
|
+
__sveltekit_1h588w4 = {
|
|
69
71
|
base: new URL(".", location).pathname.slice(0, -1)
|
|
70
72
|
};
|
|
71
73
|
|
|
72
74
|
const element = document.currentScript.parentElement;
|
|
73
75
|
|
|
74
76
|
Promise.all([
|
|
75
|
-
import("./_app/immutable/entry/start.
|
|
76
|
-
import("./_app/immutable/entry/app.
|
|
77
|
+
import("./_app/immutable/entry/start.CQ4WvoOm.js"),
|
|
78
|
+
import("./_app/immutable/entry/app.CqLyltZH.js")
|
|
77
79
|
]).then(([kit, app]) => {
|
|
78
80
|
kit.start(app, element);
|
|
79
81
|
});
|
package/public/service-worker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a=location.pathname.split("/").slice(0,-1).join("/"),b=[a+"/_app/immutable/entry/start.
|
|
1
|
+
const a=location.pathname.split("/").slice(0,-1).join("/"),b=[a+"/_app/immutable/entry/start.CQ4WvoOm.js",a+"/_app/immutable/entry/app.CqLyltZH.js",a+"/_app/immutable/nodes/0.D_7-7cgp.js",a+"/_app/immutable/assets/0.BLdSNDwj.css",a+"/_app/immutable/nodes/1.CDxNOU-Q.js",a+"/_app/immutable/nodes/2.D1gQZgOb.js",a+"/_app/immutable/chunks/BzFqVyJ_.js",a+"/_app/immutable/chunks/CAWbdcQM.js",a+"/_app/immutable/chunks/CDbw105l.js",a+"/_app/immutable/chunks/CRRPBe07.js",a+"/_app/immutable/chunks/ClTMu0mO.js",a+"/_app/immutable/chunks/Dtm96ZKi.js",a+"/_app/immutable/chunks/itgD7vGH.js"],y=[a+"/logo.svg",a+"/pwa/apple-touch-icon.png",a+"/pwa/favicon-192.png",a+"/pwa/favicon-512.png",a+"/pwa/favicon-maskable-192.png",a+"/pwa/favicon-maskable-512.png",a+"/pwa/favicon.ico",a+"/pwa/favicon.svg",a+"/pwa/manifest.webmanifest",a+"/pwa/screenshot-desktop.png",a+"/pwa/screenshot-mobile.png",a+"/robots.txt"],v=[a+"/"],m="7d0f6d6",O=m,s=self;let w=[];w=b.concat(v).concat(y.filter(t=>t.indexOf("pwa/")===-1));let u=!0;function o(...t){u&&console.debug(`[Service Worker #${O}] ${t[0]}`,...t.slice(1))}const d=`cache-${m}`,g=[];g.push("localhost");const $=["/sessions(\\?|$|/)","/models(\\?|$|/)","/config(\\?|$|/)","/check-path(\\?|$|/)","/autocomplete-path(\\?|$|/)","/session/","/health(\\?|$)"];for(const t of $)g.push(t);const k=[],C=[s.location.origin,"cdn",".*\\.png$",".*\\.svg$"],_=[];o(`Origin: ${s.location.origin}`);s.addEventListener("install",t=>{o("Install"),t.waitUntil(caches.open(d).then(i=>(o(`Creating cache: ${d}`),i.addAll(w))).then(()=>{o("cache fully fetched!")}))});s.addEventListener("activate",t=>{o("Activate"),t.waitUntil(caches.keys().then(i=>Promise.all(i.map(e=>{if(e!==d)return o(`Deleting: ${e}`),caches.delete(e)})).then(()=>s.clients.claim())))});async function h(t,i){try{const e=await fetch(t);try{const c=await caches.open(d);return t.method==="GET"&&t.url.startsWith("http")&&c.put(t,e.clone()),e}catch(c){return o(`error: ${c}`),e}}catch{return i||new Response(`Could Not fetch ${t.url}`,{status:503,headers:{"Content-Type":"text/plain"}})}}const x={method:(t,i)=>{o(`Cache first: ${t.url}`);const e=h(t,i);return i||e},regexes:C},j={method:(t,i)=>(o(`Cache only: ${t.url}`),i||h(t,i)),regexes:_},f={method:(t,i)=>(o(`Online first: ${t.url}`),h(t,i)),regexes:g},A={method:t=>(o(`Online only: ${t.url}`),fetch(t)),regexes:k};async function E(t){const i=t.request,e=s.registration;if(t.request.mode==="navigate"&&t.request.method==="GET"&&e.waiting&&(await s.clients.matchAll()).length<2)return o("only one client, skipWaiting as we navigate the page"),e.waiting.postMessage("skipWaiting"),new Response("",{headers:{Refresh:"0"}});if(t.request.mode==="navigate"&&t.request.method==="GET"){const n=await caches.match(i);return f.method(i,n)}return await caches.match(i).then(n=>{const l=[f,A,x,j];for(const r of l)for(const p of r.regexes)if(RegExp(p).test(i.url))return r.method(i,n);return f.method(i,n)})}s.addEventListener("fetch",t=>{t.respondWith(E(t))});s.addEventListener("message",async function(t){t.data&&t.data.type==="debug"?(u=t.data.enabled&&t.data.level>=5,u&&o(`log enabled ${t.data.level}`)):t.data&&t.data.type==="ping"?o("pong"):t.data==="skipWaiting"&&(o("skipWaiting received"),t.waitUntil(s.skipWaiting()))});async function L(){const t=await s.clients.matchAll({type:"window",includeUncontrolled:!0});let i,e,c;for(var n=0;n<t.length;n++){const l=t[n],r=l.visibilityState==="visible",p=l.focused;if(r&&!i&&(i=l),p&&!e&&(e=l),p&&r){c=l;break}}return{atLeastOneFocused:e,atLeastOneVisible:i,atLeastOneVisibleAndFocused:c}}async function W(t){const i=await L(),e={title:"Notification",options:{body:"You have a new notification",icon:"/favicon.png",badge:"/favicon.png"}};if(t)try{const c=JSON.parse(t);if(c.web_push===8030){const n=c.notification;e.options={badge:n.badge,body:n.body,data:n.data,dir:n.dir,icon:n.icon,lang:n.lang,requireInteraction:n.requireInteraction,silent:n.silent,tag:n.tag},e.title=n.title,e.options.icon||(e.options.icon=n.image),n.navigate&&(e.options.data?typeof e.options.data=="object"&&!e.options.data.navigate&&(e.options.data={...e.options.data,navigate:n.navigate}):e.options.data={navigate:n.navigate})}else e.title=c.notification?.title||c.title||"Notification",e.options=c.notification||c.options}catch{e.options.body=t}o("handlePush",t,e),i.atLeastOneVisibleAndFocused?(o("posting notification to active app",e),i.atLeastOneVisibleAndFocused.postMessage({type:"notification",notification:{title:e.title,options:e.options}})):await s.registration.showNotification(e.title,e.options)}s.addEventListener("push",function(t){const i=t.data?.text();t.waitUntil(W(i))});async function F(t){const i=await s.clients.matchAll({type:"window",includeUncontrolled:!0}),e=location.pathname,c=e.substring(0,e.lastIndexOf("/")+1);let n=t.data?.navigate;n&&!n.startsWith("/")&&n.indexOf(":/")==-1&&(n=c+n);for(const l of i)if(o(`${"focus"in l?"focus-available: ":""}: ${l.url}`),"focus"in l)return n&&"navigate"in l?l.focus().then(()=>l.navigate(n)):l.focus();if(s.clients.openWindow)return s.clients.openWindow(n||"/")}s.addEventListener("notificationclick",function(t){t.notification.close(),t.waitUntil(F(t.notification))});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"start.CY5doj7d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|