whet 0.1.1 → 0.4.0

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.
Files changed (48) hide show
  1. package/bin/genes/util/EsMap.d.ts +1 -0
  2. package/bin/genes/util/EsMap.js +3 -0
  3. package/bin/haxe/Constraints.d.ts +1 -0
  4. package/bin/haxe/ds/IntMap.d.ts +6 -0
  5. package/bin/haxe/ds/IntMap.js +25 -0
  6. package/bin/haxe/ds/Vector.d.ts +2 -0
  7. package/bin/minimatch/MinimatchOptions.d.ts +28 -0
  8. package/bin/whet/Log.js +3 -0
  9. package/bin/whet/Project.d.ts +13 -0
  10. package/bin/whet/Project.js +26 -0
  11. package/bin/whet/Stone.d.ts +23 -0
  12. package/bin/whet/Stone.js +162 -7
  13. package/bin/whet/Whet.d.ts +1 -1
  14. package/bin/whet/Whet.js +68 -1
  15. package/bin/whet/cache/BaseCache.d.ts +7 -0
  16. package/bin/whet/cache/BaseCache.js +103 -7
  17. package/bin/whet/cache/CacheManager.d.ts +5 -0
  18. package/bin/whet/cache/CacheManager.js +97 -7
  19. package/bin/whet/cache/FileCache.d.ts +1 -0
  20. package/bin/whet/cache/FileCache.js +4 -0
  21. package/bin/whet/cache/MemoContext.d.ts +17 -0
  22. package/bin/whet/cache/MemoContext.js +35 -0
  23. package/bin/whet/magic/RoutePathType.js +5 -5
  24. package/bin/whet/profiler/Profiler.d.ts +65 -0
  25. package/bin/whet/profiler/Profiler.js +351 -0
  26. package/bin/whet/profiler/Span.d.ts +90 -0
  27. package/bin/whet/profiler/Span.js +56 -0
  28. package/bin/whet/profiler/SpanRecorder.d.ts +20 -0
  29. package/bin/whet/profiler/SpanRecorder.js +63 -0
  30. package/bin/whet/profiler/SpanStats.d.ts +15 -0
  31. package/bin/whet/profiler/SpanStats.js +49 -0
  32. package/bin/whet/route/Router.d.ts +5 -0
  33. package/bin/whet/route/Router.js +47 -33
  34. package/bin/whet/stones/Files.d.ts +5 -0
  35. package/bin/whet/stones/Files.js +20 -0
  36. package/bin/whet/stones/StoneFactory.d.ts +55 -0
  37. package/bin/whet/stones/StoneFactory.js +116 -0
  38. package/bin/whet.d.ts +2 -0
  39. package/bin/whet.js +1 -0
  40. package/package.json +2 -2
  41. package/bin/haxe/Log.d.ts +0 -33
  42. package/bin/haxe/Log.js +0 -61
  43. package/bin/pino_pretty/PrettyOptions.d.ts +0 -98
  44. package/bin/pino_pretty/default_/MessageFormatFunc.d.ts +0 -2
  45. package/bin/pino_pretty/default_/Prettifier.d.ts +0 -2
  46. package/bin/whet/extern/Minimatch.d.ts +0 -77
  47. package/bin/whet/stones/Server.d.ts +0 -59
  48. package/bin/whet/stones/Server.js +0 -261
@@ -2,6 +2,7 @@ import {RouteResult} from "./RouteResult.js"
2
2
  import {OutputFilterMatcher} from "./OutputFilterMatcher.js"
3
3
  import {RoutePathType_Fields_} from "../magic/RoutePathType.js"
4
4
  import {MinimatchType_Fields_} from "../magic/MinimatchType.js"
5
+ import {MemoContext} from "../cache/MemoContext.js"
5
6
  import {Utils} from "../Utils.js"
6
7
  import {Stone} from "../Stone.js"
7
8
  import {SourceHash} from "../SourceHash.js"
@@ -21,6 +22,13 @@ class Router extends Register.inherits() {
21
22
  while (_g < _g1.length) this.routes.push(_g1[_g++]);
22
23
  }
