assets: Use new websocket client
This commit is contained in:
parent
e91f1f2413
commit
6a739df24b
67 changed files with 437 additions and 562 deletions
|
|
@ -675,7 +675,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: @types/json-schema, @types/semver. A copy of the source code may be downloaded from https://github.com/DefinitelyTyped/DefinitelyTyped.git (@types/json-schema), https://github.com/DefinitelyTyped/DefinitelyTyped.git (@types/semver). This software contains the following license and notice below:
|
||||
The following software may be included in this product: @types/json-schema, @types/node, @types/semver, @types/ws. A copy of the source code may be downloaded from https://github.com/DefinitelyTyped/DefinitelyTyped.git (@types/json-schema), https://github.com/DefinitelyTyped/DefinitelyTyped.git (@types/node), https://github.com/DefinitelyTyped/DefinitelyTyped.git (@types/semver), https://github.com/DefinitelyTyped/DefinitelyTyped.git (@types/ws). This software contains the following license and notice below:
|
||||
|
||||
MIT License
|
||||
|
||||
|
|
@ -1447,6 +1447,32 @@ SOFTWARE.
|
|||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: base64-js. A copy of the source code may be downloaded from git://github.com/beatgammit/base64-js.git. This software contains the following license and notice below:
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Jameson Little
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: brace-expansion, isarray. A copy of the source code may be downloaded from git://github.com/juliangruber/brace-expansion.git (brace-expansion), git://github.com/juliangruber/isarray.git (isarray). This software contains the following license and notice below:
|
||||
|
||||
MIT License
|
||||
|
|
@ -1524,6 +1550,32 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: buffer. A copy of the source code may be downloaded from git://github.com/feross/buffer.git. This software contains the following license and notice below:
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Feross Aboukhadijeh, and other contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: builtins. A copy of the source code may be downloaded from https://github.com/juliangruber/builtins.git. This software contains the following license and notice below:
|
||||
|
||||
Copyright (c) 2015 Julian Gruber <julian@juliangruber.com>
|
||||
|
|
@ -3999,6 +4051,22 @@ IN THE SOFTWARE.
|
|||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: ieee754. A copy of the source code may be downloaded from git://github.com/feross/ieee754.git. This software contains the following license and notice below:
|
||||
|
||||
Copyright 2008 Fair Oaks Labs, Inc.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: inflight. A copy of the source code may be downloaded from https://github.com/npm/inflight.git. This software contains the following license and notice below:
|
||||
|
||||
The ISC License
|
||||
|
|
@ -4238,6 +4306,32 @@ SOFTWARE.
|
|||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: isomorphic-ws. A copy of the source code may be downloaded from git+https://github.com/heineiuo/isomorphic-ws.git. This software contains the following license and notice below:
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 Zejin Zhuang <heineiuo@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: js-tokens. A copy of the source code may be downloaded from https://github.com/lydell/js-tokens.git. This software contains the following license and notice below:
|
||||
|
||||
The MIT License (MIT)
|
||||
|
|
@ -6257,6 +6351,31 @@ SOFTWARE.
|
|||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: ws. A copy of the source code may be downloaded from git+https://github.com/websockets/ws.git. This software contains the following license and notice below:
|
||||
|
||||
Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
|
||||
Copyright (c) 2013 Arnout Kazemier and contributors
|
||||
Copyright (c) 2016 Luigi Pinca and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: xxhash-wasm. A copy of the source code may be downloaded from https://github.com/jungomi/xxhash-wasm.git. This software contains the following license and notice below:
|
||||
|
||||
The MIT License (MIT)
|
||||
|
|
|
|||
|
|
@ -12,30 +12,30 @@ const Public = "/⛰/"
|
|||
|
||||
// AssetsDefault contains assets for the 'Default' entrypoint.
|
||||
var AssetsDefault = Assets{
|
||||
Scripts: `<script type="module" src="/⛰/Default.38d394c2.js"></script><script src="/⛰/Default.38d394c2.js" nomodule defer></script><script type="module" src="/⛰/Default.38d394c2.js"></script><script src="/⛰/Default.38d394c2.js" nomodule defer></script>`,
|
||||
Styles: `<link rel="stylesheet" href="/⛰/Default.8912112e.css"><link rel="stylesheet" href="/⛰/Default.d8ae99b3.css">`,
|
||||
Scripts: `<script type="module" src="/⛰/Default.46ce540b.js"></script><script src="/⛰/Default.69ba5e86.js" nomodule defer></script><script type="module" src="/⛰/Default.68829c56.js"></script><script src="/⛰/Default.5dd67eb3.js" nomodule defer></script>`,
|
||||
Styles: `<link rel="stylesheet" href="/⛰/Default.75b6a6d8.css"><link rel="stylesheet" href="/⛰/Default.749670b3.css">`,
|
||||
}
|
||||
|
||||
// AssetsUser contains assets for the 'User' entrypoint.
|
||||
var AssetsUser = Assets{
|
||||
Scripts: `<script type="module" src="/⛰/Default.38d394c2.js"></script><script src="/⛰/Default.38d394c2.js" nomodule defer></script><script type="module" src="/⛰/User.23a71b44.js"></script><script src="/⛰/User.869c9a74.js" nomodule defer></script>`,
|
||||
Styles: `<link rel="stylesheet" href="/⛰/Default.8912112e.css"><link rel="stylesheet" href="/⛰/User.68febbf8.css"><link rel="stylesheet" href="/⛰/User.09b09c46.css">`,
|
||||
Scripts: `<script type="module" src="/⛰/Default.46ce540b.js"></script><script src="/⛰/Default.69ba5e86.js" nomodule defer></script><script type="module" src="/⛰/User.67ac1e81.js"></script><script src="/⛰/User.d3b2edc7.js" nomodule defer></script>`,
|
||||
Styles: `<link rel="stylesheet" href="/⛰/Default.75b6a6d8.css"><link rel="stylesheet" href="/⛰/User.72760bc7.css"><link rel="stylesheet" href="/⛰/User.1664d889.css">`,
|
||||
}
|
||||
|
||||
// AssetsAdmin contains assets for the 'Admin' entrypoint.
|
||||
var AssetsAdmin = Assets{
|
||||
Scripts: `<script nomodule defer src="/⛰/User.869c9a74.js"></script><script type="module" src="/⛰/User.23a71b44.js"></script><script type="module" src="/⛰/Default.38d394c2.js"></script><script src="/⛰/Default.38d394c2.js" nomodule defer></script><script type="module" src="/⛰/Admin.c0a122d2.js"></script><script src="/⛰/Admin.b992cf94.js" nomodule defer></script>`,
|
||||
Styles: `<link rel="stylesheet" href="/⛰/Default.8912112e.css"><link rel="stylesheet" href="/⛰/User.09b09c46.css"><link rel="stylesheet" href="/⛰/Admin.9d294a13.css"><link rel="stylesheet" href="/⛰/User.68febbf8.css"><link rel="stylesheet" href="/⛰/Admin.db3e959a.css">`,
|
||||
Scripts: `<script nomodule defer src="/⛰/User.d3b2edc7.js"></script><script type="module" src="/⛰/User.67ac1e81.js"></script><script type="module" src="/⛰/Default.46ce540b.js"></script><script src="/⛰/Default.69ba5e86.js" nomodule defer></script><script type="module" src="/⛰/Admin.2a36863a.js"></script><script src="/⛰/Admin.f197eb04.js" nomodule defer></script>`,
|
||||
Styles: `<link rel="stylesheet" href="/⛰/Default.75b6a6d8.css"><link rel="stylesheet" href="/⛰/User.1664d889.css"><link rel="stylesheet" href="/⛰/Admin.9235a6f6.css"><link rel="stylesheet" href="/⛰/User.72760bc7.css"><link rel="stylesheet" href="/⛰/Admin.d1020143.css">`,
|
||||
}
|
||||
|
||||
// AssetsAdminProvision contains assets for the 'AdminProvision' entrypoint.
|
||||
var AssetsAdminProvision = Assets{
|
||||
Scripts: `<script nomodule defer src="/⛰/User.869c9a74.js"></script><script nomodule defer src="/⛰/Admin.b992cf94.js"></script><script type="module" src="/⛰/User.23a71b44.js"></script><script type="module" src="/⛰/Admin.c0a122d2.js"></script><script type="module" src="/⛰/Default.38d394c2.js"></script><script src="/⛰/Default.38d394c2.js" nomodule defer></script><script type="module" src="/⛰/AdminProvision.65c71f50.js"></script><script src="/⛰/AdminProvision.d01fac9b.js" nomodule defer></script>`,
|
||||
Styles: `<link rel="stylesheet" href="/⛰/Default.8912112e.css"><link rel="stylesheet" href="/⛰/Admin.db3e959a.css"><link rel="stylesheet" href="/⛰/User.68febbf8.css"><link rel="stylesheet" href="/⛰/User.09b09c46.css"><link rel="stylesheet" href="/⛰/Admin.9d294a13.css"><link rel="stylesheet" href="/⛰/AdminProvision.38d394c2.css">`,
|
||||
Scripts: `<script nomodule defer src="/⛰/User.d3b2edc7.js"></script><script nomodule defer src="/⛰/Admin.f197eb04.js"></script><script type="module" src="/⛰/User.67ac1e81.js"></script><script type="module" src="/⛰/Admin.2a36863a.js"></script><script type="module" src="/⛰/Default.46ce540b.js"></script><script src="/⛰/Default.69ba5e86.js" nomodule defer></script><script type="module" src="/⛰/AdminProvision.994883f5.js"></script><script src="/⛰/AdminProvision.5f2c7fe4.js" nomodule defer></script>`,
|
||||
Styles: `<link rel="stylesheet" href="/⛰/Default.75b6a6d8.css"><link rel="stylesheet" href="/⛰/Admin.d1020143.css"><link rel="stylesheet" href="/⛰/User.72760bc7.css"><link rel="stylesheet" href="/⛰/User.1664d889.css"><link rel="stylesheet" href="/⛰/Admin.9235a6f6.css"><link rel="stylesheet" href="/⛰/AdminProvision.8569d237.css">`,
|
||||
}
|
||||
|
||||
// AssetsAdminRebuild contains assets for the 'AdminRebuild' entrypoint.
|
||||
var AssetsAdminRebuild = Assets{
|
||||
Scripts: `<script nomodule defer src="/⛰/User.869c9a74.js"></script><script nomodule defer src="/⛰/Admin.b992cf94.js"></script><script type="module" src="/⛰/User.23a71b44.js"></script><script type="module" src="/⛰/Admin.c0a122d2.js"></script><script type="module" src="/⛰/Default.38d394c2.js"></script><script src="/⛰/Default.38d394c2.js" nomodule defer></script><script type="module" src="/⛰/AdminRebuild.d7ba1ab0.js"></script><script src="/⛰/AdminRebuild.0be08ae3.js" nomodule defer></script>`,
|
||||
Styles: `<link rel="stylesheet" href="/⛰/Default.8912112e.css"><link rel="stylesheet" href="/⛰/Admin.db3e959a.css"><link rel="stylesheet" href="/⛰/User.68febbf8.css"><link rel="stylesheet" href="/⛰/User.09b09c46.css"><link rel="stylesheet" href="/⛰/Admin.9d294a13.css"><link rel="stylesheet" href="/⛰/AdminRebuild.38d394c2.css">`,
|
||||
Scripts: `<script nomodule defer src="/⛰/User.d3b2edc7.js"></script><script nomodule defer src="/⛰/Admin.f197eb04.js"></script><script type="module" src="/⛰/User.67ac1e81.js"></script><script type="module" src="/⛰/Admin.2a36863a.js"></script><script type="module" src="/⛰/Default.46ce540b.js"></script><script src="/⛰/Default.69ba5e86.js" nomodule defer></script><script type="module" src="/⛰/AdminRebuild.5b253105.js"></script><script src="/⛰/AdminRebuild.bd32e5c4.js" nomodule defer></script>`,
|
||||
Styles: `<link rel="stylesheet" href="/⛰/Default.75b6a6d8.css"><link rel="stylesheet" href="/⛰/Admin.d1020143.css"><link rel="stylesheet" href="/⛰/User.72760bc7.css"><link rel="stylesheet" href="/⛰/User.1664d889.css"><link rel="stylesheet" href="/⛰/Admin.9235a6f6.css"><link rel="stylesheet" href="/⛰/AdminRebuild.e554824e.css">`,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ const bundler = new Parcel({
|
|||
defaultTargetOptions: {
|
||||
shouldOptimize: true,
|
||||
shouldScopeHoist: true,
|
||||
sourceMaps: false,
|
||||
sourceMaps: true,
|
||||
distDir: DIST_DIR,
|
||||
publicUrl: PUBLIC_DIR,
|
||||
engines: {
|
||||
|
|
|
|||
2
internal/dis/component/server/assets/dist/Admin.2a36863a.js
vendored
Normal file
2
internal/dis/component/server/assets/dist/Admin.2a36863a.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
internal/dis/component/server/assets/dist/Admin.2a36863a.js.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/Admin.2a36863a.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1 +1,2 @@
|
|||
.modal-terminal{z-index:1000;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:17vh solid #000c;border-width:17vh 17vw;width:66vw;height:66vh;margin:-17vh -17vw;position:fixed;top:17vh;left:17vw;overflow:auto}.modal-terminal button{z-index:1001;position:fixed;top:17vh;right:17vw}.modal-terminal pre,.modal-terminal button{margin:5px}pre code.hljs{padding:1em;display:block;overflow-x:auto}code.hljs{padding:3px 5px}.hljs{color:#444;background:#f3f3f3}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}
|
||||
.modal-terminal{z-index:1000;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:17vh solid #000c;border-width:17vh 17vw;width:66vw;height:66vh;margin:-17vh -17vw;position:fixed;top:17vh;left:17vw;overflow:auto}.modal-terminal button{z-index:1001;position:fixed;top:17vh;right:17vw}.modal-terminal pre,.modal-terminal button{margin:5px}pre code.hljs{padding:1em;display:block;overflow-x:auto}code.hljs{padding:3px 5px}.hljs{color:#444;background:#f3f3f3}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}
|
||||
/*# sourceMappingURL=Admin.9235a6f6.css.map */
|
||||
1
internal/dis/component/server/assets/dist/Admin.9235a6f6.css.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/Admin.9235a6f6.css.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"mappings":"ACAA,4PA4BA,uEAQA,sD,wDC5BwH,0BAA4B,oC,4B,wC,qD,kHAAyY,qIAAmJ,qD,mJ,yB,oE,yB,mC,iC","sources":["Admin.9235a6f6.css","src/lib/remote/index.css","node_modules/highlight.js/styles/default.css"],"sourcesContent":[".modal-terminal {\n z-index: 1000;\n background-color: #fff;\n -webkit-background-clip: padding-box;\n background-clip: padding-box;\n border: 17vh solid #000c;\n border-width: 17vh 17vw;\n width: 66vw;\n height: 66vh;\n margin: -17vh -17vw;\n position: fixed;\n top: 17vh;\n left: 17vw;\n overflow: auto;\n}\n\n.modal-terminal button {\n z-index: 1001;\n position: fixed;\n top: 17vh;\n right: 17vw;\n}\n\n.modal-terminal pre, .modal-terminal button {\n margin: 5px;\n}\n\n/*!\n Theme: Default\n Description: Original highlight.js style\n Author: (c) Ivan Sagalaev <maniac@softwaremaniacs.org>\n Maintainer: @highlightjs/core-team\n Website: https://highlightjs.org/\n License: see project LICENSE\n Touched: 2021\n*/\npre code.hljs {\n padding: 1em;\n display: block;\n overflow-x: auto;\n}\n\ncode.hljs {\n padding: 3px 5px;\n}\n\n.hljs {\n color: #444;\n background: #f3f3f3;\n}\n\n.hljs-comment {\n color: #697070;\n}\n\n.hljs-punctuation, .hljs-tag {\n color: #444a;\n}\n\n.hljs-tag .hljs-attr, .hljs-tag .hljs-name {\n color: #444;\n}\n\n.hljs-attribute, .hljs-doctag, .hljs-keyword, .hljs-meta .hljs-keyword, .hljs-name, .hljs-selector-tag {\n font-weight: 700;\n}\n\n.hljs-deletion, .hljs-number, .hljs-quote, .hljs-selector-class, .hljs-selector-id, .hljs-string, .hljs-template-tag, .hljs-type {\n color: #800;\n}\n\n.hljs-section, .hljs-title {\n color: #800;\n font-weight: 700;\n}\n\n.hljs-link, .hljs-operator, .hljs-regexp, .hljs-selector-attr, .hljs-selector-pseudo, .hljs-symbol, .hljs-template-variable, .hljs-variable {\n color: #ab5656;\n}\n\n.hljs-literal {\n color: #695;\n}\n\n.hljs-addition, .hljs-built_in, .hljs-bullet, .hljs-code {\n color: #397300;\n}\n\n.hljs-meta {\n color: #1f7199;\n}\n\n.hljs-meta .hljs-string {\n color: #38a;\n}\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: 700;\n}\n\n/*# sourceMappingURL=Admin.9235a6f6.css.map */\n",".modal-terminal {\n width: 66vw;\n height: 66vh;\n\n position: fixed;\n left: 17vw;\n top: 17vh;\n\n background-color: white;\n\n background-clip: padding-box;\n -webkit-background-clip: padding-box;\n\n border-left: 17vw solid rgba(0, 0, 0, 0.8);\n border-right: 17vw solid rgba(0, 0, 0, 0.8);\n margin-left: -17vw;\n margin-right: -17vw;\n\n border-top: 17vh solid rgba(0, 0, 0, 0.8);\n border-bottom: 17vh solid rgba(0, 0, 0, 0.8);\n margin-top: -17vh;\n margin-bottom: -17vh;\n\n overflow: auto;\n\n z-index: 1000;\n}\n\n.modal-terminal button {\n position: fixed;\n top: 17vh;\n right: 17vw;\n\n z-index: 1001;\n}\n\n.modal-terminal pre,\n.modal-terminal button\n{\n margin: 5px;\n}\n\n","/*!\n Theme: Default\n Description: Original highlight.js style\n Author: (c) Ivan Sagalaev <maniac@softwaremaniacs.org>\n Maintainer: @highlightjs/core-team\n Website: https://highlightjs.org/\n License: see project LICENSE\n Touched: 2021\n*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}"],"names":[],"version":3,"file":"Admin.9235a6f6.css.map","sourceRoot":"../"}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1,2 @@
|
|||
.wisski{padding:1em}.wisski h3{padding:0}.wisski a.pure-button{float:right;position:relative;bottom:1em}.wisski.running{background-color:#9ada07}.wisski.stopped{background-color:#ff7a7a}.disabled{color:gray}.overflow{overflow:auto}.info-chip{text-align:center;border-radius:5px;min-width:75px;height:15px;padding:5px;display:block}.info-chip.note{color:#fff;background-color:gray}.info-chip.info{color:#fff;background-color:green}.info-chip.warning{color:#000;background-color:#ff0}.info-chip.error{color:#000;background-color:red}
|
||||
.wisski{padding:1em}.wisski h3{padding:0}.wisski a.pure-button{float:right;position:relative;bottom:1em}.wisski.running{background-color:#9ada07}.wisski.stopped{background-color:#ff7a7a}.disabled{color:gray}.overflow{overflow:auto}.info-chip{text-align:center;border-radius:5px;min-width:75px;height:15px;padding:5px;display:block}.info-chip.note{color:#fff;background-color:gray}.info-chip.info{color:#fff;background-color:green}.info-chip.warning{color:#000;background-color:#ff0}.info-chip.error{color:#000;background-color:red}
|
||||
/*# sourceMappingURL=Admin.d1020143.css.map */
|
||||
1
internal/dis/component/server/assets/dist/Admin.d1020143.css.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/Admin.d1020143.css.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"mappings":"ACAA,oBAIA,qBAIA,+DAQA,yCAIA,yCAIA,qBAIA,wBAMA,oGASA,iDAKA,kDAKA,oDAKA","sources":["Admin.d1020143.css","src/entry/Admin/index.css"],"sourcesContent":[".wisski {\n padding: 1em;\n}\n\n.wisski h3 {\n padding: 0;\n}\n\n.wisski a.pure-button {\n float: right;\n position: relative;\n bottom: 1em;\n}\n\n.wisski.running {\n background-color: #9ada07;\n}\n\n.wisski.stopped {\n background-color: #ff7a7a;\n}\n\n.disabled {\n color: gray;\n}\n\n.overflow {\n overflow: auto;\n}\n\n.info-chip {\n text-align: center;\n border-radius: 5px;\n min-width: 75px;\n height: 15px;\n padding: 5px;\n display: block;\n}\n\n.info-chip.note {\n color: #fff;\n background-color: gray;\n}\n\n.info-chip.info {\n color: #fff;\n background-color: green;\n}\n\n.info-chip.warning {\n color: #000;\n background-color: #ff0;\n}\n\n.info-chip.error {\n color: #000;\n background-color: red;\n}\n\n/*# sourceMappingURL=Admin.d1020143.css.map */\n",".wisski {\n padding: 1em;\n}\n\n.wisski h3 {\n padding: 0;\n}\n\n.wisski a.pure-button {\n float: right;\n position: relative;\n bottom: 1em;\n}\n\n/* WissKI Status */\n\n.wisski.running {\n background-color: #9ADA07;\n}\n\n.wisski.stopped {\n background-color: #ff7a7a;\n}\n\n.disabled {\n color: gray;\n}\n\n.overflow {\n overflow: auto;\n}\n\n/* Informational Chips */\n\n.info-chip {\n min-width: 75px;\n height: 15px;\n border-radius: 5px;\n display: block;\n padding: 5px;\n text-align: center;\n}\n\n.info-chip.note {\n background-color: gray;\n color: #fff;\n}\n\n.info-chip.info {\n background-color: green;\n color: #fff;\n}\n\n.info-chip.warning {\n background-color: yellow;\n color: #000;\n}\n\n.info-chip.error {\n background-color: red;\n color: #000;\n}"],"names":[],"version":3,"file":"Admin.d1020143.css.map","sourceRoot":"../"}
|
||||
2
internal/dis/component/server/assets/dist/Admin.f197eb04.js
vendored
Normal file
2
internal/dis/component/server/assets/dist/Admin.f197eb04.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
internal/dis/component/server/assets/dist/Admin.f197eb04.js.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/Admin.f197eb04.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1 +1,2 @@
|
|||
!function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},t={},n={},o=e.parcelRequireafa4;null==o&&((o=function(e){if(e in t)return t[e].exports;if(e in n){var o=n[e];delete n[e];var r={id:e,exports:{}};return t[e]=r,o.call(r.exports,r,r.exports),r.exports}var l=Error("Cannot find module '"+e+"'");throw l.code="MODULE_NOT_FOUND",l}).register=function(e,t){n[e]=t},e.parcelRequireafa4=o),o("dK5Bi");var r=o("8vh0V");async function l(e){return await new Promise((t,n)=>{(0,r.createModal)("provision",[JSON.stringify(e)],{bufferSize:0,onClose:(o,r)=>{if(!o){n(Error(r??"unspecified error"));return}t(e.Slug)}})})}let i=document.getElementById("system"),a=document.getElementById("slug"),c=document.getElementById("php"),d=document.getElementById("opcacheDevelopment"),u=document.getElementById("contentsecuritypolicy"),f=document.getElementById("iipserver");i.addEventListener("submit",e=>{e.preventDefault();let t=document.querySelector('input[name="flavor"]:checked'),n=t instanceof HTMLInputElement?t.value:"";l({Slug:a.value,Flavor:n,System:{PHP:c.value,IIPServer:f.checked,OpCacheDevelopment:d.checked,ContentSecurityPolicy:u.value}}).then(e=>{location.href="/admin/instance/"+e}).catch(e=>{console.error(e),location.reload()})}),i.querySelector("fieldset")?.removeAttribute("disabled")}();
|
||||
!function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},t={},n={},o=e.parcelRequireafa4;null==o&&((o=function(e){if(e in t)return t[e].exports;if(e in n){var o=n[e];delete n[e];var r={id:e,exports:{}};return t[e]=r,o.call(r.exports,r,r.exports),r.exports}var l=Error("Cannot find module '"+e+"'");throw l.code="MODULE_NOT_FOUND",l}).register=function(e,t){n[e]=t},e.parcelRequireafa4=o),o("1cn8L");var r=o("ceWIN");async function l(e){return await new Promise((t,n)=>{(0,r.createModal)("provision",[JSON.stringify(e)],{bufferSize:0,onClose:(o,r)=>{if(!o){n(Error(r??"unspecified error"));return}t(e.Slug)}})})}let i=document.getElementById("system"),c=document.getElementById("slug"),a=document.getElementById("php"),u=document.getElementById("opcacheDevelopment"),d=document.getElementById("contentsecuritypolicy"),f=document.getElementById("iipserver");i.addEventListener("submit",e=>{e.preventDefault();let t=document.querySelector('input[name="flavor"]:checked'),n=t instanceof HTMLInputElement?t.value:"";l({Slug:c.value,Flavor:n,System:{PHP:a.value,IIPServer:f.checked,OpCacheDevelopment:u.checked,ContentSecurityPolicy:d.value}}).then(e=>{location.href="/admin/instance/"+e}).catch(e=>{console.error(e),location.reload()})}),i.querySelector("fieldset")?.removeAttribute("disabled")}();
|
||||
//# sourceMappingURL=AdminProvision.5f2c7fe4.js.map
|
||||
1
internal/dis/component/server/assets/dist/AdminProvision.5f2c7fe4.js.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/AdminProvision.5f2c7fe4.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
internal/dis/component/server/assets/dist/AdminProvision.8569d237.css
vendored
Normal file
2
internal/dis/component/server/assets/dist/AdminProvision.8569d237.css
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
/*# sourceMappingURL=AdminProvision.8569d237.css.map */
|
||||
1
internal/dis/component/server/assets/dist/AdminProvision.8569d237.css.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/AdminProvision.8569d237.css.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"mappings":"","sources":["AdminProvision.8569d237.css","src/entry/AdminProvision/index.css"],"sourcesContent":["\n\n/*# sourceMappingURL=AdminProvision.8569d237.css.map */\n",null],"names":[],"version":3,"file":"AdminProvision.8569d237.css.map","sourceRoot":"../"}
|
||||
|
|
@ -1 +1,2 @@
|
|||
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},t={},n={},o=e.parcelRequireafa4;null==o&&((o=function(e){if(e in t)return t[e].exports;if(e in n){var o=n[e];delete n[e];var r={id:e,exports:{}};return t[e]=r,o.call(r.exports,r,r.exports),r.exports}var l=Error("Cannot find module '"+e+"'");throw l.code="MODULE_NOT_FOUND",l}).register=function(e,t){n[e]=t},e.parcelRequireafa4=o),o("8xGhL");var r=o("12vpF");async function l(e){return await new Promise((t,n)=>{(0,r.createModal)("provision",[JSON.stringify(e)],{bufferSize:0,onClose:(o,r)=>{if(!o){n(Error(r??"unspecified error"));return}t(e.Slug)}})})}const i=document.getElementById("system"),a=document.getElementById("slug"),c=document.getElementById("php"),d=document.getElementById("opcacheDevelopment"),u=document.getElementById("contentsecuritypolicy"),s=document.getElementById("iipserver");i.addEventListener("submit",e=>{e.preventDefault();let t=document.querySelector('input[name="flavor"]:checked'),n=t instanceof HTMLInputElement?t.value:"";l({Slug:a.value,Flavor:n,System:{PHP:c.value,IIPServer:s.checked,OpCacheDevelopment:d.checked,ContentSecurityPolicy:u.value}}).then(e=>{location.href="/admin/instance/"+e}).catch(e=>{console.error(e),location.reload()})}),i.querySelector("fieldset")?.removeAttribute("disabled");
|
||||
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},t={},n={},o=e.parcelRequireafa4;null==o&&((o=function(e){if(e in t)return t[e].exports;if(e in n){var o=n[e];delete n[e];var r={id:e,exports:{}};return t[e]=r,o.call(r.exports,r,r.exports),r.exports}var l=Error("Cannot find module '"+e+"'");throw l.code="MODULE_NOT_FOUND",l}).register=function(e,t){n[e]=t},e.parcelRequireafa4=o),o("jq6PZ");var r=o("aYOJS");async function l(e){return await new Promise((t,n)=>{(0,r.createModal)("provision",[JSON.stringify(e)],{bufferSize:0,onClose:(o,r)=>{if(!o){n(Error(r??"unspecified error"));return}t(e.Slug)}})})}const i=document.getElementById("system"),a=document.getElementById("slug"),c=document.getElementById("php"),d=document.getElementById("opcacheDevelopment"),u=document.getElementById("contentsecuritypolicy"),s=document.getElementById("iipserver");i.addEventListener("submit",e=>{e.preventDefault();let t=document.querySelector('input[name="flavor"]:checked'),n=t instanceof HTMLInputElement?t.value:"";l({Slug:a.value,Flavor:n,System:{PHP:c.value,IIPServer:s.checked,OpCacheDevelopment:d.checked,ContentSecurityPolicy:u.value}}).then(e=>{location.href="/admin/instance/"+e}).catch(e=>{console.error(e),location.reload()})}),i.querySelector("fieldset")?.removeAttribute("disabled");
|
||||
//# sourceMappingURL=AdminProvision.994883f5.js.map
|
||||
1
internal/dis/component/server/assets/dist/AdminProvision.994883f5.js.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/AdminProvision.994883f5.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1 +1,2 @@
|
|||
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},t={},n={},r=e.parcelRequireafa4;null==r&&((r=function(e){if(e in t)return t[e].exports;if(e in n){var r=n[e];delete n[e];var o={id:e,exports:{}};return t[e]=o,r.call(o.exports,o,o.exports),o.exports}var i=Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}).register=function(e,t){n[e]=t},e.parcelRequireafa4=r),r("8xGhL");var o=r("12vpF");async function i(e,t){return await new Promise((n,r)=>{(0,o.createModal)("rebuild",[e,JSON.stringify(t)],{bufferSize:0,onClose:(t,o)=>{if(!t){r(Error(o??"unspecified error"));return}n(e)}})})}const l=document.getElementById("system"),d=document.getElementById("slug"),a=document.getElementById("php"),c=document.getElementById("opcacheDevelopment"),u=document.getElementById("contentsecuritypolicy"),s=document.getElementById("iipserver");l.addEventListener("submit",e=>{e.preventDefault(),i(d.value,{PHP:a.value,IIPServer:s.checked,OpCacheDevelopment:c.checked,ContentSecurityPolicy:u.value}).then(e=>{location.href="/admin/instance/"+e}).catch(e=>{console.error(e),location.reload()})}),l.querySelector("fieldset")?.removeAttribute("disabled");
|
||||
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},t={},n={},r=e.parcelRequireafa4;null==r&&((r=function(e){if(e in t)return t[e].exports;if(e in n){var r=n[e];delete n[e];var o={id:e,exports:{}};return t[e]=o,r.call(o.exports,o,o.exports),o.exports}var i=Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}).register=function(e,t){n[e]=t},e.parcelRequireafa4=r),r("jq6PZ");var o=r("aYOJS");async function i(e,t){return await new Promise((n,r)=>{(0,o.createModal)("rebuild",[e,JSON.stringify(t)],{bufferSize:0,onClose:(t,o)=>{if(!t){r(Error(o??"unspecified error"));return}n(e)}})})}const l=document.getElementById("system"),d=document.getElementById("slug"),a=document.getElementById("php"),c=document.getElementById("opcacheDevelopment"),u=document.getElementById("contentsecuritypolicy"),s=document.getElementById("iipserver");l.addEventListener("submit",e=>{e.preventDefault(),i(d.value,{PHP:a.value,IIPServer:s.checked,OpCacheDevelopment:c.checked,ContentSecurityPolicy:u.value}).then(e=>{location.href="/admin/instance/"+e}).catch(e=>{console.error(e),location.reload()})}),l.querySelector("fieldset")?.removeAttribute("disabled");
|
||||
//# sourceMappingURL=AdminRebuild.5b253105.js.map
|
||||
1
internal/dis/component/server/assets/dist/AdminRebuild.5b253105.js.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/AdminRebuild.5b253105.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1 +1,2 @@
|
|||
!function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},t={},n={},r=e.parcelRequireafa4;null==r&&((r=function(e){if(e in t)return t[e].exports;if(e in n){var r=n[e];delete n[e];var o={id:e,exports:{}};return t[e]=o,r.call(o.exports,o,o.exports),o.exports}var i=Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}).register=function(e,t){n[e]=t},e.parcelRequireafa4=r),r("dK5Bi");var o=r("8vh0V");async function i(e,t){return await new Promise((n,r)=>{(0,o.createModal)("rebuild",[e,JSON.stringify(t)],{bufferSize:0,onClose:(t,o)=>{if(!t){r(Error(o??"unspecified error"));return}n(e)}})})}let l=document.getElementById("system"),d=document.getElementById("slug"),a=document.getElementById("php"),c=document.getElementById("opcacheDevelopment"),u=document.getElementById("contentsecuritypolicy"),f=document.getElementById("iipserver");l.addEventListener("submit",e=>{e.preventDefault(),i(d.value,{PHP:a.value,IIPServer:f.checked,OpCacheDevelopment:c.checked,ContentSecurityPolicy:u.value}).then(e=>{location.href="/admin/instance/"+e}).catch(e=>{console.error(e),location.reload()})}),l.querySelector("fieldset")?.removeAttribute("disabled")}();
|
||||
!function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},t={},n={},r=e.parcelRequireafa4;null==r&&((r=function(e){if(e in t)return t[e].exports;if(e in n){var r=n[e];delete n[e];var o={id:e,exports:{}};return t[e]=o,r.call(o.exports,o,o.exports),o.exports}var i=Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}).register=function(e,t){n[e]=t},e.parcelRequireafa4=r),r("1cn8L");var o=r("ceWIN");async function i(e,t){return await new Promise((n,r)=>{(0,o.createModal)("rebuild",[e,JSON.stringify(t)],{bufferSize:0,onClose:(t,o)=>{if(!t){r(Error(o??"unspecified error"));return}n(e)}})})}let l=document.getElementById("system"),d=document.getElementById("slug"),c=document.getElementById("php"),a=document.getElementById("opcacheDevelopment"),u=document.getElementById("contentsecuritypolicy"),f=document.getElementById("iipserver");l.addEventListener("submit",e=>{e.preventDefault(),i(d.value,{PHP:c.value,IIPServer:f.checked,OpCacheDevelopment:a.checked,ContentSecurityPolicy:u.value}).then(e=>{location.href="/admin/instance/"+e}).catch(e=>{console.error(e),location.reload()})}),l.querySelector("fieldset")?.removeAttribute("disabled")}();
|
||||
//# sourceMappingURL=AdminRebuild.bd32e5c4.js.map
|
||||
1
internal/dis/component/server/assets/dist/AdminRebuild.bd32e5c4.js.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/AdminRebuild.bd32e5c4.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
internal/dis/component/server/assets/dist/AdminRebuild.e554824e.css
vendored
Normal file
2
internal/dis/component/server/assets/dist/AdminRebuild.e554824e.css
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
/*# sourceMappingURL=AdminRebuild.e554824e.css.map */
|
||||
1
internal/dis/component/server/assets/dist/AdminRebuild.e554824e.css.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/AdminRebuild.e554824e.css.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"mappings":"","sources":["AdminRebuild.e554824e.css","src/entry/AdminRebuild/index.css"],"sourcesContent":["\n\n/*# sourceMappingURL=AdminRebuild.e554824e.css.map */\n",null],"names":[],"version":3,"file":"AdminRebuild.e554824e.css.map","sourceRoot":"../"}
|
||||
2
internal/dis/component/server/assets/dist/Default.46ce540b.js
vendored
Normal file
2
internal/dis/component/server/assets/dist/Default.46ce540b.js
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
//# sourceMappingURL=Default.46ce540b.js.map
|
||||
1
internal/dis/component/server/assets/dist/Default.46ce540b.js.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/Default.46ce540b.js.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"mappings":"","sources":["src/base/index.ts"],"sourcesContent":["import 'purecss/build/pure.css'\nimport 'purecss/build/grids-responsive.css'\n\nimport './index.css'\n"],"names":[],"version":3,"file":"Default.46ce540b.js.map","sourceRoot":"../"}
|
||||
2
internal/dis/component/server/assets/dist/Default.5dd67eb3.js
vendored
Normal file
2
internal/dis/component/server/assets/dist/Default.5dd67eb3.js
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
//# sourceMappingURL=Default.5dd67eb3.js.map
|
||||
1
internal/dis/component/server/assets/dist/Default.5dd67eb3.js.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/Default.5dd67eb3.js.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"mappings":"","sources":["src/entry/Default/index.ts"],"sourcesContent":[null],"names":[],"version":3,"file":"Default.5dd67eb3.js.map","sourceRoot":"../"}
|
||||
2
internal/dis/component/server/assets/dist/Default.68829c56.js
vendored
Normal file
2
internal/dis/component/server/assets/dist/Default.68829c56.js
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
//# sourceMappingURL=Default.68829c56.js.map
|
||||
1
internal/dis/component/server/assets/dist/Default.68829c56.js.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/Default.68829c56.js.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"mappings":"","sources":["src/entry/Default/index.ts"],"sourcesContent":[null],"names":[],"version":3,"file":"Default.68829c56.js.map","sourceRoot":"../"}
|
||||
2
internal/dis/component/server/assets/dist/Default.69ba5e86.js
vendored
Normal file
2
internal/dis/component/server/assets/dist/Default.69ba5e86.js
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
//# sourceMappingURL=Default.69ba5e86.js.map
|
||||
1
internal/dis/component/server/assets/dist/Default.69ba5e86.js.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/Default.69ba5e86.js.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"mappings":"","sources":["src/base/index.ts"],"sourcesContent":["import 'purecss/build/pure.css'\nimport 'purecss/build/grids-responsive.css'\n\nimport './index.css'\n"],"names":[],"version":3,"file":"Default.69ba5e86.js.map","sourceRoot":"../"}
|
||||
|
|
@ -1 +1,2 @@
|
|||
a.wisskilink{color:#00f!important}img.biglogo{width:80vw;height:80vw;display:block}@media screen and (min-width:600px){img.biglogo{float:right;width:33vw;max-width:20em;height:33vw;max-height:20em;margin-bottom:-9em;position:relative;top:-9em}}
|
||||
a.wisskilink{color:#00f!important}img.biglogo{width:80vw;height:80vw;display:block}@media screen and (min-width:600px){img.biglogo{float:right;width:33vw;max-width:20em;height:33vw;max-height:20em;margin-bottom:-9em;position:relative;top:-9em}}
|
||||
/*# sourceMappingURL=Default.749670b3.css.map */
|
||||
1
internal/dis/component/server/assets/dist/Default.749670b3.css.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/Default.749670b3.css.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"mappings":"ACAA,kCAIA,iDAOA,oCACI","sources":["Default.749670b3.css","src/entry/Default/index.css"],"sourcesContent":["a.wisskilink {\n color: #00f !important;\n}\n\nimg.biglogo {\n width: 80vw;\n height: 80vw;\n display: block;\n}\n\n@media screen and (min-width: 600px) {\n img.biglogo {\n float: right;\n width: 33vw;\n max-width: 20em;\n height: 33vw;\n max-height: 20em;\n margin-bottom: -9em;\n position: relative;\n top: -9em;\n }\n}\n\n/*# sourceMappingURL=Default.749670b3.css.map */\n","a.wisskilink {\n color: blue !important;\n}\n\nimg.biglogo {\n display: block;\n\n width: 80vw;\n height: 80vw;\n}\n\n@media screen and (min-width: 600px) {\n img.biglogo {\n float: right;\n\n /* set a reasonable size */\n width: 33vw;\n height: 33vw;\n\n /* but don't overdo it */\n max-width: 20em;\n max-height: 20em;\n\n\n /* place image next to the image, overlapping the crumbs bar */\n position: relative;\n top: -9em;\n margin-bottom: -9em;\n }\n}"],"names":[],"version":3,"file":"Default.749670b3.css.map","sourceRoot":"../"}
|
||||
File diff suppressed because one or more lines are too long
1
internal/dis/component/server/assets/dist/Default.75b6a6d8.css.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/Default.75b6a6d8.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
|||
textarea#key{resize:both;width:50%;height:10em}
|
||||
2
internal/dis/component/server/assets/dist/User.1664d889.css
vendored
Normal file
2
internal/dis/component/server/assets/dist/User.1664d889.css
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
textarea#key{resize:both;width:50%;height:10em}
|
||||
/*# sourceMappingURL=User.1664d889.css.map */
|
||||
1
internal/dis/component/server/assets/dist/User.1664d889.css.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/User.1664d889.css.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"mappings":"ACCA","sources":["User.1664d889.css","src/entry/User/index.css"],"sourcesContent":["textarea#key {\n resize: both;\n width: 50%;\n height: 10em;\n}\n\n/*# sourceMappingURL=User.1664d889.css.map */\n","/* textarea on the /user/ssh/add form */\ntextarea#key {\n width: 50%;\n height: 10em;\n resize: both; \n}\n"],"names":[],"version":3,"file":"User.1664d889.css.map","sourceRoot":"../"}
|
||||
|
|
@ -1 +0,0 @@
|
|||
function e(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},n={},r={},o=t.parcelRequireafa4;null==o&&((o=function(e){if(e in n)return n[e].exports;if(e in r){var t=r[e];delete r[e];var o={id:e,exports:{}};return n[e]=o,t.call(o.exports,o,o.exports),o.exports}var i=Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}).register=function(e,t){r[e]=t},t.parcelRequireafa4=o),o.register("gkpdw",function(e,t){o("hZNgY"),o("lFehX")}),o.register("hZNgY",function(e,t){var n=o("7E9W8");document.querySelectorAll(".copy").forEach(e=>{e.addEventListener("click",()=>{navigator.clipboard&&(0,n.discard)(navigator.clipboard.writeText(e.innerText))})})}),o.register("7E9W8",function(t,n){e(t.exports,"discard",function(){return o}),e(t.exports,"runMutexExclusive",function(){return i});let r=console.error.bind(console);function o(e){e.then(()=>{}).catch(r)}function i(e,t){o(e.runExclusive(t))}}),o.register("lFehX",function(e,t){document.querySelectorAll("span").forEach(e=>{e.hasAttribute("data-reveal")&&function(e,t){let n=e.getAttribute("data-reveal")??"(no content)",r=!0,o=()=>{r=!0,e.innerText="(click to reveal)"};o();let i=()=>{r=!1;let t=document.createElement("code");t.append(n),t.addEventListener("click",e=>{e.preventDefault(),navigator.clipboard&&navigator.clipboard.writeText(n).then(()=>{}).catch(console.error.bind(console))}),t.style.userSelect="all",e.innerHTML="",e.append(t)};e.addEventListener("click",e=>{e.preventDefault(),r&&(i(),setTimeout(o,1e4))})}(e,0)})}),o("gkpdw");
|
||||
2
internal/dis/component/server/assets/dist/User.67ac1e81.js
vendored
Normal file
2
internal/dis/component/server/assets/dist/User.67ac1e81.js
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},t={},r={},n=e.parcelRequireafa4;null==n&&((n=function(e){if(e in t)return t[e].exports;if(e in r){var n=r[e];delete r[e];var o={id:e,exports:{}};return t[e]=o,n.call(o.exports,o,o.exports),o.exports}var i=Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}).register=function(e,t){r[e]=t},e.parcelRequireafa4=n),n.register("aS58T",function(e,t){n("jpAna"),n("8rDt9")}),n.register("jpAna",function(e,t){var r=n("24DUY");document.querySelectorAll(".copy").forEach(e=>{e.addEventListener("click",()=>{navigator.clipboard&&(0,r.discard)(navigator.clipboard.writeText(e.innerText))})})}),n.register("24DUY",function(e,t){Object.defineProperty(e.exports,"discard",{get:function(){return n},set:void 0,enumerable:!0,configurable:!0});let r=console.error.bind(console);function n(e){e.then(()=>{}).catch(r)}}),n.register("8rDt9",function(e,t){document.querySelectorAll("span").forEach(e=>{e.hasAttribute("data-reveal")&&function(e,t){let r=e.getAttribute("data-reveal")??"(no content)",n=!0,o=()=>{n=!0,e.innerText="(click to reveal)"};o();let i=()=>{n=!1;let t=document.createElement("code");t.append(r),t.addEventListener("click",e=>{e.preventDefault(),navigator.clipboard&&navigator.clipboard.writeText(r).then(()=>{}).catch(console.error.bind(console))}),t.style.userSelect="all",e.innerHTML="",e.append(t)};e.addEventListener("click",e=>{e.preventDefault(),n&&(i(),setTimeout(o,1e4))})}(e,0)})}),n("aS58T");
|
||||
//# sourceMappingURL=User.67ac1e81.js.map
|
||||
1
internal/dis/component/server/assets/dist/User.67ac1e81.js.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/User.67ac1e81.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
|||
.copy{-webkit-user-select:all;user-select:all}
|
||||
2
internal/dis/component/server/assets/dist/User.72760bc7.css
vendored
Normal file
2
internal/dis/component/server/assets/dist/User.72760bc7.css
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
.copy{-webkit-user-select:all;user-select:all}
|
||||
/*# sourceMappingURL=User.72760bc7.css.map */
|
||||
1
internal/dis/component/server/assets/dist/User.72760bc7.css.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/User.72760bc7.css.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"mappings":"ACAA","sources":["User.72760bc7.css","src/lib/copy/index.css"],"sourcesContent":[".copy {\n -webkit-user-select: all;\n user-select: all;\n}\n\n/*# sourceMappingURL=User.72760bc7.css.map */\n",".copy {\n user-select: all;\n}"],"names":[],"version":3,"file":"User.72760bc7.css.map","sourceRoot":"../"}
|
||||
|
|
@ -1 +0,0 @@
|
|||
!function(){function e(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},n={},r={},o=t.parcelRequireafa4;null==o&&((o=function(e){if(e in n)return n[e].exports;if(e in r){var t=r[e];delete r[e];var o={id:e,exports:{}};return n[e]=o,t.call(o.exports,o,o.exports),o.exports}var i=Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}).register=function(e,t){r[e]=t},t.parcelRequireafa4=o),o.register("kEAtK",function(e,t){o("15EWx"),o("fp21h")}),o.register("15EWx",function(e,t){var n=o("17GEA");document.querySelectorAll(".copy").forEach(e=>{e.addEventListener("click",()=>{navigator.clipboard&&(0,n.discard)(navigator.clipboard.writeText(e.innerText))})})}),o.register("17GEA",function(t,n){e(t.exports,"discard",function(){return o}),e(t.exports,"runMutexExclusive",function(){return i});let r=console.error.bind(console);function o(e){e.then(()=>{}).catch(r)}function i(e,t){o(e.runExclusive(t))}}),o.register("fp21h",function(e,t){document.querySelectorAll("span").forEach(e=>{e.hasAttribute("data-reveal")&&function(e,t){let n=e.getAttribute("data-reveal")??"(no content)",r=!0,o=()=>{r=!0,e.innerText="(click to reveal)"};o();let i=()=>{r=!1;let t=document.createElement("code");t.append(n),t.addEventListener("click",e=>{e.preventDefault(),navigator.clipboard&&navigator.clipboard.writeText(n).then(()=>{}).catch(console.error.bind(console))}),t.style.userSelect="all",e.innerHTML="",e.append(t)};e.addEventListener("click",e=>{e.preventDefault(),r&&(i(),setTimeout(o,1e4))})}(e,0)})}),o("kEAtK")}();
|
||||
2
internal/dis/component/server/assets/dist/User.d3b2edc7.js
vendored
Normal file
2
internal/dis/component/server/assets/dist/User.d3b2edc7.js
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
var e,t,r,n;e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},t={},r={},null==(n=e.parcelRequireafa4)&&((n=function(e){if(e in t)return t[e].exports;if(e in r){var n=r[e];delete r[e];var o={id:e,exports:{}};return t[e]=o,n.call(o.exports,o,o.exports),o.exports}var i=Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}).register=function(e,t){r[e]=t},e.parcelRequireafa4=n),n.register("eejBl",function(e,t){n("5J9YX"),n("lNUmu")}),n.register("5J9YX",function(e,t){var r=n("aPvYT");document.querySelectorAll(".copy").forEach(e=>{e.addEventListener("click",()=>{navigator.clipboard&&(0,r.discard)(navigator.clipboard.writeText(e.innerText))})})}),n.register("aPvYT",function(e,t){Object.defineProperty(e.exports,"discard",{get:function(){return n},set:void 0,enumerable:!0,configurable:!0});let r=console.error.bind(console);function n(e){e.then(()=>{}).catch(r)}}),n.register("lNUmu",function(e,t){document.querySelectorAll("span").forEach(e=>{e.hasAttribute("data-reveal")&&function(e,t){let r=e.getAttribute("data-reveal")??"(no content)",n=!0,o=()=>{n=!0,e.innerText="(click to reveal)"};o();let i=()=>{n=!1;let t=document.createElement("code");t.append(r),t.addEventListener("click",e=>{e.preventDefault(),navigator.clipboard&&navigator.clipboard.writeText(r).then(()=>{}).catch(console.error.bind(console))}),t.style.userSelect="all",e.innerHTML="",e.append(t)};e.addEventListener("click",e=>{e.preventDefault(),n&&(i(),setTimeout(o,1e4))})}(e,0)})}),n("eejBl");
|
||||
//# sourceMappingURL=User.d3b2edc7.js.map
|
||||
1
internal/dis/component/server/assets/dist/User.d3b2edc7.js.map
vendored
Normal file
1
internal/dis/component/server/assets/dist/User.d3b2edc7.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -4,13 +4,17 @@
|
|||
"license": "AGPL-3.0-only",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@types/ws": "^8.5.9",
|
||||
"async-mutex": "^0.4.0",
|
||||
"buffer": "^6.0.3",
|
||||
"dayjs": "^1.11.5",
|
||||
"highlight.js": "^11.7.0",
|
||||
"isomorphic-ws": "^5.0.0",
|
||||
"latex.css": "^1.8.0",
|
||||
"node-html-parser": "^6.1.1",
|
||||
"parcel": "^2.7.0",
|
||||
"purecss": "^2.1.0"
|
||||
"purecss": "^2.1.0",
|
||||
"ws": "^8.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ts-standard": "^12.0.2",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
This folder contains a websocket client to the API.
|
||||
It works in both nodejs and the browser.
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
/** @file provides a list of websocket calls supported by the backend */
|
||||
|
||||
import type { CallSpec } from ".";
|
||||
|
||||
/** Backup backups everything */
|
||||
export function Backup(): CallSpec {
|
||||
return {
|
||||
'call': 'backup',
|
||||
'params': [],
|
||||
}
|
||||
}
|
||||
|
||||
type ProvisionParams = {
|
||||
Slug: string;
|
||||
Flavor?: "Drupal 10" | "Drupal 9",
|
||||
IIPServer?: string,
|
||||
System: SystemParams
|
||||
}
|
||||
|
||||
type SystemParams = {
|
||||
PHP: "Default (8.1)" | "8.0" | "8.1" | "8.2",
|
||||
OpCacheDevelopment: boolean,
|
||||
ContentSecurityPolicy: string,
|
||||
}
|
||||
|
||||
/** Provision provisions a new instance */
|
||||
export function Provision(params: ProvisionParams): CallSpec {
|
||||
return {
|
||||
'call': 'provision',
|
||||
'params': [
|
||||
JSON.stringify(params)
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
/** Snapshot makes a snapshot of an instance */
|
||||
export function Snapshot(Slug: string): CallSpec {
|
||||
return {
|
||||
'call': 'snapshot',
|
||||
'params': [Slug],
|
||||
}
|
||||
}
|
||||
|
||||
/** Rebuild rebuilds an instance */
|
||||
export function Rebuild(Slug: string, params: SystemParams): CallSpec {
|
||||
return {
|
||||
'call': 'rebuild',
|
||||
'params': [
|
||||
Slug,
|
||||
JSON.stringify(params)
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
/** Update updates a specific instance */
|
||||
export function Update(Slug: string): CallSpec {
|
||||
return {
|
||||
'call': 'update',
|
||||
'params': [Slug],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** Start starts a specific instance */
|
||||
export function Start(Slug: string): CallSpec {
|
||||
return {
|
||||
'call': 'start',
|
||||
'params': [Slug],
|
||||
}
|
||||
}
|
||||
|
||||
/** Stop stops a specific instance */
|
||||
export function Stop(Slug: string): CallSpec {
|
||||
return {
|
||||
'call': 'stop',
|
||||
'params': [Slug],
|
||||
}
|
||||
}
|
||||
|
||||
/** Purge purges a specific instance */
|
||||
export function Purge(Slug: string): CallSpec {
|
||||
return {
|
||||
'call': 'purge',
|
||||
'params': [Slug],
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
/** @file implements the websocket protocol used by the distillery */
|
||||
|
||||
import { default as WebSocket } from "isomorphic-ws"
|
||||
import { Buffer } from "buffer";
|
||||
|
||||
/** Call represents a specific WebSocket call */
|
||||
export default class Call {
|
||||
constructor(remote: Remote, spec: CallSpec) {
|
||||
this.remote = remote
|
||||
this.call = spec
|
||||
}
|
||||
|
||||
|
||||
public readonly remote: Readonly<Remote>
|
||||
public readonly call: Readonly<CallSpec>
|
||||
|
||||
/** called right before sending the request */
|
||||
public beforeCall?: (this: Call) => void
|
||||
|
||||
/** called right after the socket is closed */
|
||||
public afterCall?: (this: Call, result: Result) => void
|
||||
|
||||
/** called when an error occurs before rejecting the promise */
|
||||
public onError?: (this: Call, error: any) => void
|
||||
|
||||
/** called when a log line is received */
|
||||
public onLogLine?: (this: Call, line: string) => void
|
||||
|
||||
/** connect checks if the connect method was called */
|
||||
private connected: boolean = false
|
||||
|
||||
/** holds the websocket when the connection is alive */
|
||||
private ws: WebSocket | null = null
|
||||
|
||||
/**
|
||||
* Connect to the specified remote endpoint and perform the action
|
||||
* @param remote Remote to connect to
|
||||
*/
|
||||
connect(): Promise<Result> {
|
||||
// ensure that connect is only run once.
|
||||
if (this.connected) {
|
||||
throw new Error('connect() may only be called once')
|
||||
}
|
||||
this.connected = true
|
||||
|
||||
// and do the connection!
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
// create the websocket
|
||||
const ws = new WebSocket(this.remote.url, this.remote.token ? { 'headers': { 'Authorization': 'Bearer ' + this.remote.token } } : undefined)
|
||||
this.ws = ws // make it available to other things
|
||||
|
||||
// result is a promise, because some APIs in the browser are async
|
||||
let result = Promise.resolve(JSON.stringify({'success': false, 'message': 'Unknown error'}))
|
||||
|
||||
ws.onopen = () => {
|
||||
if (this.beforeCall) {
|
||||
this.beforeCall.call(this)
|
||||
}
|
||||
ws.send(Buffer.from(JSON.stringify(this.call), 'utf8'))
|
||||
}
|
||||
|
||||
ws.onmessage = ({ data }) => {
|
||||
// if this is a string it is a log line
|
||||
if (typeof data === 'string') {
|
||||
if (this.onLogLine) {
|
||||
this.onLogLine.call(this, data)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// decode the message
|
||||
if (data instanceof Blob) {
|
||||
result = data.text()
|
||||
} else {
|
||||
const decoder = new TextDecoder()
|
||||
result = Promise.resolve(decoder.decode(data as ArrayBuffer))
|
||||
}
|
||||
}
|
||||
|
||||
ws.onerror = (err) => {
|
||||
this.close()
|
||||
|
||||
// call the handler and reject
|
||||
if (this.onError) {
|
||||
this.onError.call(this, err)
|
||||
}
|
||||
reject(err)
|
||||
}
|
||||
|
||||
ws.onclose = () => {
|
||||
this.close()
|
||||
|
||||
// decode the result
|
||||
result
|
||||
.then(t => JSON.parse(t))
|
||||
.then((res) => {
|
||||
if (this.afterCall) {
|
||||
this.afterCall.call(this, res)
|
||||
}
|
||||
resolve(res)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** sendText sends some text to the server requests cancellation of an ongoing operation */
|
||||
sendText(text: string) {
|
||||
const ws = this.ws
|
||||
if (ws == null) {
|
||||
throw new Error('websocket not connected')
|
||||
}
|
||||
|
||||
ws.send(text)
|
||||
}
|
||||
|
||||
/** cancel requests cancellation of an ongoing operation */
|
||||
cancel() {
|
||||
const ws = this.ws
|
||||
if (ws == null) {
|
||||
throw new Error('websocket not connected')
|
||||
}
|
||||
|
||||
ws.send(Buffer.from(JSON.stringify({ signal: 'cancel'}), 'utf8'))
|
||||
}
|
||||
|
||||
/** close closes this websocket connection */
|
||||
private close() {
|
||||
const ws = this.ws
|
||||
if (ws == null) {
|
||||
throw new Error('websocket not connected')
|
||||
}
|
||||
|
||||
ws.close()
|
||||
this.ws = null;
|
||||
}
|
||||
}
|
||||
|
||||
/** specifies a remote endpoint */
|
||||
export interface Remote {
|
||||
url: string // the remote websocket url to talk to
|
||||
token?: string // optional token
|
||||
}
|
||||
|
||||
/** CallSpec represents the specification for a call*/
|
||||
export interface CallSpec {
|
||||
call: string
|
||||
params: string[]
|
||||
}
|
||||
|
||||
/** the result of a websocket call */
|
||||
export interface Result {
|
||||
success: boolean,
|
||||
message: string,
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
import './index.css'
|
||||
import callServerAction, { ResultMessage } from './proto'
|
||||
import { Result } from '../apiclient/websocket'
|
||||
import LocalCall from './local'
|
||||
|
||||
type Print = ((text: string, flush?: boolean) => void) & {
|
||||
paintedFrames: number
|
||||
|
|
@ -166,7 +167,7 @@ export function createModal (action: string, params: string[], opts: Partial<Mod
|
|||
finishButton.className = 'pure-button pure-button-success'
|
||||
finishButton.append(typeof opts?.onClose === 'function' ? 'Close & Finish' : 'Close')
|
||||
|
||||
let result: ResultMessage = { success: false, message: 'Nothing happened' }
|
||||
let result: Result = { success: false, message: 'Nothing happened' }
|
||||
finishButton.addEventListener('click', (event) => {
|
||||
event.preventDefault()
|
||||
|
||||
|
|
@ -194,7 +195,7 @@ export function createModal (action: string, params: string[], opts: Partial<Mod
|
|||
window.onbeforeunload = () => 'A remote session is in progress. Are you sure you want to leave?'
|
||||
|
||||
// when closing, add a button to the modal!
|
||||
const close = (message: ResultMessage): void => {
|
||||
const close = (message: Result): void => {
|
||||
result = message
|
||||
|
||||
if (result.success) {
|
||||
|
|
@ -214,32 +215,25 @@ export function createModal (action: string, params: string[], opts: Partial<Mod
|
|||
|
||||
print('Connecting ...', true)
|
||||
|
||||
// backendURL is the backend url to connect to
|
||||
const backendURL = location.protocol.replace('http', 'ws') + '//' + location.host + '/api/v1/ws'
|
||||
|
||||
// connect to the socket and send the action
|
||||
callServerAction(
|
||||
backendURL,
|
||||
{
|
||||
call: action,
|
||||
params
|
||||
},
|
||||
(
|
||||
send: (text: string) => void,
|
||||
cancel: () => void
|
||||
) => {
|
||||
cancelButton.removeAttribute('disabled')
|
||||
const call = new LocalCall({
|
||||
call: action,
|
||||
params
|
||||
});
|
||||
|
||||
call.beforeCall = function() {
|
||||
cancelButton.removeAttribute('disabled')
|
||||
cancelButton.addEventListener('click', (event) => {
|
||||
event.preventDefault()
|
||||
|
||||
print('^C\n', true)
|
||||
cancel()
|
||||
this.cancel()
|
||||
})
|
||||
print(' Connected.\n', true)
|
||||
},
|
||||
print
|
||||
).then(close)
|
||||
.catch(() => {
|
||||
close({ success: false, message: 'connection closed unexpectedly' })
|
||||
})
|
||||
}
|
||||
call.onLogLine = print;
|
||||
|
||||
call.connect()
|
||||
.then((result) => close(result))
|
||||
.catch(() => close({ success: false, message: 'connection closed unexpectedly' }));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
import { default as Call, CallSpec } from '../apiclient/websocket';
|
||||
|
||||
/** LocalCall is like Call, but uses the current page */
|
||||
export default class LocalCall extends Call {
|
||||
constructor(spec: CallSpec) {
|
||||
super({ url: location.protocol.replace('http', 'ws') + '//' + location.host + '/api/v1/ws'}, spec);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
import { Mutex } from 'async-mutex'
|
||||
|
||||
import { runMutexExclusive } from '~/src/lib/discard'
|
||||
|
||||
export interface CallMessage { call: string, params?: string[] | null }
|
||||
export type ResultMessage = { success: true } | { success: false, message: string }
|
||||
export interface SignalMessage { signal: string }
|
||||
function isResultMessage (value: any): value is ResultMessage {
|
||||
return typeof value === 'object' &&
|
||||
Object.prototype.hasOwnProperty.call(value, 'success') &&
|
||||
(
|
||||
(value.success === true) ||
|
||||
(value.success === false && Object.prototype.hasOwnProperty.call(value, 'message') && (typeof value.message === 'string'))
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a WebSocket connection and calls a server action
|
||||
* @param endpoint Endpoint to call
|
||||
* @param call Function to call
|
||||
* @param onOpen callback for once the connection is opened. The send function can be used to send additional text to the server. It should include newlines.
|
||||
* @param onText called when the connection receives some text, including newlines.
|
||||
* @returns a promise that is resolved once the conneciton is closed. Rejected if the connection errors.
|
||||
*/
|
||||
export default async function callServerAction (
|
||||
endpoint: string,
|
||||
call: CallMessage,
|
||||
onOpen: (send: (text: string) => void, cancel: () => void) => void,
|
||||
onText: (text: string) => void
|
||||
): Promise<ResultMessage> {
|
||||
return await new Promise((resolve, reject) => {
|
||||
const mutex = new Mutex()
|
||||
|
||||
const socket = new WebSocket(endpoint)
|
||||
|
||||
let result: ResultMessage
|
||||
socket.onmessage = (msg) => {
|
||||
runMutexExclusive(mutex, async () => {
|
||||
if (typeof msg.data === 'string') {
|
||||
onText(msg.data)
|
||||
return
|
||||
}
|
||||
|
||||
if (msg.data instanceof Blob) {
|
||||
const object = JSON.parse(await msg.data.text())
|
||||
if (isResultMessage(object)) {
|
||||
if (object.success) {
|
||||
result = { success: true }
|
||||
} else {
|
||||
result = { success: false, message: object.message }
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
console.warn('Unknown message', msg)
|
||||
})
|
||||
}
|
||||
socket.onclose = () => {
|
||||
mutex.runExclusive(() => resolve(result)).then(() => {}).catch(console.error.bind(console))
|
||||
}
|
||||
socket.onerror = reject // if an error occurs, close the socket
|
||||
|
||||
socket.onopen = () => {
|
||||
const blob = new Blob([JSON.stringify(call)])
|
||||
socket.send(blob)
|
||||
|
||||
onOpen(
|
||||
(text: string) => {
|
||||
if (typeof text !== 'string') {
|
||||
console.warn('Ignoring send() call with unknown type', text)
|
||||
return
|
||||
}
|
||||
socket.send(text)
|
||||
},
|
||||
() => {
|
||||
const blob = new Blob([JSON.stringify({ signal: 'cancel' })])
|
||||
socket.send(blob)
|
||||
}
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -914,11 +914,25 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
|
||||
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==
|
||||
|
||||
"@types/node@*":
|
||||
version "20.9.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.9.0.tgz#bfcdc230583aeb891cf51e73cfdaacdd8deae298"
|
||||
integrity sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==
|
||||
dependencies:
|
||||
undici-types "~5.26.4"
|
||||
|
||||
"@types/semver@^7.3.12":
|
||||
version "7.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a"
|
||||
integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==
|
||||
|
||||
"@types/ws@^8.5.9":
|
||||
version "8.5.9"
|
||||
resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.9.tgz#384c489f99c83225a53f01ebc3eddf3b8e202a8c"
|
||||
integrity sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@typescript-eslint/eslint-plugin@^5.0.0":
|
||||
version "5.62.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db"
|
||||
|
|
@ -1161,6 +1175,11 @@ base-x@^3.0.8:
|
|||
dependencies:
|
||||
safe-buffer "^5.0.1"
|
||||
|
||||
base64-js@^1.3.1:
|
||||
version "1.5.1"
|
||||
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
|
||||
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
|
||||
|
||||
boolbase@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
|
||||
|
|
@ -1191,6 +1210,14 @@ browserslist@^4.6.6:
|
|||
node-releases "^2.0.13"
|
||||
update-browserslist-db "^1.0.11"
|
||||
|
||||
buffer@^6.0.3:
|
||||
version "6.0.3"
|
||||
resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6"
|
||||
integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==
|
||||
dependencies:
|
||||
base64-js "^1.3.1"
|
||||
ieee754 "^1.2.1"
|
||||
|
||||
builtins@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9"
|
||||
|
|
@ -2112,6 +2139,11 @@ htmlparser2@^7.1.1:
|
|||
domutils "^2.8.0"
|
||||
entities "^3.0.1"
|
||||
|
||||
ieee754@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
|
||||
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
|
||||
|
||||
ignore@^5.1.1, ignore@^5.2.0:
|
||||
version "5.2.4"
|
||||
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
|
||||
|
|
@ -2336,6 +2368,11 @@ isexe@^2.0.0:
|
|||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
|
||||
|
||||
isomorphic-ws@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz#e5529148912ecb9b451b46ed44d53dae1ce04bbf"
|
||||
integrity sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==
|
||||
|
||||
iterator.prototype@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.0.tgz#690c88b043d821f783843aaf725d7ac3b62e3b46"
|
||||
|
|
@ -3397,6 +3434,11 @@ unbox-primitive@^1.0.2:
|
|||
has-symbols "^1.0.3"
|
||||
which-boxed-primitive "^1.0.2"
|
||||
|
||||
undici-types@~5.26.4:
|
||||
version "5.26.5"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
|
||||
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
|
||||
|
||||
update-browserslist-db@^1.0.11:
|
||||
version "1.0.11"
|
||||
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940"
|
||||
|
|
@ -3484,6 +3526,11 @@ wrappy@1:
|
|||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
|
||||
|
||||
ws@^8.14.2:
|
||||
version "8.14.2"
|
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.2.tgz#6c249a806eb2db7a20d26d51e7709eab7b2e6c7f"
|
||||
integrity sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==
|
||||
|
||||
xdg-basedir@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue