New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dcloudio/uni-cli-shared

Package Overview
Dependencies
Maintainers
6
Versions
1750
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dcloudio/uni-cli-shared - npm Package Compare versions

Comparing version 0.2.983 to 0.2.984

4

lib/pages.js

@@ -89,2 +89,6 @@ const fs = require('fs')

function isValidPage (page, root = '') {
if (typeof page === 'string') { // 不合法的配置
console.warn(`${page} 配置错误, 已被忽略, 查看文档: https://uniapp.dcloud.io/collocation/pages?id=pages`)
return false
}
let pagePath = page.path

@@ -91,0 +95,0 @@

@@ -21,2 +21,22 @@ const fs = require('fs')

function getShadowCss () {
let tagName = 'page'
if (process.env.UNI_PLATFORM === 'h5') {
tagName = 'body'
}
return `${tagName}::after{position:fixed;content:'';left:-1000px;top:-1000px;-webkit-animation:shadow-preload .1s;-webkit-animation-delay:3s;animation:shadow-preload .1s;animation-delay:3s}@-webkit-keyframes shadow-preload{0%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}100%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}}@keyframes shadow-preload{0%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}100%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}}`
}
function getNormalCopy (files) {
return files.map(file => {
const from = path.resolve(process.env.UNI_INPUT_DIR, file)
if (fs.existsSync(from)) {
return {
from,
to: path.resolve(process.env.UNI_OUTPUT_DIR, file)
}
}
}).filter(item => item)
}
const PLATFORMS = {

@@ -32,2 +52,14 @@ 'h5': {

'--status-bar-height': '0px'
},
copyWebpackOptions (assetsDir) {
return [{
from: require.resolve('@dcloudio/uni-h5/dist/index.css'),
to: assetsDir,
transform (content) {
if (process.env.NODE_ENV === 'production') {
return content + getShadowCss()
}
return content
}
}, ...getNormalCopy(['hybrid/html'])]
}

@@ -48,2 +80,9 @@ },

'--window-bottom': '0px'
},
copyWebpackOptions (assetsDir) {
const options = [...getNormalCopy(['hybrid/html'])]
if (!process.env.UNI_USING_NATIVE) {
options.push(...getNormalCopy(['wxcomponents']))
}
return options
}

@@ -66,3 +105,6 @@ },

},
project: 'project.config.json'
project: 'project.config.json',
copyWebpackOptions (assetsDir) {
return getNormalCopy(['wxcomponents'])
}
},

@@ -84,3 +126,15 @@ 'mp-weixin': {

},
project: 'project.config.json'
project: 'project.config.json',
copyWebpackOptions (assetsDir, manifestPlatformOptions) {
const files = [
'sitemap.json',
'ext.json',
'custom-tab-bar',
'wxcomponents'
]
if (manifestPlatformOptions.workers) {
files.push(manifestPlatformOptions.workers)
}
return getNormalCopy(files)
}
},

@@ -102,3 +156,6 @@ 'mp-baidu': {

},
project: 'project.swan.json'
project: 'project.swan.json',
copyWebpackOptions (assetsDir) {
return getNormalCopy(['swancomponents'])
}
},

@@ -119,2 +176,5 @@ 'mp-alipay': {

'--window-bottom': '0px'
},
copyWebpackOptions (assetsDir) {
return getNormalCopy(['mycomponents'])
}

@@ -137,3 +197,6 @@ },

},
project: 'project.tt.json'
project: 'project.tt.json',
copyWebpackOptions (assetsDir) {
return getNormalCopy(['ttcomponents'])
}
}

@@ -311,2 +374,5 @@ }

},
getPlatformCopy () {
return platform.copyWebpackOptions
},
getPlatformGlobal () {

@@ -350,9 +416,3 @@ return platform.global

},
getShadowCss () {
let tagName = 'page'
if (process.env.UNI_PLATFORM === 'h5') {
tagName = 'body'
}
return `${tagName}::after{position:fixed;content:'';left:-1000px;top:-1000px;-webkit-animation:shadow-preload .1s;-webkit-animation-delay:3s;animation:shadow-preload .1s;animation-delay:3s}@-webkit-keyframes shadow-preload{0%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}100%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}}@keyframes shadow-preload{0%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}100%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}}`
},
getShadowCss,
getShadowTemplate (colorType = 'grey') {

@@ -359,0 +419,0 @@ let tagName = 'cover-image'

2

package.json
{
"name": "@dcloudio/uni-cli-shared",
"version": "0.2.983",
"version": "0.2.984",
"description": "uni-cli-shared",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc