@dcloudio/uni-cli-shared 3.0.0-alpha-4070620250731001 → 3.0.0-alpha-4070620250731002

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.
@@ -48,9 +48,7 @@ function initDefine(stringifyBoolean = false) {
48
48
  // 兼容旧版本
49
49
  'process.env.VUE_APP_PLATFORM': JSON.stringify(process.env.UNI_PLATFORM || ''),
50
50
  'process.env.VUE_APP_DARK_MODE': JSON.stringify(platformManifestJson.darkmode || false),
51
- __UNI_PRELOAD_SHADOW_IMAGE__: JSON.stringify(process.env.UNI_PLATFORM === 'mp-weixin'
52
- ? (0, utils_1.createShadowImageUrl)(1, 'grey').slice(5)
53
- : ''),
51
+ __UNI_PRELOAD_SHADOW_IMAGE__: JSON.stringify(process.env.UNI_PLATFORM === 'mp-weixin' ? (0, utils_1.getShadowImagePath)('grey') : ''),
54
52
  ...mpXDefine,
55
53
  };
56
54
  }
package/dist/utils.d.ts CHANGED
@@ -34,6 +34,7 @@ export declare function createResolveErrorMsg(source: string, importer: string):
34
34
  export declare function enableSourceMap(): boolean;
35
35
  export declare function requireUniHelpers(): any;
36
36
  export declare function normalizeEmitAssetFileName(fileName: string): string;
37
+ export declare function getShadowImagePath(type: string): string;
37
38
  export declare function createShadowImageUrl(cdn: number, type?: string): string;
38
39
  export declare function isNormalCompileTarget(): boolean;
39
40
  /**
package/dist/utils.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getEscaper = exports.isNormalCompileTarget = exports.createShadowImageUrl = exports.normalizeEmitAssetFileName = exports.requireUniHelpers = exports.enableSourceMap = exports.createResolveErrorMsg = exports.parseImporter = exports.resolveAppVue = exports.isAppVue = exports.installDepTips = exports.resolveSourceMapPath = exports.pathToGlob = exports.normalizeParsePlugins = exports.normalizeMiniProgramFilename = exports.normalizeNodeModules = exports.removeExt = exports.normalizePagePath = exports.normalizeIdentifier = exports.checkElementNodeTag = exports.normalizePath = exports.isWindows = exports.isArray = exports.capitalize = exports.camelize = exports.hash = void 0;
6
+ exports.getEscaper = exports.isNormalCompileTarget = exports.createShadowImageUrl = exports.getShadowImagePath = exports.normalizeEmitAssetFileName = exports.requireUniHelpers = exports.enableSourceMap = exports.createResolveErrorMsg = exports.parseImporter = exports.resolveAppVue = exports.isAppVue = exports.installDepTips = exports.resolveSourceMapPath = exports.pathToGlob = exports.normalizeParsePlugins = exports.normalizeMiniProgramFilename = exports.normalizeNodeModules = exports.removeExt = exports.normalizePagePath = exports.normalizeIdentifier = exports.checkElementNodeTag = exports.normalizePath = exports.isWindows = exports.isArray = exports.capitalize = exports.camelize = exports.hash = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const os_1 = __importDefault(require("os"));
9
9
  const path_1 = __importDefault(require("path"));
@@ -215,13 +215,17 @@ function createIdent(platform) {
215
215
  }
216
216
  return '';
217
217
  }
218
- function createShadowImageUrl(cdn, type = 'grey') {
218
+ function getShadowImagePath(type) {
219
219
  let identStr = '';
220
220
  if (process.env.UNI_PLATFORM !== 'h5' && process.env.UNI_PLATFORM !== 'web') {
221
221
  const ident = createIdent(process.env.UNI_PLATFORM);
222
222
  identStr = ident ? `${ident}/` : '';
223
223
  }
224
- return `https://cdn${(cdn || 0) + (process.env.UNI_APP_X === 'true' ? 1000 : 0) || ''}.dcloud.net.cn/${identStr}img/shadow-${type}.png`;
224
+ return `/${identStr}img/shadow-${type}.png`;
225
+ }
226
+ exports.getShadowImagePath = getShadowImagePath;
227
+ function createShadowImageUrl(cdn, type = 'grey') {
228
+ return `https://cdn${(cdn || 0) + (process.env.UNI_APP_X === 'true' ? 1000 : 0) || ''}.dcloud.net.cn${getShadowImagePath(type)}`;
225
229
  }
226
230
  exports.createShadowImageUrl = createShadowImageUrl;
227
231
  function isNormalCompileTarget() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-cli-shared",
3
- "version": "3.0.0-alpha-4070620250731001",
3
+ "version": "3.0.0-alpha-4070620250731002",
4
4
  "description": "@dcloudio/uni-cli-shared",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -68,8 +68,8 @@
68
68
  "unimport": "4.1.1",
69
69
  "unplugin-auto-import": "19.1.0",
70
70
  "xregexp": "3.1.0",
71
- "@dcloudio/uni-i18n": "3.0.0-alpha-4070620250731001",
72
- "@dcloudio/uni-shared": "3.0.0-alpha-4070620250731001"
71
+ "@dcloudio/uni-i18n": "3.0.0-alpha-4070620250731002",
72
+ "@dcloudio/uni-shared": "3.0.0-alpha-4070620250731002"
73
73
  },
74
74
  "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
75
75
  "devDependencies": {
@@ -89,6 +89,6 @@
89
89
  "code-frame": "link:@types/@babel/code-frame",
90
90
  "postcss": "^8.4.21",
91
91
  "vue": "3.4.21",
92
- "@dcloudio/uni-uts-v1": "3.0.0-alpha-4070620250731001"
92
+ "@dcloudio/uni-uts-v1": "3.0.0-alpha-4070620250731002"
93
93
  }
94
94
  }