提交 392942fc 编写于 作者: fxy060608's avatar fxy060608

chore: bump jest from 27.0.6 to 29.3.1

上级 73382263
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`webviewStyle basic 1`] = `
Object {
{
"bounce": "vertical",
"titleNView": Object {
"titleNView": {
"autoBackButton": true,
},
}
......
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`dom minify = true 1`] = `"[[0,[\\"VIEW\\",\\"id\\",\\"view\\",\\"hidden\\",true]],[3,3,0,0,-1,{\\"a\\":[[1,2]]}],[6,3,3,4]]"`;
exports[`dom minify = true 1`] = `"[[0,["VIEW","id","view","hidden",true]],[3,3,0,0,-1,{"a":[[1,2]]}],[6,3,3,4]]"`;
exports[`dom minify = true 2`] = `"[[0,[\\"VIEW\\",\\"id\\",\\"view\\",\\"hidden\\",true]],[\\"create\\",3,\\"VIEW\\",0,-1,{\\"a\\":{\\"id\\":\\"view\\"}}],[\\"setAttr\\",3,\\"hidden\\",true]]"`;
exports[`dom minify = true 2`] = `"[[0,["VIEW","id","view","hidden",true]],["create",3,"VIEW",0,-1,{"a":{"id":"view"}}],["setAttr",3,"hidden",true]]"`;
exports[`dom minify = true 3`] = `"[[0,[\\"hidden\\"]],[7,3,0]]"`;
exports[`dom minify = true 3`] = `"[[0,["hidden"]],[7,3,0]]"`;
exports[`dom minify = true 4`] = `"[[0,[\\"hidden\\"]],[\\"removeAttr\\",3,\\"hidden\\"]]"`;
exports[`dom minify = true 4`] = `"[[0,["hidden"]],["removeAttr",3,"hidden"]]"`;
exports[`dom minify = true 5`] = `"[[0,[\\"text\\"]],[10,3,0]]"`;
exports[`dom minify = true 5`] = `"[[0,["text"]],[10,3,0]]"`;
exports[`dom minify = true 6`] = `"[[0,[\\"text\\"]],[\\"setText\\",3,\\"text\\"]]"`;
exports[`dom minify = true 6`] = `"[[0,["text"]],["setText",3,"text"]]"`;
exports[`dom minify = true 7`] = `"[[0,[]],[5,3]]"`;
exports[`dom minify = true 8`] = `"[[0,[]],[\\"remove\\",3]]"`;
exports[`dom minify = true 8`] = `"[[0,[]],["remove",3]]"`;
exports[`dom minify = true 9`] = `"[[0,[\\"#text\\",\\"hello\\"]],[3,4,0,0,-1,{\\"t\\":1}]]"`;
exports[`dom minify = true 9`] = `"[[0,["#text","hello"]],[3,4,0,0,-1,{"t":1}]]"`;
exports[`dom minify = true 10`] = `"[[0,[\\"#text\\",\\"hello\\"]],[\\"create\\",4,\\"#text\\",0,-1,{\\"t\\":\\"hello\\"}]]"`;
exports[`dom minify = true 10`] = `"[[0,["#text","hello"]],["create",4,"#text",0,-1,{"t":"hello"}]]"`;
exports[`dom minify = true 11`] = `"[[0,[\\"onClick\\"]],[8,4,0,0]]"`;
exports[`dom minify = true 11`] = `"[[0,["onClick"]],[8,4,0,0]]"`;
exports[`dom minify = true 12`] = `"[[0,[\\"onClick\\"]],[\\"addEvent\\",4,\\"onClick\\",0]]"`;
exports[`dom minify = true 12`] = `"[[0,["onClick"]],["addEvent",4,"onClick",0]]"`;
exports[`dom minify = true 13`] = `"[[0,[\\"onClick\\"]],[9,4,0]]"`;
exports[`dom minify = true 13`] = `"[[0,["onClick"]],[9,4,0]]"`;
exports[`dom minify = true 14`] = `"[[0,[\\"onClick\\"]],[\\"removeEvent\\",4,\\"onClick\\"]]"`;
exports[`dom minify = true 14`] = `"[[0,["onClick"]],["removeEvent",4,"onClick"]]"`;
exports[`dom minify = true 15`] = `"[[0,[\\"onClickCapture\\"]],[8,4,0,3]]"`;
exports[`dom minify = true 15`] = `"[[0,["onClickCapture"]],[8,4,0,3]]"`;
exports[`dom minify = true 16`] = `"[[0,[\\"onClickCapture\\"]],[\\"addEvent\\",4,\\"onClickCapture\\",3]]"`;
exports[`dom minify = true 16`] = `"[[0,["onClickCapture"]],["addEvent",4,"onClickCapture",3]]"`;
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`app-nvue: compiler <input v-model="text"/> 1`] = `
"import { openBlock as _openBlock, createElementBlock as _createElementBlock } from \\"vue\\"
"import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue"
const _hoisted_1 = [\\"modelValue\\"]
const _hoisted_1 = ["modelValue"]
export function render(_ctx, _cache) {
return (_openBlock(), _createElementBlock(\\"u-input\\", {
return (_openBlock(), _createElementBlock("u-input", {
modelValue: _ctx.text,
onInput: _cache[0] || (_cache[0] = $event => ((_ctx.text) = $event.detail.value))
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_1))
......@@ -14,37 +14,37 @@ export function render(_ctx, _cache) {
`;
exports[`app-nvue: compiler <scroll-view data-id="id" scroll-x="true" :show-scrollbar="true"/> 1`] = `
"import { openBlock as _openBlock, createElementBlock as _createElementBlock } from \\"vue\\"
"import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue"
const _hoisted_1 = {
\\"data-id\\": \\"id\\",
scrollX: \\"true\\",
"data-id": "id",
scrollX: "true",
showScrollbar: true,
renderWhole: true
}
export function render(_ctx, _cache) {
return (_openBlock(), _createElementBlock(\\"scroll-view\\", _hoisted_1))
return (_openBlock(), _createElementBlock("scroll-view", _hoisted_1))
}"
`;
exports[`app-nvue: compiler <slider/> 1`] = `
"import { resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock } from \\"vue\\"
"import { resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock } from "vue"
export function render(_ctx, _cache) {
const _component_u_slider = _resolveComponent(\\"u-slider\\")
const _component_u_slider = _resolveComponent("u-slider")
return (_openBlock(), _createBlock(_component_u_slider))
}"
`;
exports[`app-nvue: compiler <textarea v-model="text"/> 1`] = `
"import { openBlock as _openBlock, createElementBlock as _createElementBlock } from \\"vue\\"
"import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue"
const _hoisted_1 = [\\"modelValue\\"]
const _hoisted_1 = ["modelValue"]
export function render(_ctx, _cache) {
return (_openBlock(), _createElementBlock(\\"u-textarea\\", {
return (_openBlock(), _createElementBlock("u-textarea", {
modelValue: _ctx.text,
onInput: _cache[0] || (_cache[0] = $event => ((_ctx.text) = $event.detail.value))
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_1))
......@@ -52,72 +52,72 @@ export function render(_ctx, _cache) {
`;
exports[`app-nvue: compiler <video></video> 1`] = `
"import { openBlock as _openBlock, createElementBlock as _createElementBlock } from \\"vue\\"
"import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue"
export function render(_ctx, _cache) {
return (_openBlock(), _createElementBlock(\\"u-video\\"))
return (_openBlock(), _createElementBlock("u-video"))
}"
`;
exports[`app-nvue: compiler <video><view></view></video> 1`] = `
"import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \\"vue\\"
"import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue"
const _hoisted_1 = /*#__PURE__*/_createElementVNode(\\"u-scalable\\", { style: {position:\\"absolute\\",left:\\"0\\",right:\\"0\\",top:\\"0\\",bottom:\\"0\\"} }, [
/*#__PURE__*/_createElementVNode(\\"view\\")
const _hoisted_1 = /*#__PURE__*/_createElementVNode("u-scalable", { style: {position:"absolute",left:"0",right:"0",top:"0",bottom:"0"} }, [
/*#__PURE__*/_createElementVNode("view")
], -1 /* HOISTED */)
const _hoisted_2 = [
_hoisted_1
]
export function render(_ctx, _cache) {
return (_openBlock(), _createElementBlock(\\"u-video\\", null, _hoisted_2))
return (_openBlock(), _createElementBlock("u-video", null, _hoisted_2))
}"
`;
exports[`app-nvue: compiler <view><text>hello</text></view> 1`] = `
"import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \\"vue\\"
"import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue"
const _hoisted_1 = { renderWhole: true }
const _hoisted_2 = /*#__PURE__*/_createElementVNode(\\"u-text\\", null, \\"hello\\", -1 /* HOISTED */)
const _hoisted_2 = /*#__PURE__*/_createElementVNode("u-text", null, "hello", -1 /* HOISTED */)
const _hoisted_3 = [
_hoisted_2
]
export function render(_ctx, _cache) {
return (_openBlock(), _createElementBlock(\\"view\\", _hoisted_1, _hoisted_3))
return (_openBlock(), _createElementBlock("view", _hoisted_1, _hoisted_3))
}"
`;
exports[`app-nvue: compiler <view>hello</view> 1`] = `
"import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \\"vue\\"
"import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue"
const _hoisted_1 = { renderWhole: true }
const _hoisted_2 = /*#__PURE__*/_createElementVNode(\\"u-text\\", null, \\"hello\\", -1 /* HOISTED */)
const _hoisted_2 = /*#__PURE__*/_createElementVNode("u-text", null, "hello", -1 /* HOISTED */)
const _hoisted_3 = [
_hoisted_2
]
export function render(_ctx, _cache) {
return (_openBlock(), _createElementBlock(\\"view\\", _hoisted_1, _hoisted_3))
return (_openBlock(), _createElementBlock("view", _hoisted_1, _hoisted_3))
}"
`;
exports[`app-nvue: compiler <view>hello{{a}}<view>aaa{{a}}</view>{{b}}</view> 1`] = `
"import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock } from \\"vue\\"
"import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue"
const _hoisted_1 = { renderWhole: true }
const _hoisted_2 = /*#__PURE__*/_createElementVNode(\\"u-text\\", null, \\"hello\\", -1 /* HOISTED */)
const _hoisted_3 = /*#__PURE__*/_createElementVNode(\\"u-text\\", null, \\"aaa\\", -1 /* HOISTED */)
const _hoisted_2 = /*#__PURE__*/_createElementVNode("u-text", null, "hello", -1 /* HOISTED */)
const _hoisted_3 = /*#__PURE__*/_createElementVNode("u-text", null, "aaa", -1 /* HOISTED */)
export function render(_ctx, _cache) {
return (_openBlock(), _createElementBlock(\\"view\\", _hoisted_1, [
return (_openBlock(), _createElementBlock("view", _hoisted_1, [
_hoisted_2,
_createElementVNode(\\"u-text\\", null, _toDisplayString(_ctx.a), 1 /* TEXT */),
_createElementVNode(\\"view\\", null, [
_createElementVNode("u-text", null, _toDisplayString(_ctx.a), 1 /* TEXT */),
_createElementVNode("view", null, [
_hoisted_3,
_createElementVNode(\\"u-text\\", null, _toDisplayString(_ctx.a), 1 /* TEXT */)
_createElementVNode("u-text", null, _toDisplayString(_ctx.a), 1 /* TEXT */)
]),
_createElementVNode(\\"u-text\\", null, _toDisplayString(_ctx.b), 1 /* TEXT */)
_createElementVNode("u-text", null, _toDisplayString(_ctx.b), 1 /* TEXT */)
]))
}"
`;
......@@ -10,7 +10,7 @@ exports[`block parseBlockCode 1`] = `
`;
exports[`block parseBlockCode 2`] = `
"<template><view><template v-if=\\"a\\">a</template><template v-else>b</template></view></template>
"<template><view><template v-if="a">a</template><template v-else>b</template></view></template>
<script>
export default {}
</script>
......
......@@ -5,7 +5,7 @@ exports[`wxs parseWxsCode 1`] = `
<script>
export default {}
</script>
<renderjs name=\\"echarts\\">
<renderjs name="echarts">
export default{
mounted(){
console.log('mounted')
......@@ -28,7 +28,7 @@ exports[`wxs parseWxsCode 2`] = `
<script>
export default {}
</script>
<wxs name=\\"echarts\\">
<wxs name="echarts">
export default{
mounted(){
console.log('mounted')
......
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`page initRouteMeta 1`] = `
Object {
{
"id": 1,
"navigationBar": Object {
"navigationBar": {
"titleText": "uni-app",
},
"pullToRefresh": Object {},
"pullToRefresh": {},
"route": "",
}
`;
exports[`page initRouteMeta 2`] = `
Object {
{
"enablePullDownRefresh": true,
"id": 1,
"navigationBar": Object {
"navigationBar": {
"titleColor": "#000000",
"titleText": "hello",
},
"pullToRefresh": Object {},
"pullToRefresh": {},
"route": "",
}
`;
exports[`page initRouteMeta 3`] = `
Object {
{
"enablePullDownRefresh": true,
"id": 1,
"navigationBar": Object {
"navigationBar": {
"titleColor": "#000000",
"titleText": "uni-app",
},
"pullToRefresh": Object {
"pullToRefresh": {
"offset": 100,
},
"route": "",
......
......@@ -2,76 +2,76 @@
exports[`compileI18nJsonStr androidPrivacy.json 1`] = `
"{
\\"version\\": \\"1\\",
\\"prompt\\": \\"template\\",
\\"title\\": \\"服务协议和隐私政策\\",
\\"message\\": \\"  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\\\\\\"\\\\\\">《服务协议》</a>和<a href=\\\\\\"\\\\\\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。\\",
\\"buttonAccept\\": \\"同意并接受\\",
\\"buttonRefuse\\": \\"暂不同意\\",
\\"second\\": {
\\"title\\": \\"确认提示\\",
\\"message\\": \\"  进入应用前,你需先同意<a href=\\\\\\"\\\\\\">《服务协议》</a>和<a href=\\\\\\"\\\\\\">《隐私政策》</a>,否则将退出应用。\\",
\\"buttonAccept\\": \\"同意并继续\\",
\\"buttonRefuse\\": \\"退出应用\\",
\\"titleLocales\\": {
\\"zh-Hans\\": \\"确认提示\\",
\\"en\\": \\"confirm\\"
"version": "1",
"prompt": "template",
"title": "服务协议和隐私政策",
"message": "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\\"\\">《服务协议》</a>和<a href=\\"\\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept": "同意并接受",
"buttonRefuse": "暂不同意",
"second": {
"title": "确认提示",
"message": "  进入应用前,你需先同意<a href=\\"\\">《服务协议》</a>和<a href=\\"\\">《隐私政策》</a>,否则将退出应用。",
"buttonAccept": "同意并继续",
"buttonRefuse": "退出应用",
"titleLocales": {
"zh-Hans": "确认提示",
"en": "confirm"
}
},
\\"styles\\": {
\\"backgroundColor\\": \\"#00FF00\\",
\\"borderRadius\\": \\"5px\\",
\\"title\\": {
\\"color\\": \\"#ff00ff\\",
\\"colorLocales\\": {
\\"zh-Hans\\": \\"#ff00ff\\",
\\"en\\": \\"#ff00ff\\"
"styles": {
"backgroundColor": "#00FF00",
"borderRadius": "5px",
"title": {
"color": "#ff00ff",
"colorLocales": {
"zh-Hans": "#ff00ff",
"en": "#ff00ff"
}
},
\\"buttonAccept\\": {
\\"color\\": \\"#ffff00\\"
"buttonAccept": {
"color": "#ffff00"
},
\\"buttonRefuse\\": {
\\"color\\": \\"#00ffff\\"
"buttonRefuse": {
"color": "#00ffff"
}
},
\\"titleLocales\\": {
\\"zh-Hans\\": \\"服务协议和隐私政策\\",
\\"en\\": \\"Privacy\\"
"titleLocales": {
"zh-Hans": "服务协议和隐私政策",
"en": "Privacy"
},
\\"messageLocales\\": {
\\"zh-Hans\\": \\"  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\\\\\\"\\\\\\">《服务协议》</a>和<a href=\\\\\\"\\\\\\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。\\",
\\"en\\": \\"  privacy\\"
"messageLocales": {
"zh-Hans": "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\\"\\">《服务协议》</a>和<a href=\\"\\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"en": "  privacy"
},
\\"buttonAcceptLocales\\": {
\\"zh-Hans\\": \\"同意并接受\\",
\\"en\\": \\"accept\\"
"buttonAcceptLocales": {
"zh-Hans": "同意并接受",
"en": "accept"
},
\\"buttonRefuseLocales\\": {
\\"zh-Hans\\": \\"暂不同意\\",
\\"en\\": \\"refuse\\"
"buttonRefuseLocales": {
"zh-Hans": "暂不同意",
"en": "refuse"
}
}"
`;
exports[`compileI18nJsonStr pages.json->tabBar 1`] = `
"{
\\"color\\": \\"#7A7E83\\",
\\"selectedColor\\": \\"#007AFF\\",
\\"borderStyle\\": \\"black\\",
\\"backgroundColor\\": \\"#f8f8f8\\",
\\"list\\": [
"color": "#7A7E83",
"selectedColor": "#007AFF",
"borderStyle": "black",
"backgroundColor": "#f8f8f8",
"list": [
{
\\"pagePath\\": \\"pages/tabBar/component/component\\",
\\"iconPath\\": \\"static/component.png\\",
\\"selectedIconPath\\": \\"static/componentHL.png\\",
\\"text\\": \\"组件\\"
"pagePath": "pages/tabBar/component/component",
"iconPath": "static/component.png",
"selectedIconPath": "static/componentHL.png",
"text": "组件"
},
{
\\"pagePath\\": \\"pages/tabBar/API/API\\",
\\"iconPath\\": \\"static/api.png\\",
\\"selectedIconPath\\": \\"static/apiHL.png\\",
\\"text\\": \\"接口\\"
"pagePath": "pages/tabBar/API/API",
"iconPath": "static/api.png",
"selectedIconPath": "static/apiHL.png",
"text": "接口"
}
]
}"
......@@ -79,35 +79,35 @@ exports[`compileI18nJsonStr pages.json->tabBar 1`] = `
exports[`compileI18nJsonStr pages.json->tabBar with multi language 1`] = `
"{
\\"color\\": \\"#7A7E83\\",
\\"selectedColor\\": \\"#007AFF\\",
\\"borderStyle\\": \\"black\\",
\\"backgroundColor\\": \\"#f8f8f8\\",
\\"list\\": [
"color": "#7A7E83",
"selectedColor": "#007AFF",
"borderStyle": "black",
"backgroundColor": "#f8f8f8",
"list": [
{
\\"pagePath\\": \\"pages/tabBar/component/component\\",
\\"iconPath\\": \\"static/component.png\\",
\\"selectedIconPath\\": \\"static/componentHL.png\\",
\\"text\\": \\"组件\\",
\\"textLocales\\": {
\\"zh-Hans\\": \\"组件\\",
\\"en\\": \\"Component\\"
"pagePath": "pages/tabBar/component/component",
"iconPath": "static/component.png",
"selectedIconPath": "static/componentHL.png",
"text": "组件",
"textLocales": {
"zh-Hans": "组件",
"en": "Component"
}
},
{
\\"pagePath\\": \\"pages/tabBar/API/API\\",
\\"iconPath\\": \\"static/api.png\\",
\\"selectedIconPath\\": \\"static/apiHL.png\\",
\\"text\\": \\"接口\\",
\\"textLocales\\": {
\\"zh-Hans\\": \\"接口\\",
\\"en\\": \\"API\\"
"pagePath": "pages/tabBar/API/API",
"iconPath": "static/api.png",
"selectedIconPath": "static/apiHL.png",
"text": "接口",
"textLocales": {
"zh-Hans": "接口",
"en": "API"
}
}
],
\\"backgroundColorLocales\\": {
\\"zh-Hans\\": \\"#f8f8f8\\",
\\"en\\": \\"#f6f6f6\\"
"backgroundColorLocales": {
"zh-Hans": "#f8f8f8",
"en": "#f6f6f6"
}
}"
`;
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`code-frame generateCodeFrame 1`] = `
Object {
{
"code": "36 | */
37 | const MEDIA_PROJECTIONS_API_16 = arrayOf(
38 | MediaStore.Images.ImageColumns.DATA,
......@@ -17,7 +17,7 @@ Object {
`;
exports[`code-frame generateCodeFrame 2`] = `
Object {
{
"code": "76 | }
77 | lastFileObserverTime = System.currentTimeMillis()
78 | listenOption!.onImageCatchChange(newPath)
......@@ -33,7 +33,7 @@ Object {
`;
exports[`code-frame generateCodeFrame 3`] = `
Object {
{
"code": "124|
125|
126| if (cursor == null) {
......@@ -49,7 +49,7 @@ Object {
`;
exports[`code-frame generateCodeFrame 4`] = `
Object {
{
"code": "133|
134| // 获取各列的索引
135| let dataIndex = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA)
......@@ -65,7 +65,7 @@ Object {
`;
exports[`code-frame generateCodeFrame 5`] = `
Object {
{
"code": "141| let data = cursor.getString(dataIndex)
142| let dateTaken = cursor.getLong(dateTakenIndex)
143| let width = 0;
......@@ -81,7 +81,7 @@ Object {
`;
exports[`code-frame generateCodeFrame 6`] = `
Object {
{
"code": "142| let dateTaken = cursor.getLong(dateTakenIndex)
143| let width = 0;
144| let height = 0;
......@@ -97,7 +97,7 @@ Object {
`;
exports[`code-frame generateCodeFrame 7`] = `
Object {
{
"code": "180| if (checkScreenShot(data, dateTaken, width, height)) {
181| if (!checkCallback(data)) {
182| listenOption!.onImageCatchChange(data)
......@@ -113,7 +113,7 @@ Object {
`;
exports[`code-frame generateCodeFrame 8`] = `
Object {
{
"code": "248| try {
249| let windowManager = getUniActivity()!.getSystemService(Context.WINDOW_SERVICE) as WindowManager
250| let defaultDisplay = windowManager.defaultDisplay
......@@ -129,7 +129,7 @@ Object {
`;
exports[`code-frame generateCodeFrame 9`] = `
Object {
{
"code": "249| let windowManager = getUniActivity()!.getSystemService(Context.WINDOW_SERVICE) as WindowManager
250| let defaultDisplay = windowManager.defaultDisplay
251| defaultDisplay.getRealSize(screenSize)
......@@ -145,7 +145,7 @@ Object {
`;
exports[`code-frame generateCodeFrame 10`] = `
Object {
{
"code": "308| var directory_screenshot: File;
309|
310| var directory_pictures = File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_PICTURES);
......@@ -161,13 +161,13 @@ Object {
`;
exports[`code-frame generateCodeFrame 11`] = `
Object {
{
"code": "309|
310| var directory_pictures = File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_PICTURES);
311| var directory_dcim = File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DCIM);
| ^
312|
313| if (Build.MANUFACTURER.equals(\\"Xiaomi\\", true)) {",
313| if (Build.MANUFACTURER.equals("Xiaomi", true)) {",
"column": 42,
"file": "uni_modules/uts-screenshot-listener/utssdk/app-android/index.uts",
"line": 311,
......@@ -177,7 +177,7 @@ Object {
`;
exports[`code-frame generateCodeFrameWithSourceMapPath 1`] = `
Object {
{
"code": "36 | */
37 | const MEDIA_PROJECTIONS_API_16 = arrayOf(
38 | MediaStore.Images.ImageColumns.DATA,
......@@ -193,7 +193,7 @@ Object {
`;
exports[`code-frame generateCodeFrameWithSourceMapPath 2`] = `
Object {
{
"code": "76 | }
77 | lastFileObserverTime = System.currentTimeMillis()
78 | listenOption!.onImageCatchChange(newPath)
......@@ -209,7 +209,7 @@ Object {
`;
exports[`code-frame generateCodeFrameWithSourceMapPath 3`] = `
Object {
{
"code": "124|
125|
126| if (cursor == null) {
......@@ -225,7 +225,7 @@ Object {
`;
exports[`code-frame generateCodeFrameWithSourceMapPath 4`] = `
Object {
{
"code": "133|
134| // 获取各列的索引
135| let dataIndex = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA)
......@@ -241,7 +241,7 @@ Object {
`;
exports[`code-frame generateCodeFrameWithSourceMapPath 5`] = `
Object {
{
"code": "141| let data = cursor.getString(dataIndex)
142| let dateTaken = cursor.getLong(dateTakenIndex)
143| let width = 0;
......@@ -257,7 +257,7 @@ Object {
`;
exports[`code-frame generateCodeFrameWithSourceMapPath 6`] = `
Object {
{
"code": "142| let dateTaken = cursor.getLong(dateTakenIndex)
143| let width = 0;
144| let height = 0;
......@@ -273,7 +273,7 @@ Object {
`;
exports[`code-frame generateCodeFrameWithSourceMapPath 7`] = `
Object {
{
"code": "180| if (checkScreenShot(data, dateTaken, width, height)) {
181| if (!checkCallback(data)) {
182| listenOption!.onImageCatchChange(data)
......@@ -289,7 +289,7 @@ Object {
`;
exports[`code-frame generateCodeFrameWithSourceMapPath 8`] = `
Object {
{
"code": "248| try {
249| let windowManager = getUniActivity()!.getSystemService(Context.WINDOW_SERVICE) as WindowManager
250| let defaultDisplay = windowManager.defaultDisplay
......@@ -305,7 +305,7 @@ Object {
`;
exports[`code-frame generateCodeFrameWithSourceMapPath 9`] = `
Object {
{
"code": "249| let windowManager = getUniActivity()!.getSystemService(Context.WINDOW_SERVICE) as WindowManager
250| let defaultDisplay = windowManager.defaultDisplay
251| defaultDisplay.getRealSize(screenSize)
......@@ -321,7 +321,7 @@ Object {
`;
exports[`code-frame generateCodeFrameWithSourceMapPath 10`] = `
Object {
{
"code": "308| var directory_screenshot: File;
309|
310| var directory_pictures = File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_PICTURES);
......@@ -337,13 +337,13 @@ Object {
`;
exports[`code-frame generateCodeFrameWithSourceMapPath 11`] = `
Object {
{
"code": "309|
310| var directory_pictures = File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_PICTURES);
311| var directory_dcim = File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DCIM);
| ^
312|
313| if (Build.MANUFACTURER.equals(\\"Xiaomi\\", true)) {",
313| if (Build.MANUFACTURER.equals("Xiaomi", true)) {",
"column": 42,
"file": "uni_modules/uts-screenshot-listener/utssdk/app-android/index.uts",
"line": 311,
......
......@@ -7,7 +7,7 @@ const name = 'test-uts'
const is_uni_modules = false
const pkg = initUtsPackageName(name, is_uni_modules)
const cls = initUtsIndexClassName(name, is_uni_modules)
export const onMemoryWarning = initUtsProxyFunction(false, { main: true, package: pkg, class: cls, name: 'onMemoryWarning', params: [{\\"name\\":\\"callback\\",\\"type\\":\\"UTSCallback\\"}]})
export const offMemoryWarning = initUtsProxyFunction(false, { main: true, package: pkg, class: cls, name: 'offMemoryWarning', params: [{\\"name\\":\\"callback\\",\\"type\\":\\"UTSCallback\\",\\"default\\":\\"UTSNull\\"}]})
export const onMemoryWarning = initUtsProxyFunction(false, { main: true, package: pkg, class: cls, name: 'onMemoryWarning', params: [{"name":"callback","type":"UTSCallback"}]})
export const offMemoryWarning = initUtsProxyFunction(false, { main: true, package: pkg, class: cls, name: 'offMemoryWarning', params: [{"name":"callback","type":"UTSCallback","default":"UTSNull"}]})
"
`;
......@@ -23,10 +23,11 @@
"fast-glob": "^3.2.11",
"fs-extra": "^10.0.0",
"jsonc-parser": "^3.0.0",
"md5-file": "^5.0.0",
"source-map": "^0.7.4"
},
"devDependencies": {
"@types/adm-zip": "^0.5.0",
"@types/fs-extra": "^9.0.13"
}
}
}
\ No newline at end of file
import md5 from 'md5-file'
import glob from 'fast-glob'
import { normalizePath } from './shared'
export async function genManifest(pluginDir: string) {
const files = await glob(normalizePath(pluginDir) + '/**/*')
await Promise.all(files.map((file) => md5(file)))
}
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册