@dcloudio/uni-cli-shared 3.0.0-4020420240722002 → 3.0.0-4020420240722003

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.
@@ -1,4 +1,4 @@
1
1
  export declare function initNVue(manifestJson: Record<string, any>, pagesJson: UniApp.PagesJson): void;
2
- export declare function getNVueCompiler(manifestJson: Record<string, any>): "uni-app" | "weex" | "vue" | "vite";
2
+ export declare function getNVueCompiler(manifestJson: Record<string, any>): "uni-app" | "vue" | "weex" | "vite";
3
3
  export declare function getNVueStyleCompiler(manifestJson: Record<string, any>): "uni-app" | "weex";
4
4
  export declare function getNVueFlexDirection(manifestJson: Record<string, any>): "column" | "row" | "row-reverse" | "column-reverse";
package/dist/utils.d.ts CHANGED
@@ -34,3 +34,4 @@ 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 createShadowImageUrl(cdn: number, type?: string): string;
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.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.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;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const os_1 = __importDefault(require("os"));
9
9
  const path_1 = __importDefault(require("path"));
@@ -15,6 +15,7 @@ const constants_1 = require("./constants");
15
15
  const compiler_core_1 = require("@vue/compiler-core");
16
16
  const platform_1 = require("./platform");
17
17
  const hbx_1 = require("./hbx");
18
+ const json_1 = require("./json");
18
19
  // 专为 uts.ts 服务
19
20
  var shared_2 = require("@vue/shared");
20
21
  Object.defineProperty(exports, "camelize", { enumerable: true, get: function () { return shared_2.camelize; } });
@@ -184,3 +185,22 @@ function normalizeEmitAssetFileName(fileName) {
184
185
  return fileName;
185
186
  }
186
187
  exports.normalizeEmitAssetFileName = normalizeEmitAssetFileName;
188
+ function createIdent() {
189
+ if (process.env.UNI_INPUT_DIR) {
190
+ const manifestJson = (0, json_1.parseManifestJsonOnce)(process.env.UNI_INPUT_DIR);
191
+ const id = (manifestJson.appid || '').replace('__UNI__', '');
192
+ if (id) {
193
+ return Buffer.from(Buffer.from(id).toString('base64')).toString('hex');
194
+ }
195
+ }
196
+ return '';
197
+ }
198
+ function createShadowImageUrl(cdn, type = 'grey') {
199
+ let identStr = '';
200
+ if (process.env.UNI_PLATFORM !== 'h5' && process.env.UNI_PLATFORM !== 'web') {
201
+ const ident = createIdent();
202
+ identStr = ident ? `${ident}/` : '';
203
+ }
204
+ return `https://cdn${(cdn || 0) + (process.env.UNI_APP_X === 'true' ? 1000 : 0) || ''}.dcloud.net.cn/${identStr}img/shadow-${type}.png`;
205
+ }
206
+ exports.createShadowImageUrl = createShadowImageUrl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-cli-shared",
3
- "version": "3.0.0-4020420240722002",
3
+ "version": "3.0.0-4020420240722003",
4
4
  "description": "@dcloudio/uni-cli-shared",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -26,8 +26,8 @@
26
26
  "@babel/core": "^7.23.3",
27
27
  "@babel/parser": "^7.23.9",
28
28
  "@babel/types": "^7.20.7",
29
- "@dcloudio/uni-i18n": "3.0.0-4020420240722002",
30
- "@dcloudio/uni-shared": "3.0.0-4020420240722002",
29
+ "@dcloudio/uni-i18n": "3.0.0-4020420240722003",
30
+ "@dcloudio/uni-shared": "3.0.0-4020420240722003",
31
31
  "@intlify/core-base": "9.1.9",
32
32
  "@intlify/shared": "9.1.9",
33
33
  "@intlify/vue-devtools": "9.1.9",
@@ -71,7 +71,7 @@
71
71
  },
72
72
  "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
73
73
  "devDependencies": {
74
- "@dcloudio/uni-uts-v1": "3.0.0-4020420240722002",
74
+ "@dcloudio/uni-uts-v1": "3.0.0-4020420240722003",
75
75
  "@types/adm-zip": "^0.5.5",
76
76
  "@types/babel__code-frame": "^7.0.6",
77
77
  "@types/babel__core": "^7.1.19",