@monorepolint/utils 0.5.0-alpha.10 → 0.5.0-alpha.103

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 (90) hide show
  1. package/.turbo/turbo-clean.log +4 -0
  2. package/.turbo/turbo-compile-typescript.log +4 -0
  3. package/.turbo/turbo-lint.log +61 -0
  4. package/.turbo/turbo-test.log +26 -0
  5. package/.turbo/turbo-transpile-typescript.log +18 -0
  6. package/build/js/index.cjs +999 -0
  7. package/build/js/index.cjs.map +1 -0
  8. package/build/js/index.js +957 -0
  9. package/build/js/index.js.map +1 -0
  10. package/build/tsconfig.tsbuildinfo +1 -0
  11. package/build/types/AggregateTiming.d.ts +15 -0
  12. package/build/types/AggregateTiming.d.ts.map +1 -0
  13. package/build/types/CachingHost.d.ts +39 -0
  14. package/build/types/CachingHost.d.ts.map +1 -0
  15. package/build/types/Host.d.ts +38 -0
  16. package/build/types/Host.d.ts.map +1 -0
  17. package/{lib → build/types}/PackageJson.d.ts +0 -0
  18. package/build/types/PackageJson.d.ts.map +1 -0
  19. package/build/types/SimpleHost.d.ts +34 -0
  20. package/build/types/SimpleHost.d.ts.map +1 -0
  21. package/build/types/Table.d.ts +53 -0
  22. package/build/types/Table.d.ts.map +1 -0
  23. package/build/types/Timing.d.ts +9 -0
  24. package/build/types/Timing.d.ts.map +1 -0
  25. package/build/types/__tests__/CachingHost.spec.d.ts +2 -0
  26. package/build/types/__tests__/CachingHost.spec.d.ts.map +1 -0
  27. package/build/types/findWorkspaceDir.d.ts +10 -0
  28. package/build/types/findWorkspaceDir.d.ts.map +1 -0
  29. package/{lib → build/types}/getPackageNameToDir.d.ts +2 -1
  30. package/build/types/getPackageNameToDir.d.ts.map +1 -0
  31. package/build/types/getWorkspacePackageDirs.d.ts +9 -0
  32. package/build/types/getWorkspacePackageDirs.d.ts.map +1 -0
  33. package/build/types/index.d.ts +20 -0
  34. package/build/types/index.d.ts.map +1 -0
  35. package/build/types/matchesAnyGlob.d.ts +17 -0
  36. package/build/types/matchesAnyGlob.d.ts.map +1 -0
  37. package/{lib → build/types}/mutateJson.d.ts +2 -1
  38. package/build/types/mutateJson.d.ts.map +1 -0
  39. package/build/types/nanosecondsToSanity.d.ts +8 -0
  40. package/build/types/nanosecondsToSanity.d.ts.map +1 -0
  41. package/{jest.config.js → jest.config.cjs} +0 -0
  42. package/package.json +37 -14
  43. package/src/AggregateTiming.ts +70 -0
  44. package/src/CachingHost.ts +490 -0
  45. package/src/Host.ts +34 -0
  46. package/src/SimpleHost.ts +56 -0
  47. package/src/Table.ts +318 -0
  48. package/src/Timing.ts +54 -0
  49. package/src/__tests__/CachingHost.spec.ts +244 -0
  50. package/src/findWorkspaceDir.ts +25 -7
  51. package/src/getPackageNameToDir.ts +11 -7
  52. package/src/getWorkspacePackageDirs.ts +39 -11
  53. package/src/index.ts +13 -7
  54. package/src/matchesAnyGlob.ts +146 -0
  55. package/src/mutateJson.ts +4 -6
  56. package/src/nanosecondsToSanity.ts +10 -0
  57. package/tsconfig.json +7 -2
  58. package/tsup.config.cjs +11 -0
  59. package/lib/PackageJson.d.ts.map +0 -1
  60. package/lib/PackageJson.js +0 -9
  61. package/lib/PackageJson.js.map +0 -1
  62. package/lib/findWorkspaceDir.d.ts +0 -8
  63. package/lib/findWorkspaceDir.d.ts.map +0 -1
  64. package/lib/findWorkspaceDir.js +0 -28
  65. package/lib/findWorkspaceDir.js.map +0 -1
  66. package/lib/getPackageNameToDir.d.ts.map +0 -1
  67. package/lib/getPackageNameToDir.js +0 -30
  68. package/lib/getPackageNameToDir.js.map +0 -1
  69. package/lib/getWorkspacePackageDirs.d.ts +0 -8
  70. package/lib/getWorkspacePackageDirs.d.ts.map +0 -1
  71. package/lib/getWorkspacePackageDirs.js +0 -39
  72. package/lib/getWorkspacePackageDirs.js.map +0 -1
  73. package/lib/index.d.ts +0 -14
  74. package/lib/index.d.ts.map +0 -1
  75. package/lib/index.js +0 -21
  76. package/lib/index.js.map +0 -1
  77. package/lib/mutateJson.d.ts.map +0 -1
  78. package/lib/mutateJson.js +0 -17
  79. package/lib/mutateJson.js.map +0 -1
  80. package/lib/readJson.d.ts +0 -8
  81. package/lib/readJson.d.ts.map +0 -1
  82. package/lib/readJson.js +0 -15
  83. package/lib/readJson.js.map +0 -1
  84. package/lib/writeJson.d.ts +0 -8
  85. package/lib/writeJson.d.ts.map +0 -1
  86. package/lib/writeJson.js +0 -14
  87. package/lib/writeJson.js.map +0 -1
  88. package/src/readJson.ts +0 -13
  89. package/src/writeJson.ts +0 -12
  90. package/tsconfig.tsbuildinfo +0 -1586
