@artenx/dshb 0.1.1 → 0.1.2
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/LICENSE +21 -0
- package/lib/auth/loopback-compat.js +1 -0
- package/lib/auth/loopback-compat.js.map +1 -1
- package/package.json +6 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DSH-HoneyBee Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -3,6 +3,7 @@ const MOBILE_CSS = `
|
|
|
3
3
|
<style id="dshb-mobile-fix">
|
|
4
4
|
@media (max-width:1023px),(display-mode:standalone){
|
|
5
5
|
html{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important}
|
|
6
|
+
input,textarea,select,[contenteditable="true"]{font-size:16px!important}
|
|
6
7
|
[class*="_command_1gdtu_"]{min-width:max-content!important;max-width:none!important;overflow:visible!important;white-space:pre!important;text-overflow:clip!important;max-height:999999px!important}
|
|
7
8
|
[class*="_prompt_1gdtu_"],[class*="_promptLine_1gdtu_"]{min-width:max-content!important;max-height:999999px!important}
|
|
8
9
|
[class*="_header_1gdtu_"]{min-width:0!important;max-width:100%!important;overflow-x:auto!important;overscroll-behavior-x:contain;touch-action:pan-x pan-y!important}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loopback-compat.js","names":[],"sources":["../../src/auth/loopback-compat.ts"],"sourcesContent":["const MOBILE_CSS = `\n<style id=\"dshb-mobile-fix\">\n@media (max-width:1023px),(display-mode:standalone){\nhtml{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important}\n[class*=\"_command_1gdtu_\"]{min-width:max-content!important;max-width:none!important;overflow:visible!important;white-space:pre!important;text-overflow:clip!important;max-height:999999px!important}\n[class*=\"_prompt_1gdtu_\"],[class*=\"_promptLine_1gdtu_\"]{min-width:max-content!important;max-height:999999px!important}\n[class*=\"_header_1gdtu_\"]{min-width:0!important;max-width:100%!important;overflow-x:auto!important;overscroll-behavior-x:contain;touch-action:pan-x pan-y!important}\n[class*=\"_output_1gdtu_\"]{overflow-x:auto!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y!important}\n[class*=\"_line_1gdtu_\"]{min-width:max-content!important;overflow-x:visible!important;max-height:999999px!important}\n[class*=\"_copyButton_1gdtu_\"]{position:sticky!important;right:0}\n[class*=\"7KE1Ra_modelName\"],[class*=\"7KE1Ra_description\"],[class*=\"modelName\"]{white-space:normal!important;overflow-wrap:break-word;text-overflow:clip!important;overflow:visible!important}\n[class*=\"7KE1Ra_menu\"],[class*=\"_menu\"]:has([class*=\"modelName\"]){left:0!important;right:auto!important;width:calc(100vw - 32px)!important;min-width:0!important;max-width:calc(100vw - 32px)!important}\n[class*=\"_copyButton_\"]{touch-action:manipulation!important}\n[class*=\"_copyAnchor_\"],[class*=\"_body_1ye18_\"],[class*=\"_root_4qrvp_\"]{touch-action:pan-x pan-y!important}\n[class*=\"_root_4qrvp_1\"]{width:100%!important;min-width:0!important;overflow-x:auto!important}\n[class*=\"_container_4qrvp_\"]{width:auto!important;min-width:100%!important;max-width:none!important}\n[class*=\"_expandedTopLevel_4qrvp_\"]{width:auto!important;min-width:100%!important;max-width:none!important}\n[class*=\"_body_biesw_\"],[class*=\"_body_srovd_\"],[class*=\"_body_s66q0_\"]{overflow-x:auto!important;-webkit-overflow-scrolling:touch}\n[class*=\"_line_biesw_\"],[class*=\"_line_srovd_\"],[class*=\"_line_s66q0_\"]{min-width:max-content!important}\n[class*=\"_block_1gdtu_\"]{padding-left:0!important;overflow-x:auto!important}\n}\n</style>`\n\nexport function loopbackCompatScript(): string {\n return `<script>\n;(function () {\n if (typeof crypto !== 'undefined' && typeof crypto.randomUUID !== 'function' && typeof crypto.getRandomValues === 'function') {\n crypto.randomUUID = function () {\n var b = crypto.getRandomValues(new Uint8Array(16))\n b[6] = (b[6] & 0x0f) | 0x40\n b[8] = (b[8] & 0x3f) | 0x80\n var h = ''\n for (var i = 0; i < 16; i++) {\n if (i === 4 || i === 6 || i === 8 || i === 10) h += '-'\n var hex = b[i].toString(16)\n if (hex.length < 2) hex = '0' + hex\n h += hex\n }\n return h\n }\n }\n function installIsLoopbackOverride() {\n var loader = window.__ModuleLoader__\n if (!loader || loader.__dshbIsLoopbackHooked) return false\n if (loader.mode !== 'live') return false\n loader.__dshbIsLoopbackHooked = true\n var origLoad = loader.load.bind(loader)\n loader.load = function (handoff) {\n var factory = handoff && handoff.factory\n if (typeof factory === 'function') {\n handoff.factory = function (require) {\n var exports = factory(require)\n var apply = exports && exports.apply\n if (typeof apply === 'function') {\n exports.apply = function (ctx) {\n var result = apply(ctx)\n try {\n var connection = ctx && ctx.get && ctx.get('connection')\n if (connection) {\n Object.defineProperty(connection, 'isLoopback', { configurable: true, get: function () { return true } })\n }\n } catch (e) {}\n return result\n }\n }\n return exports\n }\n }\n return origLoad(handoff)\n }\n return true\n }\n function tryInstall() { if (!installIsLoopbackOverride()) setTimeout(tryInstall, 0) }\n tryInstall()\n})()\n;(async function () {\n try {\n var res = await fetch('/api/auth/status')\n var data = await res.json()\n if (window.location.pathname !== '/login' && !data.authenticated) {\n window.location.replace('/login')\n return\n }\n } catch (e) {}\n})()\n</script>`\n}\n\nexport function installLoopbackCompat(html: string): string {\n return html.replace('</head>', `${MOBILE_CSS}${loopbackCompatScript()}</head>`)\n}\n"],"mappings":";AAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"loopback-compat.js","names":[],"sources":["../../src/auth/loopback-compat.ts"],"sourcesContent":["const MOBILE_CSS = `\n<style id=\"dshb-mobile-fix\">\n@media (max-width:1023px),(display-mode:standalone){\nhtml{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important}\ninput,textarea,select,[contenteditable=\"true\"]{font-size:16px!important}\n[class*=\"_command_1gdtu_\"]{min-width:max-content!important;max-width:none!important;overflow:visible!important;white-space:pre!important;text-overflow:clip!important;max-height:999999px!important}\n[class*=\"_prompt_1gdtu_\"],[class*=\"_promptLine_1gdtu_\"]{min-width:max-content!important;max-height:999999px!important}\n[class*=\"_header_1gdtu_\"]{min-width:0!important;max-width:100%!important;overflow-x:auto!important;overscroll-behavior-x:contain;touch-action:pan-x pan-y!important}\n[class*=\"_output_1gdtu_\"]{overflow-x:auto!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y!important}\n[class*=\"_line_1gdtu_\"]{min-width:max-content!important;overflow-x:visible!important;max-height:999999px!important}\n[class*=\"_copyButton_1gdtu_\"]{position:sticky!important;right:0}\n[class*=\"7KE1Ra_modelName\"],[class*=\"7KE1Ra_description\"],[class*=\"modelName\"]{white-space:normal!important;overflow-wrap:break-word;text-overflow:clip!important;overflow:visible!important}\n[class*=\"7KE1Ra_menu\"],[class*=\"_menu\"]:has([class*=\"modelName\"]){left:0!important;right:auto!important;width:calc(100vw - 32px)!important;min-width:0!important;max-width:calc(100vw - 32px)!important}\n[class*=\"_copyButton_\"]{touch-action:manipulation!important}\n[class*=\"_copyAnchor_\"],[class*=\"_body_1ye18_\"],[class*=\"_root_4qrvp_\"]{touch-action:pan-x pan-y!important}\n[class*=\"_root_4qrvp_1\"]{width:100%!important;min-width:0!important;overflow-x:auto!important}\n[class*=\"_container_4qrvp_\"]{width:auto!important;min-width:100%!important;max-width:none!important}\n[class*=\"_expandedTopLevel_4qrvp_\"]{width:auto!important;min-width:100%!important;max-width:none!important}\n[class*=\"_body_biesw_\"],[class*=\"_body_srovd_\"],[class*=\"_body_s66q0_\"]{overflow-x:auto!important;-webkit-overflow-scrolling:touch}\n[class*=\"_line_biesw_\"],[class*=\"_line_srovd_\"],[class*=\"_line_s66q0_\"]{min-width:max-content!important}\n[class*=\"_block_1gdtu_\"]{padding-left:0!important;overflow-x:auto!important}\n}\n</style>`\n\nexport function loopbackCompatScript(): string {\n return `<script>\n;(function () {\n if (typeof crypto !== 'undefined' && typeof crypto.randomUUID !== 'function' && typeof crypto.getRandomValues === 'function') {\n crypto.randomUUID = function () {\n var b = crypto.getRandomValues(new Uint8Array(16))\n b[6] = (b[6] & 0x0f) | 0x40\n b[8] = (b[8] & 0x3f) | 0x80\n var h = ''\n for (var i = 0; i < 16; i++) {\n if (i === 4 || i === 6 || i === 8 || i === 10) h += '-'\n var hex = b[i].toString(16)\n if (hex.length < 2) hex = '0' + hex\n h += hex\n }\n return h\n }\n }\n function installIsLoopbackOverride() {\n var loader = window.__ModuleLoader__\n if (!loader || loader.__dshbIsLoopbackHooked) return false\n if (loader.mode !== 'live') return false\n loader.__dshbIsLoopbackHooked = true\n var origLoad = loader.load.bind(loader)\n loader.load = function (handoff) {\n var factory = handoff && handoff.factory\n if (typeof factory === 'function') {\n handoff.factory = function (require) {\n var exports = factory(require)\n var apply = exports && exports.apply\n if (typeof apply === 'function') {\n exports.apply = function (ctx) {\n var result = apply(ctx)\n try {\n var connection = ctx && ctx.get && ctx.get('connection')\n if (connection) {\n Object.defineProperty(connection, 'isLoopback', { configurable: true, get: function () { return true } })\n }\n } catch (e) {}\n return result\n }\n }\n return exports\n }\n }\n return origLoad(handoff)\n }\n return true\n }\n function tryInstall() { if (!installIsLoopbackOverride()) setTimeout(tryInstall, 0) }\n tryInstall()\n})()\n;(async function () {\n try {\n var res = await fetch('/api/auth/status')\n var data = await res.json()\n if (window.location.pathname !== '/login' && !data.authenticated) {\n window.location.replace('/login')\n return\n }\n } catch (e) {}\n})()\n</script>`\n}\n\nexport function installLoopbackCompat(html: string): string {\n return html.replace('</head>', `${MOBILE_CSS}${loopbackCompatScript()}</head>`)\n}\n"],"mappings":";AAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;AAwBnB,SAAgB,uBAA+B;CAC7C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DT;AAEA,SAAgB,sBAAsB,MAAsB;CAC1D,OAAO,KAAK,QAAQ,WAAW,GAAG,aAAa,qBAAqB,EAAE,QAAQ;AAChF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artenx/dshb",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Routes DSH filesystem, shell, subprocess, and PTY operations to local, SSH, and Docker execution nodes, with a node registry, an authentication gate, and a mobile-aware management UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -84,10 +84,6 @@
|
|
|
84
84
|
"nodeVersions": ">=22.13"
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
|
-
"scripts": {
|
|
88
|
-
"build": "tsdown",
|
|
89
|
-
"typecheck": "tsc --noEmit"
|
|
90
|
-
},
|
|
91
87
|
"dependencies": {
|
|
92
88
|
"commander": "^15.0.0",
|
|
93
89
|
"ssh2": "^1.16.0"
|
|
@@ -159,5 +155,9 @@
|
|
|
159
155
|
"homepage": "https://github.com/Artenx/dsh-honeybee#readme",
|
|
160
156
|
"bugs": {
|
|
161
157
|
"url": "https://github.com/Artenx/dsh-honeybee/issues"
|
|
158
|
+
},
|
|
159
|
+
"scripts": {
|
|
160
|
+
"build": "tsdown",
|
|
161
|
+
"typecheck": "tsc --noEmit"
|
|
162
162
|
}
|
|
163
|
-
}
|
|
163
|
+
}
|