@e-mc/watch 0.8.3 → 0.8.4
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/README.md +64 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,7 +1,68 @@
|
|
|
1
|
-
|
|
1
|
+
# @e-mc/watch
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
* NodeJS 14
|
|
4
|
+
* ES2020
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
## General Usage
|
|
7
|
+
|
|
8
|
+
* [Read the Docs](https://e-mc.readthedocs.io)
|
|
9
|
+
|
|
10
|
+
## Interface
|
|
11
|
+
|
|
12
|
+
- https://www.unpkg.com/@e-mc/types@0.8.4/lib/index.d.ts
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { IFileManager, ModuleConstructor } from "./index";
|
|
16
|
+
import type { ExternalAsset } from "./asset";
|
|
17
|
+
import type { IClient, IPermission } from "./core";
|
|
18
|
+
import type { FinalizeResult, PostFinalizeCallback } from "./filemanager";
|
|
19
|
+
import type { WatchModule } from "./settings";
|
|
20
|
+
import type { IFileGroup, ModifiedPostFinalizeListener, SecureOptions } from "./watch";
|
|
21
|
+
|
|
22
|
+
import type * as ws from "ws";
|
|
23
|
+
|
|
24
|
+
interface IWatch extends IClient<IFileManager, WatchModule, ModifiedPostFinalizeListener> {
|
|
25
|
+
connectTimeout: number;
|
|
26
|
+
start(assets: ExternalAsset[], permission?: IPermission): void;
|
|
27
|
+
modified(watch: IFileGroup<ExternalAsset>): Promise<FinalizeResult | void>;
|
|
28
|
+
configureServer(options: SecureOptions): boolean;
|
|
29
|
+
setCA(value: string): boolean;
|
|
30
|
+
setSSLKey(value: string): boolean;
|
|
31
|
+
setSSLCert(value: string): boolean;
|
|
32
|
+
hasSecureProtocol(): boolean;
|
|
33
|
+
whenModified?(assets: ExternalAsset[], postFinalize: PostFinalizeCallback): IFileManager;
|
|
34
|
+
whenModified?(assets: ExternalAsset[], sanitize?: boolean | PostFinalizeCallback, postFinalize?: PostFinalizeCallback): IFileManager;
|
|
35
|
+
set assets(value: ExternalAsset[]);
|
|
36
|
+
get assets(): ExternalAsset[];
|
|
37
|
+
set interval(value);
|
|
38
|
+
get interval(): number;
|
|
39
|
+
set port(value);
|
|
40
|
+
get port(): number;
|
|
41
|
+
set securePort(value);
|
|
42
|
+
get securePort(): number;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface WatchConstructor extends ModuleConstructor {
|
|
46
|
+
createServer(port: number, active: boolean): ws.Server | null;
|
|
47
|
+
createServer(port: number, secure?: SecureOptions | null, active?: boolean): ws.Server | null;
|
|
48
|
+
shutdown(): void;
|
|
49
|
+
setTimeout(value: number | string): void;
|
|
50
|
+
checkTimeout(client: ws): boolean;
|
|
51
|
+
readonly prototype: IWatch;
|
|
52
|
+
new(module?: WatchModule): IWatch;
|
|
53
|
+
/* @deprecated */
|
|
54
|
+
new(interval?: number, port?: number, securePort?: number, extensions?: unknown[]): IWatch;
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## References
|
|
59
|
+
|
|
60
|
+
- https://www.unpkg.com/@e-mc/types@0.8.4/lib/asset.d.ts
|
|
61
|
+
- https://www.unpkg.com/@e-mc/types@0.8.4/lib/core.d.ts
|
|
62
|
+
- https://www.unpkg.com/@e-mc/types@0.8.4/lib/filemanager.d.ts
|
|
63
|
+
- https://www.unpkg.com/@e-mc/types@0.8.4/lib/settings.d.ts
|
|
64
|
+
- https://www.unpkg.com/@e-mc/types@0.8.4/lib/watch.d.ts
|
|
65
|
+
|
|
66
|
+
## LICENSE
|
|
6
67
|
|
|
7
68
|
BSD 3-Clause
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/watch",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"description": "Watch constructor for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"license": "BSD 3-Clause",
|
|
21
21
|
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/core": "0.8.
|
|
24
|
-
"@e-mc/request": "0.8.
|
|
25
|
-
"@e-mc/types": "0.8.
|
|
23
|
+
"@e-mc/core": "0.8.4",
|
|
24
|
+
"@e-mc/request": "0.8.4",
|
|
25
|
+
"@e-mc/types": "0.8.4",
|
|
26
26
|
"picomatch": "^3.0.1",
|
|
27
27
|
"ws": "^8.16.0"
|
|
28
28
|
}
|