@aiot-toolkit/aiotpack 2.0.6-beta.11 → 2.0.6-beta.13

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.
@@ -242,13 +242,12 @@ class UxAfterCompile {
242
242
  }
243
243
 
244
244
  // e2e
245
- //
246
245
  if (compilerOption.e2eConfigPath && compilerOption.enableE2e) {
247
246
  const testConfig = _UxUtil.default.getE2eConfig({
248
247
  projectPath: compilerOption.projectPath,
249
248
  e2eConfigPath: compilerOption.e2eConfigPath
250
249
  });
251
- const testPagePath = _path.default.parse(_path.default.relative(_path.default.join(compilerOption.projectPath, sourceRoot), _path.default.join(testConfig.dir, testConfig.entry.path)));
250
+ const testPagePath = _path.default.parse(_path.default.relative(_path.default.join(compilerOption.projectPath, sourceRoot), _path.default.join(testConfig.dir, testConfig.entry.path)).replaceAll(_path.default.sep, _path.default.posix.sep));
252
251
  // 1. 修改entry
253
252
  const entryName = testPagePath.dir;
254
253
  const launchMode = testConfig.entry?.launchMode;
@@ -55,7 +55,7 @@ class VelaWebpackConfigurator {
55
55
  projectPath: this.param.projectPath,
56
56
  e2eConfigPath: this.param.e2eConfigPath
57
57
  });
58
- const testPagePath = _path.default.parse(_path.default.relative(_path.default.join(this.param.projectPath, sourceRoot), _path.default.join(e2eConfig.dir, e2eConfig.entry.path)));
58
+ const testPagePath = _path.default.parse(_path.default.relative(_path.default.join(this.param.projectPath, sourceRoot), _path.default.join(e2eConfig.dir, e2eConfig.entry.path)).replaceAll(_path.default.sep, _path.default.posix.sep));
59
59
  config.router.pages[testPagePath.dir] = {
60
60
  component: testPagePath.name
61
61
  };
@@ -34,7 +34,7 @@ declare class UxConfig implements IFileLaneConfig<IJavascriptCompileOption> {
34
34
  workerDescribe: string;
35
35
  })[];
36
36
  afterWorks: (typeof UxAfterWorks.cleanOutput)[];
37
- watchIgnores: RegExp[];
37
+ watchIgnores: string[];
38
38
  /**
39
39
  * 通过项目类型,返回模块配置
40
40
  */
@@ -111,7 +111,7 @@ class UxConfig {
111
111
  workerDescribe: 'Check resource'
112
112
  }])();
113
113
  afterWorks = (() => [_UxAfterWorks.default.cleanOutput])();
114
- watchIgnores = [/node_modules/, /build/, /dist/];
114
+ watchIgnores = ['**/node_modules/**', '**/build/**', '**/dist/**'];
115
115
 
116
116
  /**
117
117
  * 通过项目类型,返回模块配置
@@ -10,7 +10,7 @@ declare class BeforeCompileUtils {
10
10
  * @param fileList
11
11
  * @returns
12
12
  */
13
- static getEntries: PreWork;
13
+ static getEntries: PreWork<IJavascriptCompileOption>;
14
14
  static clean: PreWork;
15
15
  /**
16
16
  * 获取项目的全局样式变量配置
@@ -11,6 +11,7 @@ var _path = _interopRequireDefault(require("path"));
11
11
  var _TranslateCache = _interopRequireDefault(require("@aiot-toolkit/parser/lib/ux/translate/vela/TranslateCache"));
12
12
  var _UxFileUtils = _interopRequireDefault(require("./ux/UxFileUtils"));
13
13
  var _IManifest = require("../compiler/javascript/vela/interface/IManifest");
14
+ var _UxUtil = _interopRequireDefault(require("@aiot-toolkit/parser/lib/ux/utils/UxUtil"));
14
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
16
  const BinaryPlugin = require('@aiot-toolkit/parser/lib/ux/translate/vela/protobuf/BinaryPlugin');
16
17
 
@@ -88,6 +89,15 @@ class BeforeCompileUtils {
88
89
  // 没有router配置
89
90
  _sharedUtils.ColorConsole.throw(`### manifest ### No router configuration`);
90
91
  }
92
+
93
+ // e2e测试入口
94
+ if (compilerOption?.enableE2e && compilerOption?.e2eConfigPath) {
95
+ const e2eConfig = _UxUtil.default.getE2eConfig({
96
+ projectPath: context.projectPath,
97
+ e2eConfigPath: compilerOption.e2eConfigPath
98
+ });
99
+ entryList.push(_path.default.join(e2eConfig.dir, e2eConfig.entry.path));
100
+ }
91
101
  if (services) {
92
102
  serviceList = Array.isArray(services) ? services : Object.values(services);
93
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiot-toolkit/aiotpack",
3
- "version": "2.0.6-beta.11",
3
+ "version": "2.0.6-beta.13",
4
4
  "description": "The process tool for packaging aiot projects.",
5
5
  "keywords": [
6
6
  "aiotpack"
@@ -19,14 +19,14 @@
19
19
  "test": "node ./__tests__/aiotpack.test.js"
20
20
  },
21
21
  "dependencies": {
22
- "@aiot-toolkit/generator": "2.0.6-beta.11",
23
- "@aiot-toolkit/parser": "2.0.6-beta.11",
24
- "@aiot-toolkit/shared-utils": "2.0.6-beta.11",
22
+ "@aiot-toolkit/generator": "2.0.6-beta.13",
23
+ "@aiot-toolkit/parser": "2.0.6-beta.13",
24
+ "@aiot-toolkit/shared-utils": "2.0.6-beta.13",
25
25
  "@hap-toolkit/aaptjs": "^2.0.0",
26
26
  "@rspack/core": "^1.3.9",
27
27
  "aiot-parse5": "^1.0.2",
28
28
  "babel-loader": "^9.1.3",
29
- "file-lane": "2.0.6-beta.11",
29
+ "file-lane": "2.0.6-beta.13",
30
30
  "file-loader": "^6.2.0",
31
31
  "fs-extra": "^11.2.0",
32
32
  "jsrsasign": "^11.1.0",
@@ -42,5 +42,5 @@
42
42
  "@types/jsrsasign": "^10.5.12",
43
43
  "@types/webpack-sources": "^3.2.3"
44
44
  },
45
- "gitHead": "acecf0ae5d6991619051dbbeda770a602f215dd6"
45
+ "gitHead": "a565cdee8e827a67b4043d9f872b7a6d933630db"
46
46
  }