@hap-toolkit/server 2.0.10-beta.1 → 2.1.0
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 +51 -51
- package/README.md +3 -3
- package/lib/preview/static/common.css +7 -7
- package/lib/preview/static/common.js +116 -116
- package/lib/preview/static/web.js +56878 -56878
- package/lib/preview/views/404.html +3 -3
- package/lib/preview/views/page.html +25 -25
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Copyright (c) 2021-present, the hapjs-platform Project Contributors
|
|
3
|
-
SPDX-License-Identifier: Apache-2.0
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) 2021-present, the hapjs-platform Project Contributors
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
--><!DOCTYPE html><html><head><meta charset="utf-8"><title>404 Not Found</title><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="apple-touch-fullscreen" content="yes"><meta name="format-detection" content="telephone=no, email=no"><meta name="referrer" content="no-referrer"><link href="/preview-static/common.css" rel="stylesheet"><style type="text/css">body{margin:0;background-color:#fff;font-size:16px}.content{padding-top:26vh;display:flex;flex-direction:column;align-items:center}.img{display:block;width:100px;height:100px}.tips{margin-top:6px;margin-bottom:0;color:rgba(0,0,0,.5)}.btn{margin-top:20px;font-size:16px;line-height:34px;border-radius:17px;padding:0 13px;background:#fff;color:#0ea8ff;text-align:center;text-decoration:none;border:2px solid #0ea8ff}</style></head><body><div class="content"><img src="/preview-static/img.png" alt="page-not-found" class="img"><p class="tips">很抱歉,该页面不存在</p><p class="tips"><b>{{message}}</b></p><a class="btn" href="/preview">返回快应用首页</a></div><script src="/preview-static/common.js"></script><!-- Global site tag (gtag.js) - Google Analytics --><script async src="https://www.googletagmanager.com/gtag/js?id=UA-129793617-6"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","UA-129793617-6")</script></body></html>
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Copyright (c) 2021-present, the hapjs-platform Project Contributors
|
|
3
|
-
SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
--><!DOCTYPE html><html><head><meta charset="utf-8"><title>{{ title }}</title><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="apple-touch-fullscreen" content="yes"><meta name="format-detection" content="telephone=no, email=no"><meta name="referrer" content="no-referrer"><style>#mask{position:fixed;top:0;bottom:0;left:0;right:0;background:rgba(42,43,46,.9);padding:.8rem .27rem .27rem .27rem;z-index:1002}#btn{width:.67rem;height:.67rem;border:.04rem solid #ccc;border-radius:50%;color:#ccc;line-height:.59rem;font-size:.67rem;text-align:center;margin:auto}#text{height:95%;color:#f60;font-size:.35rem;white-space:break-spaces;word-break:break-word;overflow:auto;margin-top:.27rem}#text::-webkit-scrollbar{display:none}#loading{position:fixed;top:0;bottom:0;left:0;right:0;background:url(/preview-static/loading.gif) no-repeat center;background-size:15%;background-position:center;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:1001}.dark{background-color:#252526!important;color:rgba(255,255,255,.8)}.light{background-color:#fff!important;color:rgba(0,0,0,.8)}#loading:after{display:block;font-size:.45rem;transform:translateY(200%)}#progress-bar{position:fixed;top:55%;width:100%;font-size:.45rem;text-align:center;z-index:1002}</style><script src="hap-preview://index.js"></script><script type="text/javascript">if (`{{devtoolUrl}}`) {
|
|
5
|
-
document.write('<script src="{{devtoolUrl}}">\x3C/script>')
|
|
6
|
-
}</script><!-- https://statres.quickapp.cn/quickapp/ide/web.js --><script src="{{webJsUrl}}"></script><script type="text/javascript">window.Hap||document.write('<script src="/preview-static/web.js"><\/script>')</script><script type="text/javascript">var base = '/preview'
|
|
7
|
-
var type = '{{ type }}'
|
|
8
|
-
window.language = `{{language}}`
|
|
9
|
-
window.mediaQueryParams = JSON.parse(`{{mediaQueryParams}}`)
|
|
10
|
-
;(function preview() {
|
|
11
|
-
var routeName = '{{ routeName }}'
|
|
12
|
-
Hap.init({
|
|
13
|
-
base,
|
|
14
|
-
type,
|
|
15
|
-
idePlatform: `{{devtoolUrl}}` ? 'extensionOnline' : undefined
|
|
16
|
-
})
|
|
17
|
-
})()</script><script src="/preview-static/common.js"></script></head><body><div id="scriptNotFound" style="display:none"><p>找不到页面 js 文件 {{ script }}</p><p>编译可能存在异常</p></div><script type="text/javascript">if ({{ scriptNotFound }}) {
|
|
18
|
-
// TODO loading
|
|
19
|
-
setTimeout(() => {
|
|
20
|
-
var el = document.getElementById('scriptNotFound')
|
|
21
|
-
// 如果页面 js 已加载,#scriptNotFound 将会被 web.js 移除
|
|
22
|
-
if (el) {
|
|
23
|
-
el.style.display = 'block'
|
|
24
|
-
}
|
|
25
|
-
}, 1000)
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) 2021-present, the hapjs-platform Project Contributors
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
--><!DOCTYPE html><html><head><meta charset="utf-8"><title>{{ title }}</title><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="apple-touch-fullscreen" content="yes"><meta name="format-detection" content="telephone=no, email=no"><meta name="referrer" content="no-referrer"><style>#mask{position:fixed;top:0;bottom:0;left:0;right:0;background:rgba(42,43,46,.9);padding:.8rem .27rem .27rem .27rem;z-index:1002}#btn{width:.67rem;height:.67rem;border:.04rem solid #ccc;border-radius:50%;color:#ccc;line-height:.59rem;font-size:.67rem;text-align:center;margin:auto}#text{height:95%;color:#f60;font-size:.35rem;white-space:break-spaces;word-break:break-word;overflow:auto;margin-top:.27rem}#text::-webkit-scrollbar{display:none}#loading{position:fixed;top:0;bottom:0;left:0;right:0;background:url(/preview-static/loading.gif) no-repeat center;background-size:15%;background-position:center;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:1001}.dark{background-color:#252526!important;color:rgba(255,255,255,.8)}.light{background-color:#fff!important;color:rgba(0,0,0,.8)}#loading:after{display:block;font-size:.45rem;transform:translateY(200%)}#progress-bar{position:fixed;top:55%;width:100%;font-size:.45rem;text-align:center;z-index:1002}</style><script src="hap-preview://index.js"></script><script type="text/javascript">if (`{{devtoolUrl}}`) {
|
|
5
|
+
document.write('<script src="{{devtoolUrl}}">\x3C/script>')
|
|
6
|
+
}</script><!-- https://statres.quickapp.cn/quickapp/ide/web.js --><script src="{{webJsUrl}}"></script><script type="text/javascript">window.Hap||document.write('<script src="/preview-static/web.js"><\/script>')</script><script type="text/javascript">var base = '/preview'
|
|
7
|
+
var type = '{{ type }}'
|
|
8
|
+
window.language = `{{language}}`
|
|
9
|
+
window.mediaQueryParams = JSON.parse(`{{mediaQueryParams}}`)
|
|
10
|
+
;(function preview() {
|
|
11
|
+
var routeName = '{{ routeName }}'
|
|
12
|
+
Hap.init({
|
|
13
|
+
base,
|
|
14
|
+
type,
|
|
15
|
+
idePlatform: `{{devtoolUrl}}` ? 'extensionOnline' : undefined
|
|
16
|
+
})
|
|
17
|
+
})()</script><script src="/preview-static/common.js"></script></head><body><div id="scriptNotFound" style="display:none"><p>找不到页面 js 文件 {{ script }}</p><p>编译可能存在异常</p></div><script type="text/javascript">if ({{ scriptNotFound }}) {
|
|
18
|
+
// TODO loading
|
|
19
|
+
setTimeout(() => {
|
|
20
|
+
var el = document.getElementById('scriptNotFound')
|
|
21
|
+
// 如果页面 js 已加载,#scriptNotFound 将会被 web.js 移除
|
|
22
|
+
if (el) {
|
|
23
|
+
el.style.display = 'block'
|
|
24
|
+
}
|
|
25
|
+
}, 1000)
|
|
26
26
|
}</script><!-- Global site tag (gtag.js) - Google Analytics --><script async src="https://www.googletagmanager.com/gtag/js?id=G-W1C4XTJP2Y"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-W1C4XTJP2Y")</script></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hap-toolkit/server",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "hap server",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=14.0.0"
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@babel/runtime": "^7.9.6",
|
|
29
|
-
"@hap-toolkit/debugger": "2.0
|
|
30
|
-
"@hap-toolkit/packager": "2.0
|
|
31
|
-
"@hap-toolkit/shared-utils": "2.0
|
|
29
|
+
"@hap-toolkit/debugger": "2.1.0",
|
|
30
|
+
"@hap-toolkit/packager": "2.1.0",
|
|
31
|
+
"@hap-toolkit/shared-utils": "2.1.0",
|
|
32
32
|
"@jayfate/path": "^0.0.13",
|
|
33
33
|
"crypto-js": "^4.1.1",
|
|
34
34
|
"fs-extra": "^10.0.0",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"request": "^2.88.2",
|
|
48
48
|
"resolve": "^1.22.2"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "b4e77281ac1c1ffd1c1425dd28c17b8a246576ce"
|
|
51
51
|
}
|