@nocobase/cli 0.20.0-alpha.16 → 0.20.0-alpha.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/cli",
3
- "version": "0.20.0-alpha.16",
3
+ "version": "0.20.0-alpha.17",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./src/index.js",
@@ -8,7 +8,7 @@
8
8
  "nocobase": "./bin/index.js"
9
9
  },
10
10
  "dependencies": {
11
- "@nocobase/app": "0.20.0-alpha.16",
11
+ "@nocobase/app": "0.20.0-alpha.17",
12
12
  "@types/fs-extra": "^11.0.1",
13
13
  "@umijs/utils": "3.5.20",
14
14
  "chalk": "^4.1.1",
@@ -25,12 +25,12 @@
25
25
  "tsx": "^4.6.2"
26
26
  },
27
27
  "devDependencies": {
28
- "@nocobase/devtools": "0.20.0-alpha.16"
28
+ "@nocobase/devtools": "0.20.0-alpha.17"
29
29
  },
30
30
  "repository": {
31
31
  "type": "git",
32
32
  "url": "git+https://github.com/nocobase/nocobase.git",
33
33
  "directory": "packages/core/cli"
34
34
  },
35
- "gitHead": "b88be61ef9bc0edeacd6d62d9cd58d8498b98372"
35
+ "gitHead": "a2460c222bc0b8a3bcb783b5c856499d756efa82"
36
36
  }
@@ -243,6 +243,12 @@ module.exports = (cli) => {
243
243
  .option('--stop-on-error')
244
244
  .option('--build')
245
245
  .option('--concurrency [concurrency]', '', os.cpus().length)
246
+ .option(
247
+ '--match [match]',
248
+ 'Only the files matching one of these patterns are executed as test files. Matching is performed against the absolute file path. Strings are treated as glob patterns.',
249
+ 'packages/**/__e2e__/**/*.test.ts',
250
+ )
251
+ .option('--ignore [ignore]', 'Skip tests that match the pattern. Strings are treated as glob patterns.', undefined)
246
252
  .action(async (options) => {
247
253
  process.env.__E2E__ = true;
248
254
  if (options.build) {
@@ -60,7 +60,8 @@ exports.pTest = async (options) => {
60
60
  fs.mkdirSync(dir, { recursive: true });
61
61
  }
62
62
 
63
- const files = glob.sync('packages/**/__e2e__/**/*.test.ts', {
63
+ const files = glob.sync(options.match, {
64
+ ignore: options.ignore,
64
65
  root: process.cwd(),
65
66
  });
66
67
 
@@ -19,6 +19,7 @@ function addTestCommand(name, cli) {
19
19
  .arguments('[paths...]')
20
20
  .allowUnknownOption()
21
21
  .action(async (paths, opts) => {
22
+ process.argv.push('--disable-console-intercept');
22
23
  if (name === 'test:server') {
23
24
  process.env.TEST_ENV = 'server-side';
24
25
  } else if (name === 'test:client') {