@dcloudio/uni-cli-shared 2.0.2-alpha-4030120241010001 → 2.0.2-alpha-4030120241024001
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/lib/platform.js +10 -4
- package/package.json +2 -2
package/lib/platform.js
CHANGED
|
@@ -46,13 +46,19 @@ function getShadowCdn () {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
let appid
|
|
49
|
+
let platformAppId
|
|
49
50
|
|
|
50
|
-
function createIdent () {
|
|
51
|
+
function createIdent (platform) {
|
|
51
52
|
if (process.env.UNI_INPUT_DIR) {
|
|
52
53
|
if (typeof appid === 'undefined') {
|
|
53
|
-
|
|
54
|
+
const manifestJson = getManifestJson()
|
|
55
|
+
appid = manifestJson.appid || ''
|
|
56
|
+
platformAppId = manifestJson[platform]?.appid
|
|
57
|
+
}
|
|
58
|
+
let id = appid.replace('__UNI__', '')
|
|
59
|
+
if (platformAppId) {
|
|
60
|
+
id += '%%' + platformAppId
|
|
54
61
|
}
|
|
55
|
-
const id = appid.replace('__UNI__', '')
|
|
56
62
|
if (id) {
|
|
57
63
|
return Buffer.from(Buffer.from(id).toString('base64')).toString('hex')
|
|
58
64
|
}
|
|
@@ -63,7 +69,7 @@ function createIdent () {
|
|
|
63
69
|
function createShadowImageUrl (cdn, type = 'grey') {
|
|
64
70
|
let identStr = ''
|
|
65
71
|
if (process.env.UNI_PLATFORM !== 'h5' && process.env.UNI_PLATFORM !== 'web') {
|
|
66
|
-
const ident = createIdent()
|
|
72
|
+
const ident = createIdent(process.env.UNI_PLATFORM)
|
|
67
73
|
identStr = ident ? `${ident}/` : ''
|
|
68
74
|
}
|
|
69
75
|
return `https://cdn${cdn || ''}.dcloud.net.cn/${identStr}img/shadow-${type}.png`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/uni-cli-shared",
|
|
3
|
-
"version": "2.0.2-alpha-
|
|
3
|
+
"version": "2.0.2-alpha-4030120241024001",
|
|
4
4
|
"description": "uni-cli-shared",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"postcss-urlrewrite": "^0.2.2",
|
|
28
28
|
"strip-json-comments": "^2.0.1"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "65fa194b2aff6f4cc5ac98bc908e3597bc6d9cc3"
|
|
31
31
|
}
|