@dcloudio/uni-cli-shared 3.0.0-alpha-4000020240124001 → 3.0.0-alpha-4000020240127001

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.
@@ -17,7 +17,7 @@ export declare function isMiniProgramUsingComponent(name: string, options: {
17
17
  componentsDir?: string;
18
18
  }): boolean;
19
19
  interface MiniProgramComponents {
20
- [name: string]: 'plugin' | 'component' | 'dynamicLib';
20
+ [name: string]: 'plugin' | 'component' | 'dynamicLib' | 'ext';
21
21
  }
22
22
  export declare function findMiniProgramUsingComponents({ filename, inputDir, componentsDir, }: {
23
23
  filename: string;
@@ -141,11 +141,17 @@ function findMiniProgramUsingComponent(usingComponents, componentsDir) {
141
141
  return Object.keys(usingComponents).reduce((res, name) => {
142
142
  const path = usingComponents[name];
143
143
  if (path.includes('plugin://')) {
144
+ // mp-weixin & mp-alipay
144
145
  res[name] = 'plugin';
145
146
  }
146
147
  else if (path.includes('dynamicLib://')) {
148
+ // mp-baidu
147
149
  res[name] = 'dynamicLib';
148
150
  }
151
+ else if (path.includes('ext://')) {
152
+ // mp-toutiao
153
+ res[name] = 'ext';
154
+ }
149
155
  else if (componentsDir && path.includes(componentsDir + '/')) {
150
156
  res[name] = 'component';
151
157
  }
@@ -1,7 +1,7 @@
1
1
  import type { EmittedAsset } from 'rollup';
2
2
  import type { ElementNode } from '@vue/compiler-core';
3
3
  type LazyElementFn = (node: ElementNode, context: {
4
- isMiniProgramComponent(name: string): 'plugin' | 'component' | 'dynamicLib' | undefined;
4
+ isMiniProgramComponent(name: string): 'plugin' | 'component' | 'dynamicLib' | 'ext' | undefined;
5
5
  }) => {
6
6
  [name: string]: {
7
7
  name: 'on' | 'bind';
@@ -30,6 +30,9 @@ const uniPreset = {
30
30
  'onPullDownRefresh',
31
31
  ],
32
32
  };
33
+ if (process.env.UNI_UTS_PLATFORM === 'web') {
34
+ uniPreset.imports.push('onPageShow', 'onPageHide');
35
+ }
33
36
  const uniH5Preset = {
34
37
  from: '@dcloudio/uni-h5',
35
38
  imports: ['UniElement', 'UniElementImpl'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-cli-shared",
3
- "version": "3.0.0-alpha-4000020240124001",
3
+ "version": "3.0.0-alpha-4000020240127001",
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.21.3",
27
27
  "@babel/parser": "^7.23.5",
28
28
  "@babel/types": "^7.20.7",
29
- "@dcloudio/uni-i18n": "3.0.0-alpha-4000020240124001",
30
- "@dcloudio/uni-shared": "3.0.0-alpha-4000020240124001",
29
+ "@dcloudio/uni-i18n": "3.0.0-alpha-4000020240127001",
30
+ "@dcloudio/uni-shared": "3.0.0-alpha-4000020240127001",
31
31
  "@intlify/core-base": "9.1.9",
32
32
  "@intlify/shared": "9.1.9",
33
33
  "@intlify/vue-devtools": "9.1.9",
@@ -66,7 +66,7 @@
66
66
  },
67
67
  "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
68
68
  "devDependencies": {
69
- "@dcloudio/uni-uts-v1": "3.0.0-alpha-4000020240124001",
69
+ "@dcloudio/uni-uts-v1": "3.0.0-alpha-4000020240127001",
70
70
  "@types/babel__code-frame": "^7.0.6",
71
71
  "@types/babel__core": "^7.1.19",
72
72
  "@types/debug": "^4.1.7",