@modern-js/server 1.4.20 → 1.4.22-beta.1
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @modern-js/server
|
|
2
2
|
|
|
3
|
+
## 1.4.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3172e1ee1: update devcert version
|
|
8
|
+
- Updated dependencies [06b411dc3]
|
|
9
|
+
- Updated dependencies [5d4806f86]
|
|
10
|
+
- Updated dependencies [63c354ad5]
|
|
11
|
+
- Updated dependencies [4165e50c7]
|
|
12
|
+
- Updated dependencies [073e9ad78]
|
|
13
|
+
- Updated dependencies [cda99c441]
|
|
14
|
+
- Updated dependencies [b96dcf364]
|
|
15
|
+
- Updated dependencies [f4a7d49e1]
|
|
16
|
+
- Updated dependencies [9e36d3a01]
|
|
17
|
+
- @modern-js/webpack@1.11.1
|
|
18
|
+
- @modern-js/utils@1.7.8
|
|
19
|
+
- @modern-js/prod-server@1.1.8
|
|
20
|
+
- @modern-js/server-utils@1.2.11
|
|
21
|
+
|
|
3
22
|
## 1.4.20
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -349,15 +349,23 @@ export class ModernDevServer extends ModernServer {
|
|
|
349
349
|
mock
|
|
350
350
|
} = AGGRED_DIR;
|
|
351
351
|
const defaultWatched = [`${mock}/**/*`, `${SERVER_DIR}/**/*`, `${API_DIR}/**`, `${SHARED_DIR}/**/*`];
|
|
352
|
+
const defaultWatchOptions = {
|
|
353
|
+
// 初始化的时候不触发 add、addDir 事件
|
|
354
|
+
ignoreInitial: true,
|
|
355
|
+
ignored: /api\/typings\/.*/
|
|
356
|
+
};
|
|
357
|
+
const {
|
|
358
|
+
watchOptions
|
|
359
|
+
} = this.conf.server;
|
|
360
|
+
|
|
361
|
+
const finalWatchOptions = _objectSpread(_objectSpread({}, defaultWatchOptions), watchOptions);
|
|
362
|
+
|
|
352
363
|
const defaultWatchedPaths = defaultWatched.map(p => path.normalize(path.join(pwd, p)));
|
|
364
|
+
console.log('finalWatchOptions', finalWatchOptions);
|
|
353
365
|
const watcher = new Watcher();
|
|
354
366
|
watcher.createDepTree(); // 监听文件变动,如果有变动则给 client,也就是 start 启动的插件发消息
|
|
355
367
|
|
|
356
|
-
watcher.listen(defaultWatchedPaths, {
|
|
357
|
-
// 初始化的时候不触发 add、addDir 事件
|
|
358
|
-
ignoreInitial: true,
|
|
359
|
-
ignored: /api\/typings\/.*/
|
|
360
|
-
}, filepath => {
|
|
368
|
+
watcher.listen(defaultWatchedPaths, finalWatchOptions, filepath => {
|
|
361
369
|
watcher.updateDepTree();
|
|
362
370
|
watcher.cleanDepCache(filepath);
|
|
363
371
|
this.onServerChange({
|
|
@@ -372,15 +372,23 @@ class ModernDevServer extends _prodServer.ModernServer {
|
|
|
372
372
|
mock
|
|
373
373
|
} = _prodServer.AGGRED_DIR;
|
|
374
374
|
const defaultWatched = [`${mock}/**/*`, `${_utils.SERVER_DIR}/**/*`, `${_utils.API_DIR}/**`, `${_utils.SHARED_DIR}/**/*`];
|
|
375
|
+
const defaultWatchOptions = {
|
|
376
|
+
// 初始化的时候不触发 add、addDir 事件
|
|
377
|
+
ignoreInitial: true,
|
|
378
|
+
ignored: /api\/typings\/.*/
|
|
379
|
+
};
|
|
380
|
+
const {
|
|
381
|
+
watchOptions
|
|
382
|
+
} = this.conf.server;
|
|
383
|
+
|
|
384
|
+
const finalWatchOptions = _objectSpread(_objectSpread({}, defaultWatchOptions), watchOptions);
|
|
385
|
+
|
|
375
386
|
const defaultWatchedPaths = defaultWatched.map(p => _path.default.normalize(_path.default.join(pwd, p)));
|
|
387
|
+
console.log('finalWatchOptions', finalWatchOptions);
|
|
376
388
|
const watcher = new _watcher.default();
|
|
377
389
|
watcher.createDepTree(); // 监听文件变动,如果有变动则给 client,也就是 start 启动的插件发消息
|
|
378
390
|
|
|
379
|
-
watcher.listen(defaultWatchedPaths, {
|
|
380
|
-
// 初始化的时候不触发 add、addDir 事件
|
|
381
|
-
ignoreInitial: true,
|
|
382
|
-
ignored: /api\/typings\/.*/
|
|
383
|
-
}, filepath => {
|
|
391
|
+
watcher.listen(defaultWatchedPaths, finalWatchOptions, filepath => {
|
|
384
392
|
watcher.updateDepTree();
|
|
385
393
|
watcher.cleanDepCache(filepath);
|
|
386
394
|
this.onServerChange({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
2
3
|
import http, { Server, IncomingMessage, ServerResponse } from 'http';
|
|
3
4
|
import { ServerHookRunner, ModernServer, BuildOptions } from '@modern-js/prod-server';
|
|
4
5
|
import { ModernDevServerOptions } from '../types';
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.4.
|
|
14
|
+
"version": "1.4.22-beta.1",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -30,19 +30,18 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/core": "^7.18.0",
|
|
32
32
|
"@babel/register": "^7.17.7",
|
|
33
|
-
"@modern-js/bff-utils": "^1.2.9",
|
|
34
33
|
"@modern-js/hmr-client": "^1.2.8",
|
|
35
34
|
"@modern-js/prod-server": "^1.1.8",
|
|
36
35
|
"@modern-js/server-utils": "^1.2.11",
|
|
37
|
-
"@modern-js/webpack": "^1.11.
|
|
38
|
-
"@modern-js/utils": "^1.7.
|
|
39
|
-
"devcert": "1.2.
|
|
36
|
+
"@modern-js/webpack": "^1.11.1",
|
|
37
|
+
"@modern-js/utils": "^1.7.8",
|
|
38
|
+
"devcert": "^1.2.2",
|
|
40
39
|
"minimatch": "^3.0.4",
|
|
41
40
|
"path-to-regexp": "^6.2.0",
|
|
42
41
|
"ws": "^8.2.0"
|
|
43
42
|
},
|
|
44
43
|
"devDependencies": {
|
|
45
|
-
"@modern-js/core": "1.12.0",
|
|
44
|
+
"@modern-js/core": "1.12.2-beta.0",
|
|
46
45
|
"@modern-js/server-core": "1.3.5",
|
|
47
46
|
"@modern-js/types": "1.5.4",
|
|
48
47
|
"@scripts/build": "0.0.0",
|
|
@@ -63,7 +62,8 @@
|
|
|
63
62
|
},
|
|
64
63
|
"publishConfig": {
|
|
65
64
|
"registry": "https://registry.npmjs.org/",
|
|
66
|
-
"access": "public"
|
|
65
|
+
"access": "public",
|
|
66
|
+
"types": "./dist/types/index.d.ts"
|
|
67
67
|
},
|
|
68
68
|
"wireit": {
|
|
69
69
|
"build": {
|