cscchokidar-next 0.0.1-security → 4.0.14

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.

Potentially problematic release.


This version of cscchokidar-next might be problematic. Click here for more details.

package/package.json CHANGED
@@ -1,6 +1,82 @@
1
1
  {
2
2
  "name": "cscchokidar-next",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
6
- }
3
+ "description": "Minimal and efficient cross-platform file watching library",
4
+ "version": "4.0.14",
5
+ "homepage": "https://github.com/paulmillr/chokidar",
6
+ "author": "Paul Miller (https://paulmillr.com)",
7
+ "contributors": [
8
+ "Paul Miller (https://paulmillr.com)",
9
+ "Elan Shanker"
10
+ ],
11
+ "engines": {
12
+ "node": ">= 8.10.0"
13
+ },
14
+ "main": "index.js",
15
+ "dependencies": {
16
+ "anymatch": "3.1.1",
17
+ "braces": "3.0.2",
18
+ "fs": "0.0.1-security",
19
+ "glob-parent": "5.1.0",
20
+ "is-binary-path": "2.1.0",
21
+ "is-glob": "4.0.1",
22
+ "normalize-path": "3.0.0",
23
+ "readdirp": "3.5.0"
24
+ },
25
+ "optionalDependencies": {
26
+ "fsevents": "~2.3.1"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "14",
30
+ "chai": "4.2",
31
+ "dtslint": "3.3.0",
32
+ "eslint": "7.0.0",
33
+ "mocha": "7.0.0",
34
+ "nyc": "15.0.0",
35
+ "rimraf": "3.0.0",
36
+ "sinon": "9.0.1",
37
+ "sinon-chai": "3.3.0",
38
+ "upath": "1.2.0"
39
+ },
40
+ "files": [
41
+ "index.js",
42
+ "lib/*.js",
43
+ "types/index.d.ts"
44
+ ],
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/paulmillr/chokidar.git"
48
+ },
49
+ "bugs": {
50
+ "url": "https://github.com/paulmillr/chokidar/issues"
51
+ },
52
+ "license": "MIT",
53
+ "scripts": {
54
+ "dtslint": "dtslint types",
55
+ "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
56
+ "mocha": "mocha --exit --timeout 60000",
57
+ "test": "npm run lint && npm run mocha"
58
+ },
59
+ "keywords": [
60
+ "fs",
61
+ "watch",
62
+ "watchFile",
63
+ "watcher",
64
+ "watching",
65
+ "file",
66
+ "fsevents"
67
+ ],
68
+ "types": "./types/index.d.ts",
69
+ "nyc": {
70
+ "include": [
71
+ "index.js",
72
+ "lib/*.js"
73
+ ],
74
+ "reporter": [
75
+ "html",
76
+ "text"
77
+ ]
78
+ },
79
+ "__npminstall_done": true,
80
+ "_from": "cscchokidar-next@4.0.14",
81
+ "_resolved": "https://registry.npmmirror.com/cscchokidar-next/-/cscchokidar-next-4.0.14.tgz"
82
+ }
@@ -0,0 +1,187 @@
1
+ // TypeScript Version: 3.0
2
+
3
+ /// <reference types="node" />
4
+
5
+ import * as fs from "fs";
6
+ import { EventEmitter } from "events";
7
+
8
+ export class FSWatcher extends EventEmitter implements fs.FSWatcher {
9
+ options: WatchOptions;
10
+
11
+ /**
12
+ * Constructs a new FSWatcher instance with optional WatchOptions parameter.
13
+ */
14
+ constructor(options?: WatchOptions);
15
+
16
+ /**
17
+ * Add files, directories, or glob patterns for tracking. Takes an array of strings or just one
18
+ * string.
19
+ */
20
+ add(paths: string | ReadonlyArray<string>): void;
21
+
22
+ /**
23
+ * Stop watching files, directories, or glob patterns. Takes an array of strings or just one
24
+ * string.
25
+ */
26
+ unwatch(paths: string | ReadonlyArray<string>): void;
27
+
28
+ /**
29
+ * Returns an object representing all the paths on the file system being watched by this
30
+ * `FSWatcher` instance. The object's keys are all the directories (using absolute paths unless
31
+ * the `cwd` option was used), and the values are arrays of the names of the items contained in
32
+ * each directory.
33
+ */
34
+ getWatched(): {
35
+ [directory: string]: string[];
36
+ };
37
+
38
+ /**
39
+ * Removes all listeners from watched files.
40
+ */
41
+ close(): Promise<void>;
42
+
43
+ on(event: 'add'|'addDir'|'change', listener: (path: string, stats?: fs.Stats) => void): this;
44
+
45
+ on(event: 'all', listener: (eventName: 'add'|'addDir'|'change'|'unlink'|'unlinkDir', path: string, stats?: fs.Stats) => void): this;
46
+
47
+ /**
48
+ * Error occurred
49
+ */
50
+ on(event: 'error', listener: (error: Error) => void): this;
51
+
52
+ /**
53
+ * Exposes the native Node `fs.FSWatcher events`
54
+ */
55
+ on(event: 'raw', listener: (eventName: string, path: string, details: any) => void): this;
56
+
57
+ /**
58
+ * Fires when the initial scan is complete
59
+ */
60
+ on(event: 'ready', listener: () => void): this;
61
+
62
+ on(event: 'unlink'|'unlinkDir', listener: (path: string) => void): this;
63
+
64
+ on(event: string, listener: (...args: any[]) => void): this;
65
+ }
66
+
67
+ export interface WatchOptions {
68
+ /**
69
+ * Indicates whether the process should continue to run as long as files are being watched. If
70
+ * set to `false` when using `fsevents` to watch, no more events will be emitted after `ready`,
71
+ * even if the process continues to run.
72
+ */
73
+ persistent?: boolean;
74
+
75
+ /**
76
+ * ([anymatch](https://github.com/micromatch/anymatch)-compatible definition) Defines files/paths to
77
+ * be ignored. The whole relative or absolute path is tested, not just filename. If a function
78
+ * with two arguments is provided, it gets called twice per path - once with a single argument
79
+ * (the path), second time with two arguments (the path and the
80
+ * [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path).
81
+ */
82
+ ignored?: any;
83
+
84
+ /**
85
+ * If set to `false` then `add`/`addDir` events are also emitted for matching paths while
86
+ * instantiating the watching as chokidar discovers these file paths (before the `ready` event).
87
+ */
88
+ ignoreInitial?: boolean;
89
+
90
+ /**
91
+ * When `false`, only the symlinks themselves will be watched for changes instead of following
92
+ * the link references and bubbling events through the link's path.
93
+ */
94
+ followSymlinks?: boolean;
95
+
96
+ /**
97
+ * The base directory from which watch `paths` are to be derived. Paths emitted with events will
98
+ * be relative to this.
99
+ */
100
+ cwd?: string;
101
+
102
+ /**
103
+ * If set to true then the strings passed to .watch() and .add() are treated as literal path
104
+ * names, even if they look like globs. Default: false.
105
+ */
106
+ disableGlobbing?: boolean;
107
+
108
+ /**
109
+ * Whether to use fs.watchFile (backed by polling), or fs.watch. If polling leads to high CPU
110
+ * utilization, consider setting this to `false`. It is typically necessary to **set this to
111
+ * `true` to successfully watch files over a network**, and it may be necessary to successfully
112
+ * watch files in other non-standard situations. Setting to `true` explicitly on OS X overrides
113
+ * the `useFsEvents` default.
114
+ */
115
+ usePolling?: boolean;
116
+
117
+ /**
118
+ * Whether to use the `fsevents` watching interface if available. When set to `true` explicitly
119
+ * and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on
120
+ * OS X, `usePolling: true` becomes the default.
121
+ */
122
+ useFsEvents?: boolean;
123
+
124
+ /**
125
+ * If relying upon the [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object that
126
+ * may get passed with `add`, `addDir`, and `change` events, set this to `true` to ensure it is
127
+ * provided even in cases where it wasn't already available from the underlying watch events.
128
+ */
129
+ alwaysStat?: boolean;
130
+
131
+ /**
132
+ * If set, limits how many levels of subdirectories will be traversed.
133
+ */
134
+ depth?: number;
135
+
136
+ /**
137
+ * Interval of file system polling.
138
+ */
139
+ interval?: number;
140
+
141
+ /**
142
+ * Interval of file system polling for binary files. ([see list of binary extensions](https://gi
143
+ * thub.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json))
144
+ */
145
+ binaryInterval?: number;
146
+
147
+ /**
148
+ * Indicates whether to watch files that don't have read permissions if possible. If watching
149
+ * fails due to `EPERM` or `EACCES` with this set to `true`, the errors will be suppressed
150
+ * silently.
151
+ */
152
+ ignorePermissionErrors?: boolean;
153
+
154
+ /**
155
+ * `true` if `useFsEvents` and `usePolling` are `false`). Automatically filters out artifacts
156
+ * that occur when using editors that use "atomic writes" instead of writing directly to the
157
+ * source file. If a file is re-added within 100 ms of being deleted, Chokidar emits a `change`
158
+ * event rather than `unlink` then `add`. If the default of 100 ms does not work well for you,
159
+ * you can override it by setting `atomic` to a custom value, in milliseconds.
160
+ */
161
+ atomic?: boolean | number;
162
+
163
+ /**
164
+ * can be set to an object in order to adjust timing params:
165
+ */
166
+ awaitWriteFinish?: AwaitWriteFinishOptions | boolean;
167
+ }
168
+
169
+ export interface AwaitWriteFinishOptions {
170
+ /**
171
+ * Amount of time in milliseconds for a file size to remain constant before emitting its event.
172
+ */
173
+ stabilityThreshold?: number;
174
+
175
+ /**
176
+ * File size polling interval.
177
+ */
178
+ pollInterval?: number;
179
+ }
180
+
181
+ /**
182
+ * produces an instance of `FSWatcher`.
183
+ */
184
+ export function watch(
185
+ paths: string | ReadonlyArray<string>,
186
+ options?: WatchOptions
187
+ ): FSWatcher;