@@ -0,0 +1,999 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var __accessCheck = (obj, member, msg) => {
26
+ if (!member.has(obj))
27
+ throw TypeError("Cannot " + msg);
28
+ };
29
+ var __privateGet = (obj, member, getter) => {
30
+ __accessCheck(obj, member, "read from private field");
31
+ return getter ? getter.call(obj) : member.get(obj);
32
+ };
33
+ var __privateAdd = (obj, member, value) => {
34
+ if (member.has(obj))
35
+ throw TypeError("Cannot add the same private member more than once");
36
+ member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
37
+ };
38
+ var __privateSet = (obj, member, value, setter) => {
39
+ __accessCheck(obj, member, "write to private field");
40
+ setter ? setter.call(obj, value) : member.set(obj, value);
41
+ return value;
42
+ };
43
+ var __privateMethod = (obj, member, method) => {
44
+ __accessCheck(obj, member, "access private method");
45
+ return method;
46
+ };
47
+
48
+ // src/index.ts
49
+ var src_exports = {};
50
+ __export(src_exports, {
51
+ AggregateTiming: () => AggregateTiming,
52
+ CachingHost: () => CachingHost,
53
+ SimpleHost: () => SimpleHost,
54
+ Table: () => Table,
55
+ Timing: () => Timing,
56
+ findWorkspaceDir: () => findWorkspaceDir,
57
+ getPackageNameToDir: () => getPackageNameToDir,
58
+ getWorkspacePackageDirs: () => getWorkspacePackageDirs,
59
+ matchesAnyGlob: () => matchesAnyGlob,
60
+ mutateJson: () => mutateJson,
61
+ nanosecondsToSanity: () => nanosecondsToSanity
62
+ });
63
+ module.exports = __toCommonJS(src_exports);
64
+
65
+ // src/getWorkspacePackageDirs.ts
66
+ var import_fs = require("fs");
67
+ var glob = __toESM(require("glob"), 1);
68
+ var path = __toESM(require("path"), 1);
69
+ var fs = __toESM(require("fs"), 1);
70
+ var readYamlFile = __toESM(require("read-yaml-file"), 1);
71
+ var import_find_packages = require("find-packages");
72
+ async function findPNPMWorkspacePackages(workspaceRoot) {
73
+ workspaceRoot = fs.realpathSync(workspaceRoot);
74
+ const workspaceManifest = await readYamlFile.default(
75
+ path.join(workspaceRoot, "pnpm-workspace.yaml")
76
+ );
77
+ return (0, import_find_packages.findPackages)(workspaceRoot, {
78
+ ignore: ["**/node_modules/**", "**/bower_components/**"],
79
+ includeRoot: true,
80
+ patterns: workspaceManifest.packages
81
+ });
82
+ }
83
+ async function getWorkspacePackageDirs(host, workspaceDir, resolvePaths = false) {
84
+ const packageJson = host.readJson(path.join(workspaceDir, "package.json"));
85
+ const isPnpmWorkspace = host.exists(path.join(workspaceDir, "pnpm-workspace.yaml"));
86
+ if (isPnpmWorkspace) {
87
+ const workspacePackages = await findPNPMWorkspacePackages(workspaceDir);
88
+ if (workspacePackages.length === 0) {
89
+ throw new Error("Invalid workspaceDir: " + workspaceDir);
90
+ }
91
+ return workspacePackages.map((project) => project.dir).filter((d) => d !== workspaceDir);
92
+ }
93
+ if (!packageJson.workspaces) {
94
+ throw new Error("Unsupported! Monorepo is not backed by either pnpm nor yarn workspaces.");
95
+ }
96
+ const ret = [];
97
+ const packageGlobs = Array.isArray(packageJson.workspaces) ? packageJson.workspaces : packageJson.workspaces.packages || [];
98
+ for (const pattern of packageGlobs) {
99
+ for (const packagePath of glob.sync(pattern, { cwd: workspaceDir })) {
100
+ const packageJsonPath = path.join(workspaceDir, packagePath, "package.json");
101
+ if ((0, import_fs.existsSync)(packageJsonPath)) {
102
+ if (resolvePaths === true) {
103
+ ret.push(path.resolve(path.join(workspaceDir, packagePath)));
104
+ } else {
105
+ ret.push(packagePath);
106
+ }
107
+ }
108
+ }
109
+ }
110
+ return ret;
111
+ }
112
+
113
+ // src/mutateJson.ts
114
+ function mutateJson(path4, host, mutator) {
115
+ let file = host.readJson(path4);
116
+ file = mutator(file);
117
+ host.writeJson(path4, file);
118
+ }
119
+
120
+ // src/findWorkspaceDir.ts
121
+ var path2 = __toESM(require("path"), 1);
122
+ var fs2 = __toESM(require("fs"), 1);
123
+ var import_find_up = require("find-up");
124
+ async function findPnpmWorkspaceDir(cwd) {
125
+ const workspaceManifestLocation = await (0, import_find_up.findUp)("pnpm-workspace.yaml", {
126
+ cwd: await fs2.promises.realpath(cwd)
127
+ });
128
+ return workspaceManifestLocation && path2.dirname(workspaceManifestLocation);
129
+ }
130
+ async function findWorkspaceDir(host, dir) {
131
+ const maybePnpmWorkspaceDir = await findPnpmWorkspaceDir(dir);
132
+ if (maybePnpmWorkspaceDir != null) {
133
+ return maybePnpmWorkspaceDir;
134
+ }
135
+ const packagePath = path2.join(dir, "package.json");
136
+ if (host.exists(packagePath)) {
137
+ const packageJson = host.readJson(packagePath);
138
+ if (packageJson.workspaces !== void 0) {
139
+ return dir;
140
+ }
141
+ }
142
+ const nextDir = path2.normalize(path2.join(dir, ".."));
143
+ if (nextDir === dir) {
144
+ return void 0;
145
+ }
146
+ return findWorkspaceDir(host, nextDir);
147
+ }
148
+
149
+ // src/getPackageNameToDir.ts
150
+ var import_path = require("path");
151
+ async function getPackageNameToDir(host, workspaceDir, resolvePaths = false) {
152
+ const ret = /* @__PURE__ */ new Map();
153
+ const workspacePackages = await getWorkspacePackageDirs(host, workspaceDir, resolvePaths);
154
+ for (const packageDir of workspacePackages) {
155
+ const packagePath = (0, import_path.join)(packageDir, "package.json");
156
+ const { name } = host.readJson(packagePath);
157
+ if (name === void 0) {
158
+ throw new Error(`Package needs a name: ${packagePath}`);
159
+ }
160
+ ret.set(name, packageDir);
161
+ }
162
+ return ret;
163
+ }
164
+
165
+ // src/SimpleHost.ts
166
+ var realFs = __toESM(require("fs"), 1);
167
+ var SimpleHost = class {
168
+ constructor(fs3 = realFs) {
169
+ this.fs = fs3;
170
+ }
171
+ mkdir(directoryPath, opts) {
172
+ this.fs.mkdirSync(directoryPath, { recursive: opts?.recursive ?? false });
173
+ }
174
+ rmdir(directoryPath) {
175
+ this.fs.rmdirSync(directoryPath);
176
+ }
177
+ exists(path4) {
178
+ return this.fs.existsSync(path4);
179
+ }
180
+ writeFile(path4, body, opts) {
181
+ if (opts) {
182
+ this.fs.writeFileSync(path4, body, { encoding: opts.encoding });
183
+ } else {
184
+ this.fs.writeFileSync(path4, body);
185
+ }
186
+ }
187
+ readFile(path4, opts) {
188
+ if (opts?.asJson) {
189
+ return JSON.parse(this.fs.readFileSync(path4, "utf-8"));
190
+ }
191
+ return this.fs.readFileSync(path4, opts?.encoding);
192
+ }
193
+ deleteFile(path4) {
194
+ this.fs.unlinkSync(path4);
195
+ }
196
+ readJson(filename) {
197
+ const contents = this.fs.readFileSync(filename, "utf-8");
198
+ return JSON.parse(contents);
199
+ }
200
+ writeJson(path4, o) {
201
+ return this.fs.writeFileSync(path4, JSON.stringify(o, void 0, 2) + "\n");
202
+ }
203
+ flush() {
204
+ return Promise.resolve();
205
+ }
206
+ };
207
+
208
+ // src/CachingHost.ts
209
+ var realFs2 = __toESM(require("fs"), 1);
210
+ var path3 = __toESM(require("path"), 1);
211
+ function assertNoTombstone(node) {
212
+ if (node.tombstone) {
213
+ throw new Error(`Unexpected tombstone ${JSON.stringify(node)}`);
214
+ }
215
+ }
216
+ function assertNotType(node, type) {
217
+ if (node.type === type) {
218
+ throw new Error(`Unexpected node type ${JSON.stringify(node)}`);
219
+ }
220
+ }
221
+ function assertType(node, type) {
222
+ if (node.type !== type) {
223
+ throw new Error(`Unexpected node type ${JSON.stringify(node)}`);
224
+ }
225
+ }
226
+ function assertExists(node) {
227
+ if (!node) {
228
+ throw new Error(`Expected node to exist`);
229
+ }
230
+ }
231
+ function assertHasParent(node) {
232
+ if (!node.parent) {
233
+ throw new Error("Expected node to have a parent directory");
234
+ }
235
+ }
236
+ var _trees, _replaceNode, replaceNode_fn, _unstubDirectory, unstubDirectory_fn, _stubify, stubify_fn, _getNearestAncestorNode, getNearestAncestorNode_fn, _getNode, getNode_fn, _getNodeResolvingSymlinks, getNodeResolvingSymlinks_fn, _flushFileNode, flushFileNode_fn, _flushSymlinkNode, flushSymlinkNode_fn, _flushDirNode, flushDirNode_fn;
237
+ var CachingHost = class {
238
+ constructor(fs3 = realFs2) {
239
+ this.fs = fs3;
240
+ __privateAdd(this, _replaceNode);
241
+ __privateAdd(this, _unstubDirectory);
242
+ __privateAdd(this, _stubify);
243
+ __privateAdd(this, _getNearestAncestorNode);
244
+ __privateAdd(this, _getNode);
245
+ __privateAdd(this, _getNodeResolvingSymlinks);
246
+ __privateAdd(this, _flushFileNode);
247
+ __privateAdd(this, _flushSymlinkNode);
248
+ __privateAdd(this, _flushDirNode);
249
+ __privateAdd(this, _trees, /* @__PURE__ */ new Map());
250
+ }
251
+ mkdir(filePath, opts = { recursive: false }) {
252
+ const canonicalPath = path3.resolve(filePath);
253
+ const { node, pathWithSymlinks } = __privateMethod(this, _getNearestAncestorNode, getNearestAncestorNode_fn).call(this, canonicalPath);
254
+ if (filePath === pathWithSymlinks) {
255
+ assertType(node, "dir");
256
+ assertHasParent(node);
257
+ if (!node.tombstone)
258
+ return;
259
+ } else if (path3.dirname(filePath) === pathWithSymlinks) {
260
+ assertType(node, "dir");
261
+ assertNoTombstone(node);
262
+ node.dir.set(path3.basename(filePath), {
263
+ type: "dir",
264
+ fullPath: filePath,
265
+ parent: node,
266
+ dir: /* @__PURE__ */ new Map(),
267
+ needsFlush: true
268
+ });
269
+ return;
270
+ }
271
+ if (!opts.recursive && path3.dirname(canonicalPath) !== pathWithSymlinks) {
272
+ throw new Error("no such file or directory");
273
+ }
274
+ const rootPath = pathWithSymlinks;
275
+ let maybePath = canonicalPath;
276
+ const toMake = [];
277
+ while (maybePath !== rootPath) {
278
+ toMake.unshift(path3.resolve(node.fullPath, path3.relative(rootPath, maybePath)));
279
+ maybePath = path3.dirname(maybePath);
280
+ }
281
+ for (const dirToMake of toMake) {
282
+ this.mkdir(dirToMake);
283
+ }
284
+ }
285
+ rmdir(directoryPath) {
286
+ const node = __privateMethod(this, _getNode, getNode_fn).call(this, directoryPath);
287
+ if (!node || node.tombstone) {
288
+ return;
289
+ }
290
+ assertType(node, "dir");
291
+ if (node.stub) {
292
+ __privateMethod(this, _unstubDirectory, unstubDirectory_fn).call(this, node);
293
+ }
294
+ if (node.dir.size === 0) {
295
+ __privateMethod(this, _replaceNode, replaceNode_fn).call(this, node, {
296
+ type: "dir",
297
+ tombstone: true,
298
+ needsFlush: true
299
+ });
300
+ } else {
301
+ throw new Error("directory not empty");
302
+ }
303
+ }
304
+ exists(filePath) {
305
+ const node = __privateMethod(this, _getNode, getNode_fn).call(this, filePath);
306
+ return !!node && !node.tombstone;
307
+ }
308
+ readFile(filePath, opts) {
309
+ let node = __privateMethod(this, _getNodeResolvingSymlinks, getNodeResolvingSymlinks_fn).call(this, filePath);
310
+ if (!node) {
311
+ return void 0;
312
+ }
313
+ assertNotType(node, "dir");
314
+ assertNoTombstone(node);
315
+ if (node.stub) {
316
+ node = __privateMethod(this, _replaceNode, replaceNode_fn).call(this, node, {
317
+ type: "file",
318
+ file: this.fs.readFileSync(filePath),
319
+ needsFlush: false
320
+ });
321
+ }
322
+ if (!opts) {
323
+ return Buffer.from(node.file);
324
+ } else if (opts.asJson) {
325
+ return JSON.parse(node.file.toString("utf-8"));
326
+ } else {
327
+ return node.file.toString(opts.encoding);
328
+ }
329
+ }
330
+ writeFile(filePath, body, opts) {
331
+ const fileContentsAsBuffer = typeof body === "string" ? Buffer.from(body, opts?.encoding) : Buffer.from(body);
332
+ const canonicalPath = path3.resolve(filePath);
333
+ const existingNode = __privateMethod(this, _getNodeResolvingSymlinks, getNodeResolvingSymlinks_fn).call(this, canonicalPath);
334
+ if (existingNode) {
335
+ if (existingNode.type === "dir") {
336
+ throw new Error("cant write file to a dir");
337
+ }
338
+ __privateMethod(this, _replaceNode, replaceNode_fn).call(this, existingNode, {
339
+ file: fileContentsAsBuffer,
340
+ type: "file",
341
+ needsFlush: true
342
+ });
343
+ return;
344
+ }
345
+ const maybeDirNode = __privateMethod(this, _getNodeResolvingSymlinks, getNodeResolvingSymlinks_fn).call(this, path3.dirname(canonicalPath));
346
+ assertExists(maybeDirNode);
347
+ assertType(maybeDirNode, "dir");
348
+ assertNoTombstone(maybeDirNode);
349
+ maybeDirNode.dir.set(path3.basename(canonicalPath), {
350
+ type: "file",
351
+ fullPath: canonicalPath,
352
+ parent: maybeDirNode,
353
+ file: fileContentsAsBuffer,
354
+ needsFlush: true
355
+ });
356
+ }
357
+ deleteFile(filePath) {
358
+ const canonicalPath = path3.resolve(filePath);
359
+ const node = __privateMethod(this, _getNode, getNode_fn).call(this, canonicalPath);
360
+ if (!node || node.type === "file" && node.tombstone === true)
361
+ return;
362
+ assertNotType(node, "dir");
363
+ __privateMethod(this, _replaceNode, replaceNode_fn).call(this, node, {
364
+ type: "file",
365
+ tombstone: true,
366
+ needsFlush: true
367
+ });
368
+ }
369
+ readJson(filePath) {
370
+ return this.readFile(filePath, { asJson: true });
371
+ }
372
+ writeJson(filePath, o) {
373
+ return this.writeFile(filePath, JSON.stringify(o, void 0, 2) + "\n", {
374
+ encoding: "utf-8"
375
+ });
376
+ }
377
+ flush() {
378
+ const promises2 = [];
379
+ for (const rootNode of __privateGet(this, _trees).values()) {
380
+ promises2.push(__privateMethod(this, _flushDirNode, flushDirNode_fn).call(this, rootNode));
381
+ }
382
+ return Promise.all(promises2);
383
+ }
384
+ };
385
+ _trees = new WeakMap();
386
+ _replaceNode = new WeakSet();
387
+ replaceNode_fn = function(node, partialNewNode) {
388
+ if (!node.parent)
389
+ throw new Error("Cannot replace root node");
390
+ const newNode = {
391
+ ...partialNewNode,
392
+ fullPath: node.fullPath,
393
+ parent: node.parent,
394
+ dir: node.dir
395
+ };
396
+ node.parent.dir.set(path3.basename(node.fullPath), newNode);
397
+ return newNode;
398
+ };
399
+ _unstubDirectory = new WeakSet();
400
+ unstubDirectory_fn = function(node) {
401
+ for (const child of this.fs.readdirSync(node.fullPath)) {
402
+ __privateMethod(this, _getNode, getNode_fn).call(this, path3.join(node.fullPath, child));
403
+ }
404
+ node.stub = false;
405
+ };
406
+ _stubify = new WeakSet();
407
+ stubify_fn = function(filePath, parent) {
408
+ const canonicalPath = path3.resolve(filePath);
409
+ if (!parent && canonicalPath !== path3.parse(canonicalPath).root) {
410
+ throw new Error(`parent can only be null if path is root. Instead got: ${canonicalPath}`);
411
+ }
412
+ const stat = this.fs.lstatSync(canonicalPath);
413
+ let node;
414
+ if (stat.isDirectory()) {
415
+ node = {
416
+ fullPath: canonicalPath,
417
+ type: "dir",
418
+ stub: true,
419
+ dir: /* @__PURE__ */ new Map(),
420
+ parent,
421
+ needsFlush: false
422
+ };
423
+ } else if (stat.isSymbolicLink()) {
424
+ node = {
425
+ fullPath: canonicalPath,
426
+ type: "symlink",
427
+ symlink: this.fs.readlinkSync(canonicalPath),
428
+ parent,
429
+ needsFlush: false
430
+ };
431
+ } else if (stat.isFile()) {
432
+ node = {
433
+ fullPath: canonicalPath,
434
+ type: "file",
435
+ stub: true,
436
+ parent,
437
+ needsFlush: false
438
+ };
439
+ } else {
440
+ throw new Error(`what is not a file nor symlink nor directory? nothing we care about: ${canonicalPath}`);
441
+ }
442
+ if (!parent && node.type === "dir") {
443
+ __privateGet(this, _trees).set(canonicalPath, node);
444
+ return node;
445
+ } else if (parent) {
446
+ parent.dir.set(path3.basename(canonicalPath), node);
447
+ } else {
448
+ throw new Error(`root can only be a dir, got ${JSON.stringify(node)} for path: ${canonicalPath}`);
449
+ }
450
+ return node;
451
+ };
452
+ _getNearestAncestorNode = new WeakSet();
453
+ getNearestAncestorNode_fn = function(filePath) {
454
+ const canonicalPath = path3.resolve(filePath);
455
+ const { root } = path3.parse(canonicalPath);
456
+ const parts = [];
457
+ let maybePath = canonicalPath;
458
+ while (maybePath !== root) {
459
+ parts.unshift(path3.basename(maybePath));
460
+ maybePath = path3.dirname(maybePath);
461
+ }
462
+ let curPath = root;
463
+ let curNode = __privateGet(this, _trees).get(root) ?? __privateMethod(this, _stubify, stubify_fn).call(this, curPath, void 0);
464
+ try {
465
+ for (const part of parts) {
466
+ assertNoTombstone(curNode);
467
+ assertNotType(curNode, "file");
468
+ if (curNode.type === "symlink") {
469
+ const linkedNode = __privateMethod(this, _getNodeResolvingSymlinks, getNodeResolvingSymlinks_fn).call(this, path3.resolve(path3.dirname(curPath), curNode.symlink));
470
+ assertExists(linkedNode);
471
+ assertNoTombstone(linkedNode);
472
+ assertType(linkedNode, "dir");
473
+ curNode = linkedNode;
474
+ }
475
+ assertType(curNode, "dir");
476
+ curNode = curNode.dir.get(part) ?? __privateMethod(this, _stubify, stubify_fn).call(this, path3.join(curNode.fullPath, part), curNode);
477
+ curPath = path3.join(curPath, part);
478
+ }
479
+ } catch (e) {
480
+ }
481
+ return { pathWithSymlinks: curPath, node: curNode };
482
+ };
483
+ _getNode = new WeakSet();
484
+ getNode_fn = function(filePath) {
485
+ const canonicalPath = path3.resolve(filePath);
486
+ const { pathWithSymlinks, node } = __privateMethod(this, _getNearestAncestorNode, getNearestAncestorNode_fn).call(this, canonicalPath);
487
+ if (pathWithSymlinks === canonicalPath) {
488
+ return node;
489
+ }
490
+ return void 0;
491
+ };
492
+ _getNodeResolvingSymlinks = new WeakSet();
493
+ getNodeResolvingSymlinks_fn = function(filePath, follows = 100) {
494
+ const node = __privateMethod(this, _getNode, getNode_fn).call(this, filePath);
495
+ if (!node || node.type !== "symlink")
496
+ return node;
497
+ if (follows === 0)
498
+ throw new Error("Exhausted symlink follows");
499
+ return __privateMethod(this, _getNodeResolvingSymlinks, getNodeResolvingSymlinks_fn).call(this, node.symlink, follows--);
500
+ };
501
+ _flushFileNode = new WeakSet();
502
+ flushFileNode_fn = async function(node) {
503
+ if (node.tombstone) {
504
+ try {
505
+ await this.fs.promises.access(node.fullPath);
506
+ return this.fs.promises.unlink(node.fullPath);
507
+ } catch (e) {
508
+ return;
509
+ }
510
+ } else if (node.stub === true || node.needsFlush === false) {
511
+ return;
512
+ } else {
513
+ return this.fs.promises.writeFile(node.fullPath, node.file);
514
+ }
515
+ };
516
+ _flushSymlinkNode = new WeakSet();
517
+ flushSymlinkNode_fn = async function(node) {
518
+ if (!node.needsFlush)
519
+ return;
520
+ try {
521
+ const linkValue = await this.fs.promises.readlink(node.fullPath);
522
+ if (linkValue === node.symlink) {
523
+ return;
524
+ }
525
+ } catch (e) {
526
+ }
527
+ return this.fs.promises.symlink(node.symlink, node.fullPath);
528
+ };
529
+ _flushDirNode = new WeakSet();
530
+ flushDirNode_fn = async function(node) {
531
+ if (!node.tombstone && node.needsFlush) {
532
+ try {
533
+ await this.fs.promises.access(node.fullPath);
534
+ } catch (e) {
535
+ await this.fs.promises.mkdir(node.fullPath);
536
+ }
537
+ }
538
+ const promises2 = [];
539
+ for (const child of node.dir.values()) {
540
+ if (node.tombstone && !child.tombstone) {
541
+ throw new Error("Unexpected failure during sanity check. A non-deleted child is on a deleted dir");
542
+ }
543
+ if (child.type === "dir") {
544
+ promises2.push(__privateMethod(this, _flushDirNode, flushDirNode_fn).call(this, child));
545
+ } else if (child.type === "file") {
546
+ promises2.push(__privateMethod(this, _flushFileNode, flushFileNode_fn).call(this, child));
547
+ } else if (child.type === "symlink") {
548
+ promises2.push(__privateMethod(this, _flushSymlinkNode, flushSymlinkNode_fn).call(this, child));
549
+ } else {
550
+ throw new Error("should never happen");
551
+ }
552
+ }
553
+ await Promise.all(promises2);
554
+ if (node.tombstone) {
555
+ return this.fs.promises.rmdir(node.fullPath);
556
+ }
557
+ return;
558
+ };
559
+
560
+ // src/matchesAnyGlob.ts
561
+ var import_micromatch = __toESM(require("micromatch"), 1);
562
+
563
+ // src/nanosecondsToSanity.ts
564
+ function nanosecondsToSanity(n, precision = 9) {
565
+ return n / BigInt(1e9) + "." + ("" + n % BigInt(1e9)).padStart(9, "0").substring(0, precision) + "s";
566
+ }
567
+
568
+ // src/Table.ts
569
+ var _rows, _config, _columnWidths, _footer, _footerRowConfig, _totalWidth, _sumColumn, sumColumn_fn, _updateFooterRow, updateFooterRow_fn, _calculateColumnWidths, calculateColumnWidths_fn, _printSeparator, printSeparator_fn, _printHeaderRow, printHeaderRow_fn, _printFooterRow, printFooterRow_fn, _getCellValueAsString, getCellValueAsString_fn, _getCellValueAligned, getCellValueAligned_fn;
570
+ var Table = class {
571
+ constructor(config) {
572
+ __privateAdd(this, _sumColumn);
573
+ __privateAdd(this, _updateFooterRow);
574
+ __privateAdd(this, _calculateColumnWidths);
575
+ __privateAdd(this, _printSeparator);
576
+ __privateAdd(this, _printHeaderRow);
577
+ __privateAdd(this, _printFooterRow);
578
+ __privateAdd(this, _getCellValueAsString);
579
+ __privateAdd(this, _getCellValueAligned);
580
+ __privateAdd(this, _rows, []);
581
+ __privateAdd(this, _config, void 0);
582
+ __privateAdd(this, _columnWidths, []);
583
+ __privateAdd(this, _footer, []);
584
+ __privateAdd(this, _footerRowConfig, void 0);
585
+ __privateAdd(this, _totalWidth, 0);
586
+ __privateSet(this, _config, {
587
+ padding: 2,
588
+ ...config
589
+ });
590
+ __privateGet(this, _columnWidths).fill(0, 0, config.columns.length);
591
+ if (config.showFooter) {
592
+ __privateSet(this, _footerRowConfig, []);
593
+ for (const columnConfig of config.columns) {
594
+ if (columnConfig.footer === void 0) {
595
+ throw new Error("Must specify footer fields when showFooter is true");
596
+ } else if (typeof columnConfig.footer === "string") {
597
+ __privateGet(this, _footerRowConfig).push({
598
+ type: "string",
599
+ alignment: "left",
600
+ aggregate: "static",
601
+ value: columnConfig.footer
602
+ });
603
+ } else if ("value" in columnConfig.footer) {
604
+ __privateGet(this, _footerRowConfig).push({
605
+ type: "string",
606
+ alignment: "left",
607
+ ...columnConfig.footer
608
+ });
609
+ } else if ("aggregate" in columnConfig.footer) {
610
+ if (columnConfig.type !== "bigint")
611
+ throw new Error("expecting bigint for aggregate");
612
+ __privateGet(this, _footerRowConfig).push({
613
+ type: columnConfig.type,
614
+ renderAs: columnConfig.renderAs,
615
+ precision: columnConfig.precision,
616
+ alignment: "right",
617
+ ...columnConfig.footer
618
+ });
619
+ }
620
+ }
621
+ }
622
+ }
623
+ addRow(...data) {
624
+ __privateGet(this, _rows).push(data);
625
+ }
626
+ print() {
627
+ if (__privateGet(this, _config).sortColumn !== void 0) {
628
+ }
629
+ __privateMethod(this, _updateFooterRow, updateFooterRow_fn).call(this);
630
+ __privateMethod(this, _calculateColumnWidths, calculateColumnWidths_fn).call(this);
631
+ console.log();
632
+ console.log(`${__privateGet(this, _config).title}`);
633
+ console.log("".padStart(__privateGet(this, _totalWidth), "="));
634
+ const paddingString = "".padStart(__privateGet(this, _config).padding, " ");
635
+ if (__privateGet(this, _config).showHeader) {
636
+ __privateMethod(this, _printHeaderRow, printHeaderRow_fn).call(this);
637
+ }
638
+ for (let r = 0; r < __privateGet(this, _rows).length; r++) {
639
+ let rowText = "";
640
+ for (let c = 0; c < __privateGet(this, _config).columns.length; c++) {
641
+ rowText += this.getEntryAsStringAligned(c, r) + paddingString;
642
+ }
643
+ rowText.trim();
644
+ console.log(rowText);
645
+ }
646
+ if (__privateGet(this, _config).showFooter)
647
+ __privateMethod(this, _printFooterRow, printFooterRow_fn).call(this);
648
+ console.log();
649
+ }
650
+ getEntryAsString(colNum, rowNum) {
651
+ const config = __privateGet(this, _config).columns[colNum];
652
+ if (config.type === "bigint" && config.renderAs === "nanoseconds") {
653
+ return nanosecondsToSanity(__privateGet(this, _rows)[rowNum][colNum], config.precision ?? 9);
654
+ } else {
655
+ return "" + __privateGet(this, _rows)[rowNum][colNum];
656
+ }
657
+ }
658
+ getEntryAsStringAligned(colNum, rowNum) {
659
+ const config = __privateGet(this, _config).columns[colNum];
660
+ let result;
661
+ if (config.type === "bigint" && config.renderAs === "nanoseconds") {
662
+ result = nanosecondsToSanity(__privateGet(this, _rows)[rowNum][colNum], config.precision ?? 9);
663
+ } else {
664
+ result = "" + __privateGet(this, _rows)[rowNum][colNum];
665
+ }
666
+ if (config.alignment === "left") {
667
+ return result.padEnd(__privateGet(this, _columnWidths)[colNum]);
668
+ } else {
669
+ return result.padStart(__privateGet(this, _columnWidths)[colNum]);
670
+ }
671
+ }
672
+ getColumnWidth(colNum, config) {
673
+ let maxWidth = Math.max(
674
+ (config.header ?? "").length,
675
+ __privateGet(this, _footer) && __privateGet(this, _footerRowConfig) ? __privateMethod(this, _getCellValueAsString, getCellValueAsString_fn).call(this, __privateGet(this, _footer)[colNum], __privateGet(this, _footerRowConfig)[colNum]).length : 0
676
+ );
677
+ for (let r = 0; r < __privateGet(this, _rows).length; r++) {
678
+ maxWidth = Math.max(maxWidth, this.getEntryAsString(colNum, r).length);
679
+ }
680
+ return maxWidth;
681
+ }
682
+ };
683
+ _rows = new WeakMap();
684
+ _config = new WeakMap();
685
+ _columnWidths = new WeakMap();
686
+ _footer = new WeakMap();
687
+ _footerRowConfig = new WeakMap();
688
+ _totalWidth = new WeakMap();
689
+ _sumColumn = new WeakSet();
690
+ sumColumn_fn = function(c) {
691
+ let total = BigInt(0);
692
+ for (const row of __privateGet(this, _rows)) {
693
+ total += row[c];
694
+ }
695
+ return total;
696
+ };
697
+ _updateFooterRow = new WeakSet();
698
+ updateFooterRow_fn = function() {
699
+ const footerRowConfig = __privateGet(this, _footerRowConfig);
700
+ if (footerRowConfig) {
701
+ for (let c = 0; c < footerRowConfig.length; c++) {
702
+ const footerColConfig = footerRowConfig[c];
703
+ switch (footerColConfig.aggregate) {
704
+ case "sum":
705
+ __privateGet(this, _footer)[c] = __privateMethod(this, _sumColumn, sumColumn_fn).call(this, c);
706
+ break;
707
+ case "average":
708
+ __privateGet(this, _footer)[c] = __privateMethod(this, _sumColumn, sumColumn_fn).call(this, c) / BigInt(__privateGet(this, _rows).length);
709
+ break;
710
+ case "static":
711
+ __privateGet(this, _footer)[c] = footerColConfig.value;
712
+ break;
713
+ }
714
+ }
715
+ }
716
+ };
717
+ _calculateColumnWidths = new WeakSet();
718
+ calculateColumnWidths_fn = function() {
719
+ __privateGet(this, _columnWidths).fill(0, 0, __privateGet(this, _config).columns.length);
720
+ for (let c = 0; c < __privateGet(this, _config).columns.length; c++) {
721
+ const colConfig = __privateGet(this, _config).columns[c];
722
+ __privateGet(this, _columnWidths)[c] = Math.max(
723
+ (__privateGet(this, _config).columns[c].header ?? "").length,
724
+ ...__privateGet(this, _rows).map((a) => __privateMethod(this, _getCellValueAsString, getCellValueAsString_fn).call(this, a[c], colConfig).length),
725
+ __privateGet(this, _footer) && __privateGet(this, _footerRowConfig) ? __privateMethod(this, _getCellValueAsString, getCellValueAsString_fn).call(this, __privateGet(this, _footer)?.[c] ?? "", __privateGet(this, _footerRowConfig)[c]).length : 0
726
+ );
727
+ }
728
+ __privateSet(this, _totalWidth, 0);
729
+ for (const colWidth of __privateGet(this, _columnWidths)) {
730
+ __privateSet(this, _totalWidth, __privateGet(this, _totalWidth) + colWidth);
731
+ }
732
+ __privateSet(this, _totalWidth, __privateGet(this, _totalWidth) + (__privateGet(this, _columnWidths).length - 1) * __privateGet(this, _config).padding);
733
+ };
734
+ _printSeparator = new WeakSet();
735
+ printSeparator_fn = function(fillString) {
736
+ const paddingString = "".padStart(__privateGet(this, _config).padding, " ");
737
+ let hr2 = "";
738
+ for (let c = 0; c < __privateGet(this, _columnWidths).length; c++) {
739
+ hr2 += "".padStart(__privateGet(this, _columnWidths)[c], fillString) + paddingString;
740
+ }
741
+ hr2 = hr2.trimRight();
742
+ console.log(hr2);
743
+ };
744
+ _printHeaderRow = new WeakSet();
745
+ printHeaderRow_fn = function() {
746
+ if (__privateGet(this, _config).showHeader) {
747
+ const colConfigs = __privateGet(this, _config).columns;
748
+ const paddingString = "".padStart(__privateGet(this, _config).padding, " ");
749
+ let hr = "";
750
+ for (let c = 0; c < colConfigs.length; c++) {
751
+ const heading = colConfigs[c].header ?? "";
752
+ hr += heading.padEnd(__privateGet(this, _columnWidths)[c], " ") + paddingString;
753
+ }
754
+ hr = hr.trimRight();
755
+ console.log(hr);
756
+ __privateMethod(this, _printSeparator, printSeparator_fn).call(this, "-");
757
+ }
758
+ };
759
+ _printFooterRow = new WeakSet();
760
+ printFooterRow_fn = function() {
761
+ const footerRow = __privateGet(this, _footer);
762
+ if (footerRow) {
763
+ __privateMethod(this, _printSeparator, printSeparator_fn).call(this, "=");
764
+ const paddingString = "".padStart(__privateGet(this, _config).padding, " ");
765
+ let hr = "";
766
+ for (let c = 0; c < footerRow.length; c++) {
767
+ hr += __privateMethod(this, _getCellValueAligned, getCellValueAligned_fn).call(this, footerRow[c], __privateGet(this, _footerRowConfig)[c], c) + paddingString;
768
+ }
769
+ hr = hr.trimRight();
770
+ console.log(hr);
771
+ }
772
+ };
773
+ _getCellValueAsString = new WeakSet();
774
+ getCellValueAsString_fn = function(value, config) {
775
+ if (config.type === "bigint" && config.renderAs === "nanoseconds") {
776
+ return nanosecondsToSanity(value, config.precision ?? 9);
777
+ } else {
778
+ return "" + value;
779
+ }
780
+ };
781
+ _getCellValueAligned = new WeakSet();
782
+ getCellValueAligned_fn = function(value, config, column) {
783
+ let result;
784
+ if (config.type === "bigint" && config.renderAs === "nanoseconds") {
785
+ result = nanosecondsToSanity(value, config.precision ?? 9);
786
+ } else {
787
+ result = "" + value;
788
+ }
789
+ if (config.alignment === "left") {
790
+ return result.padEnd(__privateGet(this, _columnWidths)[column]);
791
+ } else {
792
+ return result.padStart(__privateGet(this, _columnWidths)[column]);
793
+ }
794
+ };
795
+
796
+ // src/matchesAnyGlob.ts
797
+ var cache = /* @__PURE__ */ new Map();
798
+ var singleMatcherCache = /* @__PURE__ */ new Map();
799
+ var compiledGlobCache = /* @__PURE__ */ new Map();
800
+ var haystackMiss = 0;
801
+ var haystackHit = 0;
802
+ var matchTime = BigInt(0);
803
+ var singleMatcherHits = 0;
804
+ var singleMatcherMisses = 0;
805
+ var singleMatcherSaves = 0;
806
+ var matchesAnyGlob = function matchesAnyGlobFunc(needle, haystack) {
807
+ matchTime -= process.hrtime.bigint();
808
+ let cacheForHaystack = cache.get(haystack);
809
+ if (cacheForHaystack === void 0) {
810
+ cacheForHaystack = /* @__PURE__ */ new Map();
811
+ cache.set(haystack, cacheForHaystack);
812
+ }
813
+ let result = cacheForHaystack.get(needle);
814
+ if (result === void 0) {
815
+ haystackMiss++;
816
+ result = false;
817
+ for (const pattern of haystack) {
818
+ let patternCache = singleMatcherCache.get(pattern);
819
+ if (patternCache === void 0) {
820
+ patternCache = /* @__PURE__ */ new Map();
821
+ singleMatcherCache.set(pattern, patternCache);
822
+ }
823
+ result = patternCache.get(needle);
824
+ if (result === void 0) {
825
+ let regexp = compiledGlobCache.get(pattern);
826
+ if (regexp === void 0) {
827
+ regexp = import_micromatch.default.makeRe(pattern);
828
+ compiledGlobCache.set(pattern, regexp);
829
+ }
830
+ singleMatcherMisses++;
831
+ result = regexp.test(needle);
832
+ patternCache.set(needle, result);
833
+ } else {
834
+ singleMatcherHits++;
835
+ singleMatcherSaves++;
836
+ }
837
+ if (result)
838
+ break;
839
+ }
840
+ cacheForHaystack.set(needle, result);
841
+ } else {
842
+ singleMatcherSaves += haystack.length;
843
+ haystackHit++;
844
+ }
845
+ matchTime += process.hrtime.bigint();
846
+ return result;
847
+ };
848
+ matchesAnyGlob.printStats = () => {
849
+ const table = new Table({
850
+ title: "matchesAnyGlob stats",
851
+ showHeader: true,
852
+ showFooter: false,
853
+ columns: [
854
+ { header: "Stat", type: "string" },
855
+ { header: "Value", type: "string" }
856
+ ]
857
+ });
858
+ table.addRow("Haystack Miss", "" + haystackMiss);
859
+ table.addRow("Haystack Hit", "" + haystackHit);
860
+ table.addRow("Single Glob Hits", "" + singleMatcherHits);
861
+ table.addRow("Single Glob Misses", "" + singleMatcherMisses);
862
+ table.addRow("Single Glob Saves", "" + singleMatcherSaves);
863
+ table.addRow("Total Time", nanosecondsToSanity(matchTime, 6));
864
+ table.print();
865
+ };
866
+
867
+ // src/AggregateTiming.ts
868
+ var _data, _last;
869
+ var AggregateTiming = class {
870
+ constructor(title) {
871
+ this.title = title;
872
+ __privateAdd(this, _data, /* @__PURE__ */ new Map());
873
+ __privateAdd(this, _last, void 0);
874
+ }
875
+ start(name) {
876
+ const time = process.hrtime.bigint();
877
+ if (__privateGet(this, _last)) {
878
+ __privateGet(this, _last).total += time;
879
+ }
880
+ let data = __privateGet(this, _data).get(name);
881
+ if (data === void 0) {
882
+ data = { count: 1, total: -time };
883
+ __privateGet(this, _data).set(name, data);
884
+ } else {
885
+ data.total -= time;
886
+ data.count++;
887
+ }
888
+ __privateSet(this, _last, data);
889
+ }
890
+ stop() {
891
+ const time = process.hrtime.bigint();
892
+ if (__privateGet(this, _last)) {
893
+ __privateGet(this, _last).total += time;
894
+ __privateSet(this, _last, void 0);
895
+ }
896
+ }
897
+ printResults() {
898
+ const table = new Table({
899
+ sortColumn: -1,
900
+ showFooter: true,
901
+ showHeader: true,
902
+ title: this.title,
903
+ columns: [
904
+ {
905
+ header: "Duration",
906
+ type: "bigint",
907
+ renderAs: "nanoseconds",
908
+ footer: { aggregate: "sum" }
909
+ },
910
+ { header: "Task", type: "string", alignment: "left", footer: "TOTAL" },
911
+ { header: "Count", type: "bigint", footer: { aggregate: "sum" } },
912
+ { header: "Avg", type: "bigint", footer: { aggregate: "average" } }
913
+ ]
914
+ });
915
+ for (const [name, value] of __privateGet(this, _data)) {
916
+ table.addRow(
917
+ value.total,
918
+ name,
919
+ BigInt(value.count),
920
+ value.total / BigInt(value.count)
921
+ );
922
+ }
923
+ table.print();
924
+ }
925
+ };
926
+ _data = new WeakMap();
927
+ _last = new WeakMap();
928
+
929
+ // src/Timing.ts
930
+ var _starts;
931
+ var Timing = class {
932
+ constructor(title) {
933
+ this.title = title;
934
+ __privateAdd(this, _starts, []);
935
+ this.stop();
936
+ }
937
+ start(name) {
938
+ __privateGet(this, _starts).push({ name, start: process.hrtime.bigint() });
939
+ }
940
+ stop() {
941
+ __privateGet(this, _starts).push({ start: process.hrtime.bigint() });
942
+ }
943
+ printResults() {
944
+ const table = new Table({
945
+ sortColumn: -1,
946
+ showFooter: true,
947
+ showHeader: true,
948
+ title: this.title,
949
+ columns: [
950
+ {
951
+ header: "Duration",
952
+ type: "bigint",
953
+ renderAs: "nanoseconds",
954
+ precision: 4,
955
+ footer: { aggregate: "sum" }
956
+ },
957
+ { header: "Task", type: "string", footer: "TOTAL" }
958
+ ]
959
+ });
960
+ this.stop();
961
+ let cur = __privateGet(this, _starts)[0];
962
+ for (const entry of __privateGet(this, _starts)) {
963
+ if (cur.name) {
964
+ const span = entry.start - cur.start;
965
+ table.addRow(span, cur.name);
966
+ }
967
+ cur = entry;
968
+ }
969
+ table.print();
970
+ }
971
+ };
972
+ _starts = new WeakMap();
973
+ // Annotate the CommonJS export names for ESM import in node:
974
+ 0 && (module.exports = {
975
+ AggregateTiming,
976
+ CachingHost,
977
+ SimpleHost,
978
+ Table,
979
+ Timing,
980
+ findWorkspaceDir,
981
+ getPackageNameToDir,
982
+ getWorkspacePackageDirs,
983
+ matchesAnyGlob,
984
+ mutateJson,
985
+ nanosecondsToSanity
986
+ });
987
+ /*!
988
+ * Copyright 2019 Palantir Technologies, Inc.
989
+ *
990
+ * Licensed under the MIT license. See LICENSE file in the project root for details.
991
+ *
992
+ */
993
+ /*!
994
+ * Copyright 2022 Palantir Technologies, Inc.
995
+ *
996
+ * Licensed under the MIT license. See LICENSE file in the project root for details.
997
+ *
998
+ */
999
+ //# sourceMappingURL=index.cjs.map