@eggjs/watcher 5.0.2-beta.0 → 5.0.2-beta.10
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,7 @@
|
|
|
1
|
+
import { BaseEventSource } from "../lib/event-sources/base.js";
|
|
2
|
+
|
|
1
3
|
//#region src/config/config.default.d.ts
|
|
4
|
+
type EventSourceClass = new (...args: any[]) => BaseEventSource;
|
|
2
5
|
interface WatcherConfig {
|
|
3
6
|
/**
|
|
4
7
|
* event source type, default is `default`
|
|
@@ -7,9 +10,9 @@ interface WatcherConfig {
|
|
|
7
10
|
type: string;
|
|
8
11
|
/**
|
|
9
12
|
* event sources
|
|
10
|
-
* key is event source type, value is event source
|
|
13
|
+
* key is event source type, value is string (module path) or event source class
|
|
11
14
|
*/
|
|
12
|
-
eventSources: Record<string, string>;
|
|
15
|
+
eventSources: Record<string, string | EventSourceClass>;
|
|
13
16
|
}
|
|
14
17
|
declare const _default: {
|
|
15
18
|
/**
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import DefaultEventSource from "../lib/event-sources/default.js";
|
|
2
|
+
import DevelopmentEventSource from "../lib/event-sources/development.js";
|
|
2
3
|
|
|
3
4
|
//#region src/config/config.default.ts
|
|
4
5
|
var config_default_default = { watcher: {
|
|
5
6
|
type: "default",
|
|
6
7
|
eventSources: {
|
|
7
|
-
default:
|
|
8
|
-
development:
|
|
8
|
+
default: DefaultEventSource,
|
|
9
|
+
development: DevelopmentEventSource
|
|
9
10
|
}
|
|
10
11
|
} };
|
|
11
12
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { BaseEventSource } from "./lib/event-sources/base.js";
|
|
1
2
|
import { ChangeInfo, WatchListener, Watcher } from "./lib/watcher.js";
|
|
2
3
|
import "./types.js";
|
|
3
|
-
import { BaseEventSource } from "./lib/event-sources/base.js";
|
|
4
4
|
import DefaultEventSource from "./lib/event-sources/default.js";
|
|
5
5
|
import DevelopmentEventSource from "./lib/event-sources/development.js";
|
|
6
6
|
import "./lib/event-sources/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eggjs/watcher",
|
|
3
|
-
"version": "5.0.2-beta.
|
|
3
|
+
"version": "5.0.2-beta.10",
|
|
4
4
|
"description": "file watcher plugin for egg",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"egg",
|
|
@@ -45,16 +45,16 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"camelcase": "^9.0.0",
|
|
47
47
|
"sdk-base": "^5.0.1",
|
|
48
|
-
"@eggjs/utils": "5.0.2-beta.
|
|
48
|
+
"@eggjs/utils": "5.0.2-beta.10"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"typescript": "^5.9.3",
|
|
52
|
-
"@eggjs/
|
|
53
|
-
"
|
|
54
|
-
"
|
|
52
|
+
"@eggjs/mock": "7.0.2-beta.10",
|
|
53
|
+
"egg": "4.1.2-beta.10",
|
|
54
|
+
"@eggjs/utils": "5.0.2-beta.10"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"egg": "4.1.2-beta.
|
|
57
|
+
"egg": "4.1.2-beta.10"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=22.18.0"
|