23
24
 
25
+ /**
26
+ Remove all routes.
27
+ */
28
+ clearRoutes() {
29
+ this.routes.length = 0;
30
+ }
31
+
24
32
  /**
25
33
  Recursively collect all Stone IDs referenced in this Router's routes.
26
34
  */
@@ -56,7 +64,10 @@ class Router extends Register.inherits() {
56
64
  * @param pattern A glob pattern to search for.
57
65
  */
58
66
  get(pattern) {
59
- return this.getResults([{"pathSoFar": [], "filter": (pattern != null) ? MinimatchType_Fields_.makeMinimatch(pattern) : null, "inProgress": true, "remDirs": []}], []);
67
+ let _gthis = this;
68
+ return MemoContext.ensure(function () {
69
+ return _gthis.getResults([{"pathSoFar": [], "filter": (pattern != null) ? MinimatchType_Fields_.makeMinimatch(pattern) : null, "inProgress": true, "remDirs": []}], []);
70
+ });
60
71
  }
61
72
  getResults(mainFilters, results) {
62
73
  let _gthis = this;
@@ -207,45 +218,48 @@ class Router extends Register.inherits() {
207
218
  * Includes matched serveIds in hash to capture filter effects.
208
219
  */
209
220
  getHash(pattern) {
210
- return this.get(pattern).then(function (items) {
211
- let uniqueStones = [];
212
- let serveIds = [];
213
- let _g = 0;
214
- while (_g < items.length) {
215
- let item = items[_g];
216
- ++_g;
217
- if (uniqueStones.indexOf(item.source) == -1) {
218
- uniqueStones.push(item.source);
219
- };
220
- serveIds.push(item.serveId);
221
- };
222
- serveIds.sort(function (a, b) {
223
- if (a < b) {
224
- return -1;
225
- } else if (a > b) {
226
- return 1;
227
- } else {
228
- return 0;
221
+ let _gthis = this;
222
+ return MemoContext.ensure(function () {
223
+ return _gthis.get(pattern).then(function (items) {
224
+ let uniqueStones = [];
225
+ let serveIds = [];
226
+ let _g = 0;
227
+ while (_g < items.length) {
228
+ let item = items[_g];
229
+ ++_g;
230
+ if (uniqueStones.indexOf(item.source) == -1) {
231
+ uniqueStones.push(item.source);
232
+ };
233
+ serveIds.push(item.serveId);
229
234
  };
230
- });
231
- let result = new Array(uniqueStones.length);
232
- let _g1 = 0;
233
- let _g2 = uniqueStones.length;
234
- while (_g1 < _g2) {
235
- let i = _g1++;
236
- result[i] = uniqueStones[i].getHash();
237
- };
238
- return Promise.all(result).then(function (hashes) {
239
- hashes.sort(function (a, b) {
240
- if (a.toString() < b.toString()) {
235
+ serveIds.sort(function (a, b) {
236
+ if (a < b) {
241
237
  return -1;
242
- } else if (a.toString() > b.toString()) {
238
+ } else if (a > b) {
243
239
  return 1;
244
240
  } else {
245
241
  return 0;
246
242
  };
247
243
  });
248
- return SourceHash.merge(...hashes).add(SourceHash.fromString(serveIds.join("\n")));
244
+ let result = new Array(uniqueStones.length);
245
+ let _g1 = 0;
246
+ let _g2 = uniqueStones.length;
247
+ while (_g1 < _g2) {
248
+ let i = _g1++;
249
+ result[i] = uniqueStones[i].getHash();
250
+ };
251
+ return Promise.all(result).then(function (hashes) {
252
+ hashes.sort(function (a, b) {
253
+ if (a.toString() < b.toString()) {
254
+ return -1;
255
+ } else if (a.toString() > b.toString()) {
256
+ return 1;
257
+ } else {
258
+ return 0;
259
+ };
260
+ });
261
+ return SourceHash.merge(...hashes).add(SourceHash.fromString(serveIds.join("\n")));
262
+ });
249
263
  });
250
264
  });
251
265
  }
@@ -18,6 +18,11 @@ export declare class Files extends Stone<FilesConfig> {
18
18
  id: string,
19
19
  pathId: string
20
20
  }
21
+
22
+ /**
23
+ Reuse an existing Files stone for this path, or create a new one.
24
+ */
25
+ static fromPath(path: string): Files
21
26
  }
22
27
 
23
28
  export type FilesConfig = {
@@ -5,6 +5,7 @@ import {Stone} from "../Stone.js"
5
5
  import {IdUtils, RootDir} from "../SourceId.js"
6
6
  import {SourceHash} from "../SourceHash.js"
7
7
  import {SourceData} from "../Source.js"
8
+ import {Project} from "../Project.js"
8
9
  import {Register} from "../../genes/Register.js"
9
10
 
10
11
  const $global = Register.$global
@@ -164,6 +165,25 @@ class Files extends Register.inherits(() => Stone, true) {
164
165
  };
165
166
  return {"pathId": pathId, "id": tmp};
166
167
  }
168
+
169
+ /**
170
+ Reuse an existing Files stone for this path, or create a new one.
171
+ */
172
+ static fromPath(path) {
173
+ let project = Project.projects[Project.projects.length - 1];
174
+ if (project != null) {
175
+ let _g = 0;
176
+ let _g1 = project.stones;
177
+ while (_g < _g1.length) {
178
+ let stone = _g1[_g];
179
+ ++_g;
180
+ if (stone.id == path && ((stone) instanceof Files)) {
181
+ return stone;
182
+ };
183
+ };
184
+ };
185
+ return new Files({"paths": [path]});
186
+ }
167
187
  static get __name__() {
168
188
  return "whet.stones.Files"
169
189
  }
@@ -0,0 +1,55 @@
1
+ import {Router} from "../route/Router"
2
+ import {RoutePathType} from "../magic/RoutePathType"
3
+ import {AnyStone} from "../Stone"
4
+
5
+ /**
6
+ * Base class for dynamic stone lifecycle management.
7
+ *
8
+ * Manages creation, update, and removal of stones based on external data.
9
+ * Extends Router so it can be used directly as a route source.
10
+ *
11
+ * JS subclasses override `createEntry`, `updateEntry`, and `addBaseRoutes`.
12
+ */
13
+ export declare class StoneFactory<D, E extends FactoryEntry> extends Router {
14
+ constructor(routes?: null | RoutePathType)
15
+ entryMap: Map<string, E>
16
+
17
+ /**
18
+ * Sync factory state with data. Calls `createEntry` for new keys,
19
+ * `updateEntry` for existing keys, and removes entries whose keys are absent.
20
+ * @return Array of removed keys (caller can use for cache cleanup via `cache.clearStone`).
21
+ */
22
+ sync(data: D[], keyFn: ((arg0: D) => string)): string[]
23
+
24
+ /**
25
+ Override in subclass: create stones and routes for a new data entry.
26
+ */
27
+ protected createEntry(key: string, data: D): E
28
+
29
+ /**
30
+ * Override in subclass: update an existing entry's stone configs in-place.
31
+ * Default implementation destroys and recreates the entry.
32
+ */
33
+ protected updateEntry(key: string, data: D, existing: E): void
34
+
35
+ /**
36
+ Override in subclass: add routes that are present on every sync (e.g., a database JSON file).
37
+ */
38
+ protected addBaseRoutes(): void
39
+
40
+ /**
41
+ Remove an entry, deregistering its stones from the project.
42
+ */
43
+ removeEntry(key: string): void
44
+ }
45
+
46
+ export type FactoryEntry = {
47
+ /**
48
+ Route definitions for this entry — added to the factory's Router on sync.
49
+ */
50
+ routes?: null | RoutePathType,
51
+ /**
52
+ Stones owned by this entry — deregistered from project on removal.
53
+ */
54
+ stones: AnyStone[]
55
+ }
@@ -0,0 +1,116 @@
1
+ import {Router} from "../route/Router.js"
2
+ import {RoutePathType_Fields_} from "../magic/RoutePathType.js"
3
+ import {Register} from "../../genes/Register.js"
4
+
5
+ const $global = Register.$global
6
+
7
+ /**
8
+ * Base class for dynamic stone lifecycle management.
9
+ *
10
+ * Manages creation, update, and removal of stones based on external data.
11
+ * Extends Router so it can be used directly as a route source.
12
+ *
13
+ * JS subclasses override `createEntry`, `updateEntry`, and `addBaseRoutes`.
14
+ */
15
+ export const StoneFactory = Register.global("$hxClasses")["whet.stones.StoneFactory"] =
16
+ class StoneFactory extends Register.inherits(Router) {
17
+ [Register.new](routes) {
18
+ this.entryMap = new Map();
19
+ super[Register.new](routes);
20
+ }
21
+
22
+ /**
23
+ * Sync factory state with data. Calls `createEntry` for new keys,
24
+ * `updateEntry` for existing keys, and removes entries whose keys are absent.
25
+ * @return Array of removed keys (caller can use for cache cleanup via `cache.clearStone`).
26
+ */
27
+ sync(data, keyFn) {
28
+ let newKeys = new Set();
29
+ this.clearRoutes();
30
+ this.addBaseRoutes();
31
+ let _g = 0;
32
+ while (_g < data.length) {
33
+ let item = data[_g];
34
+ ++_g;
35
+ let key = keyFn(item);
36
+ newKeys.add(key);
37
+ if (this.entryMap.has(key)) {
38
+ this.updateEntry(key, item, this.entryMap.get(key));
39
+ } else {
40
+ this.entryMap.set(key, this.createEntry(key, item));
41
+ };
42
+ let entry = this.entryMap.get(key);
43
+ if (entry.routes != null) {
44
+ let _g = 0;
45
+ let _g1 = RoutePathType_Fields_.makeRoutePath(entry.routes);
46
+ while (_g < _g1.length) this.routes.push(_g1[_g++]);
47
+ };
48
+ };
49
+ let toRemove = [];
50
+ let jsIterator = this.entryMap.keys();
51
+ let _g_lastStep = jsIterator.next();
52
+ while (!_g_lastStep.done) {
53
+ let v = _g_lastStep.value;
54
+ _g_lastStep = jsIterator.next();
55
+ if (!newKeys.has(v)) {
56
+ toRemove.push(v);
57
+ };
58
+ };
59
+ let _g1 = 0;
60
+ while (_g1 < toRemove.length) this.removeEntry(toRemove[_g1++]);
61
+ return toRemove;
62
+ }
63
+
64
+ /**
65
+ Override in subclass: create stones and routes for a new data entry.
66
+ */
67
+ createEntry(key, data) {
68
+ throw new Error("StoneFactory.createEntry must be overridden");
69
+ }
70
+
71
+ /**
72
+ * Override in subclass: update an existing entry's stone configs in-place.
73
+ * Default implementation destroys and recreates the entry.
74
+ */
75
+ updateEntry(key, data, existing) {
76
+ this.removeEntry(key);
77
+ this.entryMap.set(key, this.createEntry(key, data));
78
+ }
79
+
80
+ /**
81
+ Override in subclass: add routes that are present on every sync (e.g., a database JSON file).
82
+ */
83
+ addBaseRoutes() {
84
+ }
85
+
86
+ /**
87
+ Remove an entry, deregistering its stones from the project.
88
+ */
89
+ removeEntry(key) {
90
+ let entry = this.entryMap.get(key);
91
+ if (entry == null) {
92
+ return;
93
+ };
94
+ if (entry.stones != null) {
95
+ let stones = entry.stones;
96
+ let _g = 0;
97
+ while (_g < stones.length) {
98
+ let s = stones[_g];
99
+ ++_g;
100
+ s.project.removeStone(s);
101
+ };
102
+ };
103
+ this.entryMap["delete"](key);
104
+ }
105
+ static get __name__() {
106
+ return "whet.stones.StoneFactory"
107
+ }
108
+ static get __super__() {
109
+ return Router
110
+ }
111
+ get __class__() {
112
+ return StoneFactory
113
+ }
114
+ }
115
+ StoneFactory.prototype.entryMap = null;
116
+
package/bin/whet.d.ts CHANGED
@@ -3,6 +3,7 @@ export {addOption} from "./whet/Project"
3
3
  export {ZipStone} from "./whet/stones/Zip"
4
4
  export {ZipConfig} from "./whet/stones/Zip"
5
5
  export {Utils} from "./whet/Utils"
6
+ export {StoneFactory} from "./whet/stones/StoneFactory"
6
7
  export {Stone} from "./whet/Stone"
7
8
  export {Router} from "./whet/route/Router"
8
9
  export {RemoteFileConfig} from "./whet/stones/RemoteFile"
@@ -17,6 +18,7 @@ export {Hxml} from "./whet/stones/haxe/Hxml"
17
18
  export {HaxeBuild} from "./whet/stones/haxe/HaxeBuild"
18
19
  export {FilesConfig} from "./whet/stones/Files"
19
20
  export {Files} from "./whet/stones/Files"
21
+ export {FactoryEntry} from "./whet/stones/StoneFactory"
20
22
  export {DCE} from "./whet/stones/haxe/Hxml"
21
23
  export {ConfigStore} from "./whet/ConfigStore"
22
24
  export {BuildPlatform} from "./whet/stones/haxe/Hxml"
package/bin/whet.js CHANGED
@@ -8,6 +8,7 @@ Whet_Fields_.main()
8
8
  export {addOption} from "./whet/Project.js"
9
9
  export {ZipStone} from "./whet/stones/Zip.js"
10
10
  export {Utils} from "./whet/Utils.js"
11
+ export {StoneFactory} from "./whet/stones/StoneFactory.js"
11
12
  export {Stone} from "./whet/Stone.js"
12
13
  export {Router} from "./whet/route/Router.js"
13
14
  export {RemoteFile} from "./whet/stones/RemoteFile.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whet",
3
- "version": "0.1.1",
3
+ "version": "0.4.0",
4
4
  "description": "NodeJS based assets management and project tooling library.",
5
5
  "scripts": {
6
6
  "devinit": "npx dts2hx commander pino-pretty minimatch --modular --noLibWrap",
@@ -27,7 +27,7 @@
27
27
  "homepage": "https://github.com/Antriel/whet#readme",
28
28
  "dependencies": {
29
29
  "commander": "^14.0.3",
30
- "minimatch": "^10.2.2",
30
+ "minimatch": "^10.2.5",
31
31
  "pino-pretty": "^13.1.3"
32
32
  },
33
33
  "devDependencies": {
package/bin/haxe/Log.d.ts DELETED
@@ -1,33 +0,0 @@
1
- import {PosInfos} from "./PosInfos"
2
-
3
- /**
4
- Log primarily provides the `trace()` method, which is invoked upon a call to
5
- `trace()` in Haxe code.
6
- */
7
- export declare class Log {
8
-
9
- /**
10
- Format the output of `trace` before printing it.
11
- */
12
- static formatOutput(v: any, infos: PosInfos): string
13
-
14
- /**
15
- Outputs `v` in a platform-dependent way.
16
-
17
- The second parameter `infos` is injected by the compiler and contains
18
- information about the position where the `trace()` call was made.
19
-
20
- This method can be rebound to a custom function:
21
-
22
- var oldTrace = haxe.Log.trace; // store old function
23
- haxe.Log.trace = function(v, ?infos) {
24
- // handle trace
25
- }
26
- ...
27
- haxe.Log.trace = oldTrace;
28
-
29
- If it is bound to null, subsequent calls to `trace()` will cause an
30
- exception.
31
- */
32
- static trace(v: any, infos?: null | PosInfos): void
33
- }
package/bin/haxe/Log.js DELETED
@@ -1,61 +0,0 @@
1
- import {Register} from "../genes/Register.js"
2
- import {Std} from "../Std.js"
3
-
4
- const $global = Register.$global
5
-
6
- /**
7
- Log primarily provides the `trace()` method, which is invoked upon a call to
8
- `trace()` in Haxe code.
9
- */
10
- export const Log = Register.global("$hxClasses")["haxe.Log"] =
11
- class Log {
12
-
13
- /**
14
- Format the output of `trace` before printing it.
15
- */
16
- static formatOutput(v, infos) {
17
- let str = Std.string(v);
18
- if (infos == null) {
19
- return str;
20
- };
21
- let pstr = infos.fileName + ":" + infos.lineNumber;
22
- if (infos.customParams != null) {
23
- let _g = 0;
24
- let _g1 = infos.customParams;
25
- while (_g < _g1.length) str += ", " + Std.string(_g1[_g++]);
26
- };
27
- return pstr + ": " + str;
28
- }
29
-
30
- /**
31
- Outputs `v` in a platform-dependent way.
32
-
33
- The second parameter `infos` is injected by the compiler and contains
34
- information about the position where the `trace()` call was made.
35
-
36
- This method can be rebound to a custom function:
37
-
38
- var oldTrace = haxe.Log.trace; // store old function
39
- haxe.Log.trace = function(v, ?infos) {
40
- // handle trace
41
- }
42
- ...
43
- haxe.Log.trace = oldTrace;
44
-
45
- If it is bound to null, subsequent calls to `trace()` will cause an
46
- exception.
47
- */
48
- static trace(v, infos) {
49
- let str = Log.formatOutput(v, infos);
50
- if (typeof(console) != "undefined" && console.log != null) {
51
- console.log(str);
52
- };
53
- }
54
- static get __name__() {
55
- return "haxe.Log"
56
- }
57
- get __class__() {
58
- return Log
59
- }
60
- }
61
-
@@ -1,98 +0,0 @@
1
- import {Prettifier} from "./default_/Prettifier"
2
-
3
- export type PrettyOptions = {
4
- /**
5
- Opens the file with the 'a' flag.
6
- */
7
- append?: null | boolean,
8
- /**
9
- If set to true, will add color information to the formatted output message.
10
- */
11
- colorize?: null | boolean,
12
- /**
13
- Appends carriage return and line feed, instead of just a line feed, to the formatted log line.
14
- */
15
- crlf?: null | boolean,
16
- /**
17
- Provides the ability to add a custom prettify function for specific log properties.
18
- `customPrettifiers` is an object, where keys are log properties that will be prettified
19
- and value is the prettify function itself.
20
- For example, if a log line contains a query property, you can specify a prettifier for it:
21
- */
22
- customPrettifiers?: null | {[key: string]: Prettifier},
23
- /**
24
- The file, file descriptor, or stream to write to. Defaults to 1 (stdout).
25
- */
26
- destination?: null | any,
27
- /**
28
- Define the log keys that are associated with error like objects.
29
- */
30
- errorLikeObjectKeys?: null | string[],
31
- /**
32
- When formatting an error object, display this list of properties.
33
- The list should be a comma separated list of properties.
34
- */
35
- errorProps?: null | string,
36
- /**
37
- Hide objects from output (but not error object).
38
- */
39
- hideObject?: null | boolean,
40
- /**
41
- Ignore one or several keys.
42
- Will be overridden by the option include if include is presented.
43
- */
44
- ignore?: null | string,
45
- /**
46
- Include one or several keys.
47
- */
48
- include?: null | string,
49
- /**
50
- If set to true, it will print the name of the log level as the first field in the log line.
51
- */
52
- levelFirst?: null | boolean,
53
- /**
54
- Define the key that contains the level of the log.
55
- */
56
- levelKey?: null | string,
57
- /**
58
- Output the log level using the specified label.
59
- */
60
- levelLabel?: null | string,
61
- /**
62
- Format output of message, e.g. {level} - {pid} will output message: INFO - 1123
63
- */
64
- messageFormat?: null | any,
65
- /**
66
- The key in the JSON object to use as the highlighted message.
67
- */
68
- messageKey?: null | string,
69
- /**
70
- The minimum log level to include in the output.
71
- */
72
- minimumLevel?: null | any,
73
- /**
74
- Ensure directory for destination file exists.
75
- */
76
- mkdir?: null | boolean,
77
- /**
78
- Print each log message on a single line (errors will still be multi-line).
79
- */
80
- singleLine?: null | boolean,
81
- /**
82
- Makes messaging synchronous.
83
- */
84
- sync?: null | boolean,
85
- /**
86
- The key in the JSON object to use for timestamp display.
87
- */
88
- timestampKey?: null | string,
89
- /**
90
- Translate the epoch time value into a human readable date and time string. This flag also can set the format
91
- string to apply when translating the date to human readable format. For a list of available pattern letters
92
- see the {@link https://www.npmjs.com/package/dateformat|dateformat documentation}.
93
- - The default format is `yyyy-mm-dd HH:MM:ss.l o` in UTC.
94
- - Requires a `SYS:` prefix to translate time to the local system's timezone. Use the shortcut `SYS:standard`
95
- to translate time to `yyyy-mm-dd HH:MM:ss.l o` in system timezone.
96
- */
97
- translateTime?: null | any
98
- }
@@ -1,2 +0,0 @@
1
-
2
- export type MessageFormatFunc = ((log: {[key: string]: any}, messageKey: string, levelLabel: string) => string)
@@ -1,2 +0,0 @@
1
-
2
- export type Prettifier = ((inputData: any) => string)
@@ -1,77 +0,0 @@
1
-
2
- export type IOptions = {
3
- /**
4
- Dump a ton of stuff to stderr.
5
- */
6
- debug?: null | boolean,
7
- /**
8
- Allow patterns to match filenames starting with a period,
9
- even if the pattern does not explicitly have a period in that spot.
10
-
11
- Note that by default, `'a/**' + '/b'` will **not** match `a/.d/b`, unless `dot` is set.
12
- */
13
- dot?: null | boolean,
14
- /**
15
- Returns from negate expressions the same as if they were not negated.
16
- (Ie, true on a hit, false on a miss.)
17
- */
18
- flipNegate?: null | boolean,
19
- /**
20
- If set, then patterns without slashes will be matched
21
- against the basename of the path if it contains slashes. For example,
22
- `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
23
- */
24
- matchBase?: null | boolean,
25
- /**
26
- Do not expand `{a,b}` and `{1..3}` brace sets.
27
- */
28
- nobrace?: null | boolean,
29
- /**
30
- Perform a case-insensitive match.
31
- */
32
- nocase?: null | boolean,
33
- /**
34
- Suppress the behavior of treating `#` at the start of a pattern as a comment.
35
- */
36
- nocomment?: null | boolean,
37
- /**
38
- Disable "extglob" style patterns like `+(a|b)`.
39
- */
40
- noext?: null | boolean,
41
- /**
42
- Disable `**` matching against multiple folder names.
43
- */
44
- noglobstar?: null | boolean,
45
- /**
46
- Suppress the behavior of treating a leading `!` character as negation.
47
- */
48
- nonegate?: null | boolean,
49
- /**
50
- When a match is not found by `minimatch.match`,
51
- return a list containing the pattern itself if this option is set.
52
- Otherwise, an empty list is returned if there are no matches.
53
- */
54
- nonull?: null | boolean,
55
- /**
56
- Compare a partial path to a pattern. As long as the parts of the path that
57
- are present are not contradicted by the pattern, it will be treated as a
58
- match. This is useful in applications where you're walking through a
59
- folder structure, and don't yet have the full path, but want to ensure that
60
- you do not walk down paths that can never be a match.
61
- */
62
- partial?: null | boolean,
63
- /**
64
- Use `\\` as a path separator _only_, and _never_ as an escape
65
- character. If set, all `\\` characters are replaced with `/` in
66
- the pattern. Note that this makes it **impossible** to match
67
- against paths containing literal glob pattern characters, but
68
- allows matching with patterns constructed using `path.join()` and
69
- `path.resolve()` on Windows platforms, mimicking the (buggy!)
70
- behavior of earlier versions on Windows. Please use with
71
- caution, and be mindful of the caveat about Windows paths
72
-
73
- For legacy reasons, this is also set if
74
- `options.allowWindowsEscape` is set to the exact value `false`.
75
- */
76
- windowsPathsNoEscape?: null | boolean
77
- }