@dcloudio/uni-app-plus 0.0.1-nvue3.3030820220125001

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.
@@ -0,0 +1,16 @@
1
+ var e,t=Object.prototype.hasOwnProperty,n=function(e){return null==e},r=Array.isArray,o=function(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}},u=/\B([A-Z])/g,i=o((function(e){return e.replace(u,"-$1").toLowerCase()})),c=/-(\w)/g,a=o((function(e){return e.replace(c,(function(e,t){return t?t.toUpperCase():""}))})),s=o((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),f=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;function l(e,n){if(r(e))return e;if(n&&(o=n,u=e,t.call(o,u)))return[e];var o,u,i=[];return e.replace(f,(function(e,t,n,r){return i.push(n?r.replace(/\\(\\)?/g,"$1"):t||e),r})),i}function d(e,t){var r,o=l(t,e);for(r=o.shift();!n(r);){if(null==(e=e[r]))return;r=o.shift()}return e}function p(e){return e.__wxWebviewId__?e.__wxWebviewId__:e.privateProperties?e.privateProperties.slaveId:e.$page?e.$page.id:void 0}function g(e){return e.route||e.uri}function m(e){return e.options||e.$page&&e.$page.options||{}}function v(e){return{id:p(e),path:g(e),query:m(e)}}function _(e){var t=function(e){return getCurrentPages().find((function(t){return p(t)===e}))}(e);return t&&t.$vm}function h(e,t){var n=_(e);return n&&function e(t,n){var r;return t&&(!function(e,t){return function(e){if(e._$weex)return e._uid;if(e._$id)return e._$id;var t=function(e){for(var t=e.$parent;t;){if(t._$id)return t;t=t.$parent}}(e);if(!e.$parent)return"-1";var n=e.$vnode,r=n.context;return r&&r!==t&&r._$id?r._$id+";"+t._$id+","+n.data.attrs._i:t._$id+","+n.data.attrs._i}(e)===t}(t,n)?t.$children.find((function(t){return r=e(t,n)})):r=t),r}(n,t)}function E(e,t){var n;return e&&(n=t?d(e.$data,t):Object.assign({},e.$data)),Promise.resolve({data:n})}function y(e,t){return e&&Object.keys(t).forEach((function(n){e[n]=t[n]})),Promise.resolve()}function w(t,n,r){return new Promise((function(o,u){if(!t)return u(e.VM_NOT_EXISTS);if(!t[n])return u(e.VM_NOT_EXISTS);var i,c=t[n].apply(t,r);!(i=c)||"object"!=typeof i&&"function"!=typeof i||"function"!=typeof i.then?o({result:c}):c.then((function(e){o({result:e})}))}))}!function(e){e.VM_NOT_EXISTS="VM_NOT_EXISTS",e.METHOD_NOT_EXISTS="METHOD_NOT_EXISTS"}(e||(e={}));var T=["stopRecord","getRecorderManager","pauseVoice","stopVoice","pauseBackgroundAudio","stopBackgroundAudio","getBackgroundAudioManager","createAudioContext","createInnerAudioContext","createVideoContext","createCameraContext","createMapContext","canIUse","startAccelerometer","stopAccelerometer","startCompass","stopCompass","hideToast","hideLoading","showNavigationBarLoading","hideNavigationBarLoading","navigateBack","createAnimation","pageScrollTo","createSelectorQuery","createCanvasContext","createContext","drawCanvas","hideKeyboard","stopPullDownRefresh","arrayBufferToBase64","base64ToArrayBuffer"],x={},P=/Sync$/,S=/^on|^off/;function O(e){return P.test(e)||-1!==T.indexOf(e)}var $={getPageStack:function(){return Promise.resolve({pageStack:getCurrentPages().map((function(e){return v(e)}))})},getCurrentPage:function(){var e=getCurrentPages(),t=e.length;return new Promise((function(n,r){t?n(v(e[t-1])):r(Error("getCurrentPages().length=0"))}))},callUniMethod:function(e){var t=e.method,n=e.args;return new Promise((function(e,r){if(!uni[t])return r(Error("uni."+t+" not exists"));if(O(t))return e({result:uni[t].apply(uni,n)});var o=[Object.assign({},n[0]||{},{success:function(n){setTimeout((function(){e({result:n})}),"pageScrollTo"===t?350:0)},fail:function(e){r(Error(e.errMsg.replace(t+":fail ","")))}})];uni[t].apply(uni,o)}))},mockUniMethod:function(e){var t=e.method;if(!uni[t])throw Error("uni."+t+" not exists");if(!function(e){return!S.test(e)}(t))throw Error("You can't mock uni."+t);var r=e.result;if(n(r))return x[t]&&(uni[t]=x[t],delete x[t]),Promise.resolve();var o=O(t)?function(){return r}:function(e){setTimeout((function(){r.errMsg&&-1!==r.errMsg.indexOf(":fail")?e.fail&&e.fail(r):e.success&&e.success(r),e.complete&&e.complete(r)}),4)};return x[t]||(x[t]=uni[t]),uni[t]=o,Promise.resolve()}},b={getData:function(e){return E(_(e.pageId),e.path)},setData:function(e){return y(_(e.pageId),e.data)},callMethod:function(t){var n,r=((n={})[e.VM_NOT_EXISTS]="Page["+t.pageId+"] not exists",n[e.METHOD_NOT_EXISTS]="page."+t.method+" not exists",n);return new Promise((function(e,n){w(_(t.pageId),t.method,t.args).then((function(t){return e(t)})).catch((function(e){n(Error(r[e]))}))}))}};function I(e){return e.nodeId||e.elementId}var C={getData:function(e){return E(h(e.pageId,I(e)),e.path)},setData:function(e){return y(h(e.pageId,I(e)),e.data)},callMethod:function(t){var n,r=I(t),o=((n={})[e.VM_NOT_EXISTS]="Component["+t.pageId+":"+r+"] not exists",n[e.METHOD_NOT_EXISTS]="component."+t.method+" not exists",n);return new Promise((function(e,n){w(h(t.pageId,r),t.method,t.args).then((function(t){return e(t)})).catch((function(e){n(Error(o[e]))}))}))}};
2
+ /*! *****************************************************************************
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
5
+ this file except in compliance with the License. You may obtain a copy of the
6
+ License at http://www.apache.org/licenses/LICENSE-2.0
7
+
8
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
10
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
11
+ MERCHANTABLITY OR NON-INFRINGEMENT.
12
+
13
+ See the Apache Version 2.0 License for specific language governing permissions
14
+ and limitations under the License.
15
+ ***************************************************************************** */
16
+ function M(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var u=arguments[t],i=0,c=u.length;i<c;i++,o++)r[o]=u[i];return r}"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);for(var A=[],D=0;D<256;++D)A[D]=(D+256).toString(16).substr(1);function N(e){var t=getCurrentPages().find((function(t){return t.$page.id===e}));if(!t)throw Error("page["+e+"] not found");var n=t.$vm._$weex;return n.document.__$weex__||(n.document.__$weex__=n),n.document}var k={},q={};["text","image","input","textarea","video","web-view","slider"].forEach((function(e){k[e]=!0,q["u-"+e]=!0}));var j=["movable-view","picker","ad","button","checkbox-group","checkbox","form","icon","label","movable-area","navigator","picker-view-column","picker-view","progress","radio-group","radio","rich-text","u-slider","swiper-item","swiper","switch"],R=j.map((function(e){return s(a(e))}));function V(e){var t=e.type;if(q[t])return t.replace("u-","");var n=e.__vue__&&e.__vue__.$options.name;return"USlider"===n?"slider":n&&-1!==R.indexOf(n)?i(n):t}function L(e){var t={elementId:e.nodeId,tagName:V(e),nvue:!0},n=e.__vue__;return n&&!n.$options.isReserved&&(t.nodeId=n._uid),"video"===t.tagName&&(t.videoId=t.nodeId),t}function B(e,t,n){for(var r=e.children,o=0;o<r.length;o++){var u=r[o];if(t(u)){if(!n)return u;n.push(u)}if(n)B(u,t,n);else{var i=B(u,t,n);if(i)return i}}return n}function H(e,t,n){var r,o;if(0===t.indexOf("#")?(r=t.substr(1),o=function(e){return e.attr&&e.attr.id===r}):0===t.indexOf(".")&&(r=t.substr(1),o=function(e){return e.classList&&-1!==e.classList.indexOf(r)}),o){var u=B(e,o,n);if(!u)throw Error("Node("+t+") not exists");return u}if("body"===t)return Object.assign({},e,{type:"page"});0===t.indexOf("uni-")&&(t=t.replace("uni-",""));var i=k[t]?"u-"+t:t,c=-1!==j.indexOf(i)?s(a(i)):"",f=B(e,(function(e){return e.type===i||c&&e.__vue__&&e.__vue__.$options.name===c}),n);if(!f)throw Error("Node("+t+") not exists");return f}var U=[{test:function(e){return 2===e.length&&-1!==e.indexOf("document.documentElement.scrollWidth")&&-1!==e.indexOf("document.documentElement.scrollHeight")},call:function(e){var t=e.__$weex__||e.ownerDocument.__$weex__;return new Promise((function(n){"scroll-view"===e.type&&1===e.children.length&&(e=e.children[0]),t.requireModule("dom").getComponentRect(e.ref,(function(e){e.result?n([e.size.width,e.size.height]):n([0,0])}))}))}},{test:function(e){return 1===e.length&&"document.documentElement.scrollTop"===e[0]},call:function(e){var t=e.__$weex__||e.ownerDocument.__$weex__;return new Promise((function(n){"scroll-view"===e.type&&1===e.children.length&&(e=e.children[0]),t.requireModule("dom").getComponentRect(e.ref,(function(e){n([e.size&&Math.abs(e.size.top)||0])}))}))}},{test:function(e){return 2===e.length&&-1!==e.indexOf("offsetWidth")&&-1!==e.indexOf("offsetHeight")},call:function(e){var t=e.__$weex__||e.ownerDocument.__$weex__;return new Promise((function(n){t.requireModule("dom").getComponentRect(e.ref,(function(e){e.result?n([e.size.width,e.size.height]):n([0,0])}))}))}},{test:function(e,t){return 1===e.length&&"innerText"===e[0]},call:function(e){return Promise.resolve([X(e,[]).join("")])}}];function X(e,t){return"u-text"===e.type?t.push(e.attr.value):e.pureChildren.map((function(e){return X(e,t)})),t}function W(e){return e.replace(/\n/g,"").replace(/<u-/g,"<").replace(/<\/u-/g,"</")}function z(e,t){return"outer"===t?"body"===e.role&&"scroll-view"===e.type?"<page>"+W(z(e,"inner"))+"</page>":W(e.toString()):W(e.pureChildren.map((function(e){return e.toString()})).join(""))}var J={input:{input:function(e,t){e.setValue(t)}},textarea:{input:function(e,t){e.setValue(t)}},"scroll-view":{scrollTo:function(e,t,n){e.scrollTo(n)},scrollTop:function(e){return 0},scrollLeft:function(e){return 0},scrollWidth:function(e){return 0},scrollHeight:function(e){return 0}},swiper:{swipeTo:function(e,t){e.__vue__.current=t}},"movable-view":{moveTo:function(e,t,n){var r=e.__vue__;r.x=t,r.y=n}},switch:{tap:function(e){var t=e.__vue__;t.checked=!t.checked}},slider:{slideTo:function(e,t){e.__vue__.value=t}}};function F(e){return N(e).body}var K={getWindow:function(e){return F(e)},getDocument:function(e){return F(e)},getEl:function(e,t){var n=N(t).getRef(e);if(!n)throw Error("element destroyed");return n},getOffset:function(e){var t=e.__$weex__||e.ownerDocument.__$weex__;return new Promise((function(n){t.requireModule("dom").getComponentRect(e.ref,(function(e){e.result?n({left:e.size.left,top:e.size.top}):n({left:0,top:0})}))}))},querySelector:function(e,t){return Promise.resolve(L(H(e,t)))},querySelectorAll:function(e,t){return Promise.resolve({elements:H(e,t,[]).map((function(e){return L(e)}))})},queryProperties:function(e,t){var n=U.find((function(n){return n.test(t,e)}));return n?n.call(e).then((function(e){return{properties:e}})):Promise.resolve({properties:t.map((function(t){return d(e,t)}))})},queryAttributes:function(e,t){var n=e.attr;return Promise.resolve({attributes:t.map((function(t){return"class"===t?(e.classList||[]).join(" "):String(n[t]||n[a(t)]||"")}))})},queryStyles:function(e,t){var n=e.style;return Promise.resolve({styles:t.map((function(e){return n[e]}))})},queryHTML:function(e,t){return Promise.resolve({html:z(e,t)})},dispatchTapEvent:function(e){return e.fireEvent("click",{timeStamp:Date.now(),target:e,currentTarget:e},!0),Promise.resolve()},dispatchLongpressEvent:function(e){return e.fireEvent("longpress",{timeStamp:Date.now(),target:e,currentTarget:e},!0),Promise.resolve()},dispatchTouchEvent:function(e,t,n){return n||(n={}),n.touches||(n.touches=[]),n.changedTouches||(n.changedTouches=[]),n.touches.length||n.touches.push({identifier:Date.now(),target:e}),e.fireEvent(t,Object.assign({timeStamp:Date.now(),target:e,currentTarget:e},n),!0),Promise.resolve()},callFunction:function(e,t,n){var r=d(J,t);return r?Promise.resolve({result:r.apply(null,M([e],n))}):Promise.reject(Error(t+" not exists"))},triggerEvent:function(e,t,n){var r=e.__vue__;return r?r.$trigger&&r.$trigger(t,{},n):e.fireEvent(t,{timeStamp:Date.now(),target:e,currentTarget:e},!1,{params:[{detail:n}]}),Promise.resolve()}};var Q={};Object.keys($).forEach((function(e){Q["App."+e]=$[e]})),Object.keys(b).forEach((function(e){Q["Page."+e]=b[e]})),Object.keys(C).forEach((function(e){Q["Element."+e]=C[e]}));var Y,Z,G,ee=process.env.UNI_AUTOMATOR_WS_ENDPOINT;function te(e){G.send({data:JSON.stringify(e)})}function ne(e){var t=JSON.parse(e.data),n=t.id,r=t.method,o=t.params,u={id:n},i=Q[r];if(!i){if(Z){var c=Z(n,r,o,u);if(!0===c)return;i=c}if(!i)return u.error={message:r+" unimplemented"},te(u)}try{i(o).then((function(e){e&&(u.result=e)})).catch((function(e){u.error={message:e.message}})).finally((function(){te(u)}))}catch(e){u.error={message:e.message},te(u)}}Z=function(e,t,n,r){var o=n.pageId,u=function(e){var t=getCurrentPages();if(!e)return t[t.length-1];return t.find((function(t){return t.$page.id===e}))}(o);return u?!u.$page.meta.isNVue?(UniServiceJSBridge.publishHandler("sendAutoMessage",{id:e,method:t,params:n},o),!0):(Y||(Y=Object.assign({},function(e){return{"Page.getElement":function(t){return e.querySelector(e.getDocument(t.pageId),t.selector)},"Page.getElements":function(t){return e.querySelectorAll(e.getDocument(t.pageId),t.selector)},"Page.getWindowProperties":function(t){return e.queryProperties(e.getWindow(t.pageId),t.names)}}}(K),function(e){var t=function(t){return e.getEl(t.elementId,t.pageId)};return{"Element.getElement":function(n){return e.querySelector(t(n),n.selector)},"Element.getElements":function(n){return e.querySelectorAll(t(n),n.selector)},"Element.getDOMProperties":function(n){return e.queryProperties(t(n),n.names)},"Element.getProperties":function(n){var r=t(n),o=r.__vue__||r.attr||{};return e.queryProperties(o,n.names)},"Element.getOffset":function(n){return e.getOffset(t(n))},"Element.getAttributes":function(n){return e.queryAttributes(t(n),n.names)},"Element.getStyles":function(n){return e.queryStyles(t(n),n.names)},"Element.getHTML":function(n){return e.queryHTML(t(n),n.type)},"Element.tap":function(n){return e.dispatchTapEvent(t(n))},"Element.longpress":function(n){return e.dispatchLongpressEvent(t(n))},"Element.touchstart":function(n){return e.dispatchTouchEvent(t(n),"touchstart",n)},"Element.touchmove":function(n){return e.dispatchTouchEvent(t(n),"touchmove",n)},"Element.touchend":function(n){return e.dispatchTouchEvent(t(n),"touchend",n)},"Element.callFunction":function(n){return e.callFunction(t(n),n.functionName,n.args)},"Element.triggerEvent":function(n){return e.triggerEvent(t(n),n.type,n.detail)}}}(K))),Y[t]):(r.error={message:"page["+o+"] not exists"},te(r),!0)},UniServiceJSBridge.subscribe("onAutoMessageReceive",(function(e){te(e)})),setTimeout((function(){var e;void 0===e&&(e={}),(G=uni.connectSocket({url:ee,complete:function(){}})).onMessage(ne),G.onOpen((function(t){e.success&&e.success(),console.log("已开启自动化测试...")})),G.onError((function(e){console.log("automator.onError",e)})),G.onClose((function(){e.fail&&e.fail({errMsg:"$$initRuntimeAutomator:fail"}),console.log("automator.onClose")}))}),500);
@@ -0,0 +1 @@
1
+ "use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var e=t(require("fs")),s=t(require("debug")),i=t(require("postcss-selector-parser")),r=t(require("fs-extra")),a=t(require("licia/dateFormat")),n=require("path"),o=require("util");require("address"),require("default-gateway"),require("licia/isStr"),require("licia/getPort");var l=t(require("licia/sleep"));s("automator:devtool");function c(t){t.walk(t=>{if("tag"===t.type){const e=t.value;t.value="page"===e?"body":"uni-"+e}})}const h=["Page.getElement","Page.getElements","Element.getElement","Element.getElements"];require("qrcode-terminal"),require("qrcode-reader");const u=/^win/.test(process.platform),p=s("automator:launcher"),d=o.promisify(e.readdir),m=o.promisify(e.stat);class y{constructor(t){this.id=t.id,this.app=t.executablePath,this.appid=t.appid||"HBuilder",this.package=t.package||"io.dcloud.HBuilder"}shouldPush(){return this.exists(this.FILE_APP_SERVICE).then(()=>(p(`${a("yyyy-mm-dd HH:MM:ss:l")} ${this.FILE_APP_SERVICE} exists`),!1)).catch(()=>(p(`${a("yyyy-mm-dd HH:MM:ss:l")} ${this.FILE_APP_SERVICE} not exists`),!0))}push(t){return async function t(e){const s=await d(e);return(await Promise.all(s.map(async s=>{const i=n.resolve(e,s);return(await m(i)).isDirectory()?t(i):i}))).reduce((t,e)=>t.concat(e),[])}(t).then(e=>{const s=e.map(e=>{const s=(t=>u?t.replace(/\\/g,"/"):t)(n.join(this.DIR_WWW,n.relative(t,e)));return p(`${a("yyyy-mm-dd HH:MM:ss:l")} push ${e} ${s}`),this.pushFile(e,s)});return Promise.all(s)}).then(t=>!0)}get FILE_APP_SERVICE(){return this.DIR_WWW+"/app-service.js"}}const f=s("automator:simctl");function g(t){const e=parseInt(t);return e>9?String(e):"0"+e}class w extends y{constructor(){super(...arguments),this.bundleVersion=""}async init(){const t=require("node-simctl").Simctl;this.tool=new t({udid:this.id});try{await this.tool.bootDevice()}catch(t){}await this.initSDCard(),f(`${a("yyyy-mm-dd HH:MM:ss:l")} init ${this.id}`)}async initSDCard(){const t=await this.tool.appInfo(this.package);f(`${a("yyyy-mm-dd HH:MM:ss:l")} appInfo ${t}`);const e=t.match(/DataContainer\s+=\s+"(.*)"/);if(!e)return Promise.resolve("");const s=t.match(/CFBundleVersion\s+=\s+(.*);/);if(!s)return Promise.resolve("");this.sdcard=e[1].replace("file:",""),this.bundleVersion=s[1],f(`${a("yyyy-mm-dd HH:MM:ss:l")} install ${this.sdcard}`)}async version(){return Promise.resolve(this.bundleVersion)}formatVersion(t){const e=t.split(".");return 3!==e.length?t:e[0]+g(e[1])+g(e[2])}async install(){return f(`${a("yyyy-mm-dd HH:MM:ss:l")} install ${this.app}`),await this.tool.installApp(this.app),await this.tool.grantPermission(this.package,"all"),await this.initSDCard(),Promise.resolve(!0)}async start(){try{await this.tool.terminateApp(this.package),await this.tool.launchApp(this.package)}catch(t){}return Promise.resolve(!0)}async exit(){return await this.tool.terminateApp(this.package),await this.tool.shutdownDevice(),Promise.resolve(!0)}async captureScreenshot(){return Promise.resolve(await this.tool.getScreenshot())}exists(t){return r.existsSync(t)?Promise.resolve(!0):Promise.reject(Error(t+" not exists"))}pushFile(t,e){return Promise.resolve(r.copySync(t,e))}get DIR_WWW(){return`${this.sdcard}/Documents/Pandora/apps/${this.appid}/www/`}}const M=require("adbkit"),v=s("automator:adb");class P extends y{async init(){if(this.tool=M.createClient(),!this.id){const t=await this.tool.listDevices();if(!t.length)throw Error("Device not found");this.id=t[0].id}this.sdcard=(await this.shell(this.COMMAND_EXTERNAL)).trim(),v(`${a("yyyy-mm-dd HH:MM:ss:l")} init ${this.id} ${this.sdcard}`)}version(){return this.shell(this.COMMAND_VERSION).then(t=>{const e=t.match(/versionName=(.*)/);return e&&e.length>1?e[1]:""})}formatVersion(t){return t}async install(){let t=!0;try{const e=(await this.tool.getProperties(this.id))["ro.build.version.release"].split(".")[0];parseInt(e)<6&&(t=!1)}catch(t){}if(v(`${a("yyyy-mm-dd HH:MM:ss:l")} install ${this.app} permission=${t}`),t){const t=require("adbkit/lib/adb/command.js"),e=t.prototype._send;t.prototype._send=function(t){return 0===t.indexOf("shell:pm install -r ")&&(t=t.replace("shell:pm install -r ","shell:pm install -r -g "),v(`${a("yyyy-mm-dd HH:MM:ss:l")} ${t} `)),e.call(this,t)}}return this.tool.install(this.id,this.app).then(()=>this.init())}start(){return this.exit().then(()=>this.shell(this.COMMAND_START))}exit(){return this.shell(this.COMMAND_STOP)}captureScreenshot(){return this.tool.screencap(this.id).then(t=>new Promise(e=>{const s=[];t.on("data",(function(t){s.push(t)})),t.on("end",(function(){e(Buffer.concat(s).toString("base64"))}))}))}exists(t){return this.tool.stat(this.id,t)}pushFile(t,e){return this.tool.push(this.id,t,e)}shell(t){return v(`${a("yyyy-mm-dd HH:MM:ss:l")} SEND ► ${t}`),this.tool.shell(this.id,t).then(M.util.readAll).then(t=>{const e=t.toString();return v(`${a("yyyy-mm-dd HH:MM:ss:l")} ◀ RECV ${e}`),e})}get DIR_WWW(){return`${this.sdcard}/Android/data/${this.package}/apps/${this.appid}/www`}get COMMAND_EXTERNAL(){return"echo $EXTERNAL_STORAGE"}get COMMAND_VERSION(){return"dumpsys package "+this.package}get COMMAND_STOP(){return"am force-stop "+this.package}get COMMAND_START(){return`am start -n ${this.package}/io.dcloud.PandoraEntry --es ${this.appid} --ez needUpdateApp false --ez reload true`}}const E=s("automator:devtool");let $,S=!1;const A={android:/android_version=(.*)/,ios:/iphone_version=(.*)/};const _={"Tool.close":{reflect:async()=>{}},"App.exit":{reflect:async()=>$.exit()},"App.enableLog":{reflect:()=>Promise.resolve()},"App.captureScreenshot":{reflect:async(t,e)=>{const s=await $.captureScreenshot(e);return E("App.captureScreenshot "+s.length),{data:s}}}};!function(t){h.forEach(e=>{t[e]=function(t){return{reflect:async(e,s)=>e(t,s,!1),params:t=>(t.selector&&(t.selector=i(c).processSync(t.selector)),t)}}(e)})}(_);const H={devtools:{name:"App",paths:[],required:["manifest.json","app-service.js"],validate:async function(t,s){t.platform=(t.platform||process.env.UNI_OS_NAME).toLocaleLowerCase(),Object.assign(t,t[t.platform]),$=function(t,e){return"ios"===t?new w(e):new P(e)}(t.platform,t),await $.init();const i=await $.version();if(i){if(t.version){const s=$.formatVersion(function(t,s){if(t.endsWith(".txt"))try{const i=e.readFileSync(t).toString().match(A[s]);if(i)return i[1]}catch(t){console.error(t)}return t}(t.version,t.platform));E("version: "+i),E("newVersion: "+s),s!==i&&(S=!0)}}else S=!0;if(S){if(!t.executablePath)throw Error(`app-plus->${t.platform}->executablePath is not provided`);if(!e.existsSync(t.executablePath))throw Error(t.executablePath+" not exists")}return t},create:async function(t,e,s){S&&await $.install(),(S||s.compiled||await $.shouldPush())&&(await $.push(t),await l(1e3)),await $.start()}},adapter:_};module.exports=H;
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@dcloudio/uni-app-plus",
3
+ "version": "0.0.1-nvue3.3030820220125001",
4
+ "description": "@dcloudio/uni-app-plus",
5
+ "files": [
6
+ "dist",
7
+ "lib",
8
+ "style"
9
+ ],
10
+ "sideEffects": [
11
+ "lib/automator.js"
12
+ ],
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/dcloudio/uni-app.git",
16
+ "directory": "packages/uni-app-plus"
17
+ },
18
+ "license": "Apache-2.0",
19
+ "bugs": {
20
+ "url": "https://github.com/dcloudio/uni-app/issues"
21
+ },
22
+ "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
23
+ "uni-app": {
24
+ "name": "uni-app-plus",
25
+ "apply": [
26
+ "app"
27
+ ],
28
+ "main": "dist/uni.compiler.js"
29
+ },
30
+ "devDependencies": {
31
+ "@dcloudio/uni-cli-shared": "0.0.1-nvue3.3030820220125001",
32
+ "@dcloudio/uni-components": "0.0.1-nvue3.3030820220125001",
33
+ "@dcloudio/uni-h5": "0.0.1-nvue3.3030820220125001",
34
+ "@dcloudio/uni-i18n": "0.0.1-nvue3.3030820220125001",
35
+ "@dcloudio/uni-shared": "0.0.1-nvue3.3030820220125001",
36
+ "@types/pako": "1.0.2",
37
+ "@vue/compiler-sfc": "3.2.29",
38
+ "autoprefixer": "^10.4.0",
39
+ "pako": "^1.0.11",
40
+ "vue": "3.2.29"
41
+ },
42
+ "dependencies": {
43
+ "@dcloudio/uni-app-vite": "0.0.1-nvue3.3030820220125001",
44
+ "@dcloudio/uni-app-vue": "0.0.1-nvue3.3030820220125001"
45
+ }
46
+ }
@@ -0,0 +1,17 @@
1
+ uni-cover-image {
2
+ display: block;
3
+ line-height: 1.2;
4
+ overflow: hidden;
5
+ height: 100%;
6
+ width: 100%;
7
+ pointer-events: auto;
8
+ }
9
+
10
+ uni-cover-image[hidden] {
11
+ display: none;
12
+ }
13
+
14
+ uni-cover-image .uni-cover-image {
15
+ width: 100%;
16
+ height: 100%;
17
+ }
@@ -0,0 +1,17 @@
1
+ uni-cover-view {
2
+ display: block;
3
+ line-height: 1.2;
4
+ overflow: hidden;
5
+ white-space: nowrap;
6
+ pointer-events: auto;
7
+ }
8
+
9
+ uni-cover-view[hidden] {
10
+ display: none;
11
+ }
12
+
13
+ uni-cover-view .uni-cover-view {
14
+ width: 100%;
15
+ height: 100%;
16
+ visibility: hidden;
17
+ }
@@ -0,0 +1,54 @@
1
+ * {
2
+ margin: 0;
3
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
4
+ -webkit-tap-highlight-color: transparent;
5
+ }
6
+
7
+ html,
8
+ body {
9
+ -webkit-user-select: none;
10
+ user-select: none;
11
+ width: 100%;
12
+ }
13
+
14
+ html {
15
+ height: 100%;
16
+ height: 100vh;
17
+ width: 100%;
18
+ width: 100vw;
19
+ }
20
+
21
+ body {
22
+ overflow-x: hidden;
23
+ background-color: white;
24
+ }
25
+
26
+ input[type='search']::-webkit-search-cancel-button {
27
+ display: none;
28
+ }
29
+
30
+ .uni-loading,
31
+ uni-button[loading]:before {
32
+ background: transparent
33
+ url('data:image/svg+xml;base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=')
34
+ no-repeat;
35
+ }
36
+
37
+ .uni-loading {
38
+ width: 20px;
39
+ height: 20px;
40
+ display: inline-block;
41
+ vertical-align: middle;
42
+ animation: uni-loading 1s steps(12, end) infinite;
43
+ background-size: 100%;
44
+ }
45
+
46
+ @keyframes uni-loading {
47
+ 0% {
48
+ transform: rotate3d(0, 0, 1, 0deg);
49
+ }
50
+
51
+ 100% {
52
+ transform: rotate3d(0, 0, 1, 360deg);
53
+ }
54
+ }
package/style/map.css ADDED
@@ -0,0 +1,31 @@
1
+ uni-map {
2
+ width: 300px;
3
+ height: 225px;
4
+ display: inline-block;
5
+ line-height: 0;
6
+ overflow: hidden;
7
+ position: relative;
8
+ }
9
+
10
+ uni-map[hidden] {
11
+ display: none;
12
+ }
13
+
14
+ .uni-map-container {
15
+ width: 100%;
16
+ height: 100%;
17
+ position: absolute;
18
+ top: 0;
19
+ left: 0;
20
+ overflow: hidden;
21
+ background-color: black;
22
+ }
23
+
24
+ .uni-map-slot {
25
+ position: absolute;
26
+ top: 0;
27
+ width: 100%;
28
+ height: 100%;
29
+ overflow: hidden;
30
+ pointer-events: none;
31
+ }
@@ -0,0 +1,31 @@
1
+ uni-video {
2
+ width: 300px;
3
+ height: 225px;
4
+ display: inline-block;
5
+ line-height: 0;
6
+ overflow: hidden;
7
+ position: relative;
8
+ }
9
+
10
+ uni-video[hidden] {
11
+ display: none;
12
+ }
13
+
14
+ .uni-video-container {
15
+ width: 100%;
16
+ height: 100%;
17
+ position: absolute;
18
+ top: 0;
19
+ left: 0;
20
+ overflow: hidden;
21
+ background-color: black;
22
+ }
23
+
24
+ .uni-video-slot {
25
+ position: absolute;
26
+ top: 0;
27
+ width: 100%;
28
+ height: 100%;
29
+ overflow: hidden;
30
+ pointer-events: none;
31
+ }
@@ -0,0 +1,8 @@
1
+ uni-web-view {
2
+ display: inline-block;
3
+ position: absolute;
4
+ left: 0;
5
+ right: 0;
6
+ top: 0;
7
+ bottom: 0;
8
+ }