dependency-cruiser 13.0.0-beta-6 → 13.0.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 (37) hide show
  1. package/README.md +5 -5
  2. package/bin/dependency-cruise.mjs +1 -1
  3. package/package.json +17 -17
  4. package/src/cache/cache.mjs +3 -2
  5. package/src/cache/content-strategy.mjs +27 -21
  6. package/src/cache/find-content-changes.mjs +4 -2
  7. package/src/cache/helpers.mjs +13 -7
  8. package/src/cache/metadata-strategy.mjs +14 -11
  9. package/src/cache/options-compatible.mjs +1 -0
  10. package/src/cli/init-config/config.js.template.js +1 -1
  11. package/src/cli/init-config/environment-helpers.mjs +0 -1
  12. package/src/cli/init-config/write-run-scripts-to-manifest.mjs +0 -1
  13. package/src/cli/listeners/ndjson.mjs +1 -1
  14. package/src/cli/listeners/performance-log/format-helpers.mjs +48 -22
  15. package/src/cli/listeners/performance-log/handlers.mjs +2 -0
  16. package/src/cli/listeners/performance-log/index.mjs +1 -1
  17. package/src/enrich/derive/metrics/get-module-metrics.mjs +0 -1
  18. package/src/enrich/summarize/summarize-options.mjs +1 -1
  19. package/src/extract/parse/to-javascript-ast.mjs +0 -1
  20. package/src/extract/parse/to-swc-ast.mjs +0 -1
  21. package/src/extract/parse/to-typescript-ast.mjs +0 -1
  22. package/src/extract/resolve/external-module-helpers.mjs +0 -1
  23. package/src/extract/resolve/module-classifiers.mjs +0 -1
  24. package/src/extract/transpile/index.mjs +73 -1
  25. package/src/extract/transpile/meta.mjs +51 -85
  26. package/src/extract/transpile/try-import-available.mjs +46 -0
  27. package/src/meta.js +1 -1
  28. package/src/report/error-html/utl.mjs +0 -1
  29. package/src/report/null.mjs +1 -1
  30. package/src/report/plugins.mjs +0 -1
  31. package/src/schema/cruise-result.schema.mjs +1 -1
  32. package/src/utl/bus.mjs +0 -1
  33. package/types/cruise-result.d.ts +11 -46
  34. package/types/dependency-cruiser.d.ts +1 -1
  35. package/types/options.d.ts +72 -1
  36. package/types/reporter-options.d.ts +1 -1
  37. package/types/shared-types.d.ts +1 -0
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # Dependency cruiser ![Dependency cruiser](https://raw.githubusercontent.com/sverweij/dependency-cruiser/master/doc/assets/ZKH-Dependency-recolored-160.png)
1
+ # Dependency cruiser ![Dependency cruiser](https://raw.githubusercontent.com/sverweij/dependency-cruiser/main/doc/assets/ZKH-Dependency-recolored-160.png)
2
2
 
3
3
  _Validate and visualise dependencies. With your rules._ JavaScript. TypeScript. CoffeeScript. ES6, CommonJS, AMD.
4
4
 
5
5
  ## What's this do?
6
6
 
7
- ![Snazzy dot output to whet your appetite](https://raw.githubusercontent.com/sverweij/dependency-cruiser/master/doc/assets/sample-dot-output.png)
7
+ ![Snazzy dot output to whet your appetite](https://raw.githubusercontent.com/sverweij/dependency-cruiser/main/doc/assets/sample-dot-output.png)
8
8
 
9
9
  This runs through the dependencies in any JavaScript, TypeScript, LiveScript or CoffeeScript project and ...
10
10
 
@@ -138,7 +138,7 @@ npx depcruise src
138
138
 
139
139
  This will validate against your rules and shows any violations in an eslint-like format:
140
140
 
141
- ![sample err output](https://raw.githubusercontent.com/sverweij/dependency-cruiser/master/doc/assets/sample-err-output.png)
141
+ ![sample err output](https://raw.githubusercontent.com/sverweij/dependency-cruiser/main/doc/assets/sample-err-output.png)
142
142
 
143
143
  There's more ways to report validations; in a graph (like the one on top of this
144
144
  readme) or in an self-containing `html` file.
@@ -148,7 +148,7 @@ readme) or in an self-containing `html` file.
148
148
  documentation.
149
149
  - dependency-cruiser uses itself to check on itself in its own build process;
150
150
  see the `depcruise` script in the
151
- [package.json](https://github.com/sverweij/dependency-cruiser/blob/master/package.json#L76)
151
+ [package.json](https://github.com/sverweij/dependency-cruiser/blob/main/package.json#L76)
152
152
 
153
153
  ## I want to know more!
154
154
 
@@ -192,7 +192,7 @@ You've come to the right place :-) :
192
192
 
193
193
  ## Build status
194
194
 
195
- [![GitHub Workflow Status](https://github.com/sverweij/dependency-cruiser/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/sverweij/dependency-cruiser/actions/workflows/ci.yml)
195
+ [![GitHub Workflow Status](https://github.com/sverweij/dependency-cruiser/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/sverweij/dependency-cruiser/actions/workflows/ci.yml)
196
196
  [![coverage](https://gitlab.com/sverweij/dependency-cruiser/badges/master/coverage.svg)](https://gitlab.com/sverweij/dependency-cruiser/builds)
197
197
  [![Maintainability](https://api.codeclimate.com/v1/badges/93035ef5fba33901d479/maintainability)](https://codeclimate.com/github/sverweij/dependency-cruiser/maintainability)
198
198
  [![Test Coverage](https://api.codeclimate.com/v1/badges/93035ef5fba33901d479/test_coverage)](https://codeclimate.com/github/sverweij/dependency-cruiser/test_coverage)
@@ -162,7 +162,7 @@ try {
162
162
  .addHelpText(
163
163
  "after",
164
164
  `${EOL}Other options:` +
165
- `${EOL} see https://github.com/sverweij/dependency-cruiser/blob/master/doc/cli.md${EOL}`
165
+ `${EOL} see https://github.com/sverweij/dependency-cruiser/blob/main/doc/cli.md${EOL}`
166
166
  )
167
167
  .version(meta.version)
168
168
  .arguments("[files-or-directories]")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dependency-cruiser",
3
- "version": "13.0.0-beta-6",
3
+ "version": "13.0.0",
4
4
  "description": "Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.",
5
5
  "keywords": [
6
6
  "static analysis",
@@ -96,13 +96,13 @@
96
96
  "depcruise:graph:doc:fmt-types": "cd types && node ../bin/dependency-cruise.mjs . --output-type dot | dot -T svg > overview.svg && cd -",
97
97
  "depcruise:graph:doc:samples": "sh tools/generate-samples.sh",
98
98
  "depcruise:graph:mermaid": "node ./bin/dependency-cruise.mjs bin src --include-only ^src/ --collapse 2 --output-type mermaid",
99
- "depcruise:graph:mermaid:diff": "node ./bin/dependency-cruise.mjs bin src test types tools --config configs/.dependency-cruiser-unlimited.json --output-type mermaid --reaches \"$(watskeburt $SHA)\"",
100
- "depcruise:graph:view": "node ./bin/dependency-cruise.mjs bin src --prefix vscode://file/$(pwd)/ --config configs/.dependency-cruiser-show-metrics-config.mjs --output-type dot --progress cli-feedback --highlight \"$(watskeburt develop)\" | dot -T svg | node ./bin/wrap-stream-in-html.mjs | browser",
101
- "depcruise:graph:view:diff": "node ./bin/dependency-cruise.mjs bin src test --prefix vscode://file/$(pwd)/ --config configs/.dependency-cruiser-unlimited.json --output-type dot --progress cli-feedback --reaches \"$(watskeburt develop)\" | dot -T svg | node ./bin/wrap-stream-in-html.mjs | browser",
99
+ "depcruise:graph:mermaid:diff": "node ./bin/dependency-cruise.mjs bin src test types tools --config configs/.dependency-cruiser-unlimited.mjs --output-type mermaid --reaches \"$(watskeburt $SHA)\"",
100
+ "depcruise:graph:view": "node ./bin/dependency-cruise.mjs bin src --prefix vscode://file/$(pwd)/ --config configs/.dependency-cruiser-show-metrics-config.mjs --output-type dot --progress cli-feedback --highlight \"$(watskeburt main)\" | dot -T svg | node ./bin/wrap-stream-in-html.mjs | browser",
101
+ "depcruise:graph:view:diff": "node ./bin/dependency-cruise.mjs bin src test --prefix vscode://file/$(pwd)/ --config configs/.dependency-cruiser-unlimited.mjs --output-type dot --progress cli-feedback --reaches \"$(watskeburt main)\" | dot -T svg | node ./bin/wrap-stream-in-html.mjs | browser",
102
102
  "depcruise:report": "node ./bin/dependency-cruise.mjs src bin test configs types --output-type err-html --config configs/.dependency-cruiser-show-metrics-config.mjs --output-to dependency-violations.html",
103
103
  "depcruise:report:view": "node ./bin/dependency-cruise.mjs src bin test configs types --output-type err-html --config configs/.dependency-cruiser-show-metrics-config.mjs --output-to - | browser",
104
104
  "depcruise:focus": "node ./bin/dependency-cruise.mjs src bin test configs types tools --progress --no-cache --output-type text --focus",
105
- "depcruise:reaches": "node ./bin/dependency-cruise.mjs src bin test configs types tools --progress --no-cache --config configs/.dependency-cruiser-unlimited.json --output-type text --reaches",
105
+ "depcruise:reaches": "node ./bin/dependency-cruise.mjs src bin test configs types tools --progress --no-cache --config configs/.dependency-cruiser-unlimited.mjs --output-type text --reaches",
106
106
  "format": "prettier --loglevel warn --write \"src/**/*.js\" \"configs/**/*.js\" \"tools/**/*.mjs\" \"bin/*\" \"types/*.d.ts\" \"test/**/*.spec.{cjs,js}\" \"test/**/*.{spec,utl}.mjs\"",
107
107
  "format:check": "prettier --loglevel warn --check \"src/**/*.js\" \"configs/**/*.js\" \"tools/**/*.mjs\" \"bin/*\" \"types/*.d.ts\" \"test/**/*.spec.{cjs,js}\" \"test/**/*.{spec,utl}.mjs\"",
108
108
  "lint": "npm-run-all --parallel --aggregate-output lint:eslint format:check lint:types",
@@ -151,10 +151,10 @@
151
151
  "ajv": "8.12.0",
152
152
  "chalk": "5.2.0",
153
153
  "commander": "10.0.1",
154
- "enhanced-resolve": "5.13.0",
154
+ "enhanced-resolve": "5.14.0",
155
155
  "figures": "5.0.0",
156
156
  "get-stream": "^6.0.1",
157
- "glob": "10.2.2",
157
+ "glob": "10.2.3",
158
158
  "handlebars": "4.7.7",
159
159
  "ignore": "5.2.4",
160
160
  "indent-string": "5.0.0",
@@ -165,7 +165,7 @@
165
165
  "prompts": "2.4.2",
166
166
  "rechoir": "^0.8.0",
167
167
  "safe-regex": "2.1.1",
168
- "semver": "^7.5.0",
168
+ "semver": "^7.5.1",
169
169
  "semver-try-require": "6.2.2",
170
170
  "teamcity-service-messages": "0.1.14",
171
171
  "tsconfig-paths-webpack-plugin": "4.0.1",
@@ -173,21 +173,21 @@
173
173
  "wrap-ansi": "8.1.0"
174
174
  },
175
175
  "devDependencies": {
176
- "@babel/core": "7.21.5",
176
+ "@babel/core": "7.21.8",
177
177
  "@babel/plugin-transform-modules-commonjs": "7.21.5",
178
178
  "@babel/preset-typescript": "7.21.5",
179
- "@swc/core": "1.3.55",
179
+ "@swc/core": "1.3.57",
180
180
  "@types/lodash": "4.14.194",
181
- "@types/node": "18.16.3",
181
+ "@types/node": "20.1.3",
182
182
  "@types/prompts": "2.4.4",
183
- "@typescript-eslint/eslint-plugin": "5.59.1",
184
- "@typescript-eslint/parser": "5.59.1",
185
- "@vue/compiler-sfc": "3.2.47",
183
+ "@typescript-eslint/eslint-plugin": "5.59.5",
184
+ "@typescript-eslint/parser": "5.59.5",
185
+ "@vue/compiler-sfc": "3.3.2",
186
186
  "c8": "7.13.0",
187
187
  "chai": "4.3.7",
188
188
  "chai-json-schema": "1.5.1",
189
189
  "coffeescript": "2.7.0",
190
- "eslint": "8.39.0",
190
+ "eslint": "8.40.0",
191
191
  "eslint-config-moving-meadow": "4.0.2",
192
192
  "eslint-config-prettier": "8.8.0",
193
193
  "eslint-plugin-budapestian": "5.0.1",
@@ -196,7 +196,7 @@
196
196
  "eslint-plugin-mocha": "10.1.0",
197
197
  "eslint-plugin-node": "11.1.0",
198
198
  "eslint-plugin-security": "1.7.1",
199
- "eslint-plugin-unicorn": "^46.0.0",
199
+ "eslint-plugin-unicorn": "^47.0.0",
200
200
  "husky": "8.0.3",
201
201
  "intercept-stdout": "0.1.2",
202
202
  "lint-staged": "13.2.2",
@@ -206,7 +206,7 @@
206
206
  "prettier": "2.8.8",
207
207
  "proxyquire": "2.1.3",
208
208
  "shx": "0.3.4",
209
- "svelte": "3.58.0",
209
+ "svelte": "3.59.1",
210
210
  "symlink-dir": "5.1.1",
211
211
  "typescript": "5.0.4",
212
212
  "upem": "7.3.2",
@@ -1,3 +1,4 @@
1
+ // @ts-check
1
2
  import { readFile, mkdir, writeFile } from "node:fs/promises";
2
3
  import { join } from "node:path";
3
4
  import { scannableExtensions } from "../extract/transpile/meta.mjs";
@@ -24,7 +25,7 @@ export default class Cache {
24
25
  * @param {import("../../types/strict-options.js").IStrictCruiseOptions} pCruiseOptions
25
26
  * @param {import("../../types/dependency-cruiser.js").ICruiseResult} pCachedCruiseResult
26
27
  * @param {import("../../types/dependency-cruiser.js").IRevisionData=} pRevisionData
27
- * @returns {boolean}
28
+ * @returns {Promise<boolean>}
28
29
  */
29
30
  async canServeFromCache(pCruiseOptions, pCachedCruiseResult, pRevisionData) {
30
31
  this.revisionData =
@@ -54,7 +55,7 @@ export default class Cache {
54
55
 
55
56
  /**
56
57
  * @param {string} pCacheFolder
57
- * @returns {import("../../types/dependency-cruiser.js").ICruiseResult}
58
+ * @returns {Promise<import("../../types/dependency-cruiser.js").ICruiseResult>}
58
59
  */
59
60
  async read(pCacheFolder) {
60
61
  try {
@@ -1,3 +1,5 @@
1
+ /* eslint-disable no-inline-comments */
2
+ // @ts-check
1
3
  import { isDeepStrictEqual } from "node:util";
2
4
  import { join } from "node:path/posix";
3
5
  import findContentChanges from "./find-content-changes.mjs";
@@ -47,9 +49,9 @@ export default class ContentStrategy {
47
49
  * @param {Object} pOptions
48
50
  * @param {Set<string>} pOptions.extensions
49
51
  * @param {Set<import("watskeburt").changeTypeType>} pOptions.interestingChangeTypes
50
- * @param {string} pOptions.baseDir
51
- * @param {(pString:string) => Array<import("watskeburt").IChange>} pOptions.diffListFn
52
- * @param {(import("watskeburt").IChange) => import("../..").IRevisionChange} pOptions.checksumFn
52
+ * @param {string=} pOptions.baseDir
53
+ * @param {typeof findContentChanges=} pOptions.diffListFn
54
+ * @param {typeof import('watskeburt').getSHASync=} pOptions.checksumFn
53
55
  * @returns {import("../../types/dependency-cruiser.js").IRevisionData}
54
56
  */
55
57
  getRevisionData(pDirectory, pCachedCruiseResult, pCruiseOptions, pOptions) {
@@ -60,31 +62,35 @@ export default class ContentStrategy {
60
62
  };
61
63
  return {
62
64
  SHA1: "unknown-in-content-cache-strategy",
63
- changes: lOptions
64
- .diffListFn(pDirectory, pCachedCruiseResult, {
65
- baseDir: lOptions.baseDir,
66
- extensions: lOptions.extensions,
67
- includeOnly: pCruiseOptions.includeOnly,
68
- exclude: pCruiseOptions.exclude,
69
- })
70
- .filter(isInterestingChangeType(lOptions.interestingChangeTypes)),
65
+ changes:
66
+ /** @type {import("../../types/dependency-cruiser.js").IRevisionChange[]} */ (
67
+ lOptions.diffListFn(pDirectory, pCachedCruiseResult, {
68
+ baseDir: lOptions.baseDir,
69
+ extensions: lOptions.extensions,
70
+ includeOnly: pCruiseOptions.includeOnly,
71
+ exclude: pCruiseOptions.exclude,
72
+ })
73
+ ).filter(isInterestingChangeType(lOptions.interestingChangeTypes)),
71
74
  };
72
75
  }
73
76
 
74
77
  /**
75
- * @param {import("../../types/dependency-cruiser.js").IRevisionData} pExistingRevisionData
76
- * @param {import("../../types/dependency-cruiser.js").IRevisionData} pNewRevisionData
78
+ * @param {import("../../types/dependency-cruiser.js").IRevisionData=} pExistingRevisionData
79
+ * @param {import("../../types/dependency-cruiser.js").IRevisionData=} pNewRevisionData
77
80
  * @returns {boolean}
78
81
  */
79
82
  revisionDataEqual(pExistingRevisionData, pNewRevisionData) {
80
- return (
81
- Boolean(pExistingRevisionData) &&
82
- Boolean(pNewRevisionData) &&
83
- // Even though we don't really have a SHA1, it might be the previous version
84
- // of the cache did, e.g. because it was rendered with the metadata cache
85
- // strategy. In that case the SHA1 comparison is a reliable, fast bailout.
86
- pExistingRevisionData.SHA1 === pNewRevisionData.SHA1 &&
87
- isDeepStrictEqual(pExistingRevisionData.changes, pNewRevisionData.changes)
83
+ return Boolean(
84
+ pExistingRevisionData &&
85
+ pNewRevisionData &&
86
+ // Even though we don't really have a SHA1, it might be the previous version
87
+ // of the cache did, e.g. because it was rendered with the metadata cache
88
+ // strategy. In that case the SHA1 comparison is a reliable, fast bailout.
89
+ pExistingRevisionData.SHA1 === pNewRevisionData.SHA1 &&
90
+ isDeepStrictEqual(
91
+ pExistingRevisionData.changes,
92
+ pNewRevisionData.changes
93
+ )
88
94
  );
89
95
  }
90
96
 
@@ -1,3 +1,5 @@
1
+ /* eslint-disable no-inline-comments */
2
+ // @ts-check
1
3
  import { join } from "node:path/posix";
2
4
  import { bus } from "../utl/bus.mjs";
3
5
  import findAllFiles from "../utl/find-all-files.mjs";
@@ -65,7 +67,7 @@ function diffCachedModuleAgainstFileSet(
65
67
  * @param {Object} pOptions
66
68
  * @param {Set<string>} pOptions.extensions
67
69
  * @param {string} pOptions.baseDir
68
- * @returns {{source: string; changeType: import("watskeburt").changeTypeType; checksum: string}[]}
70
+ * @returns {import("../..").IRevisionChange[]}
69
71
  */
70
72
  export default function findContentChanges(
71
73
  pDirectory,
@@ -93,7 +95,7 @@ export default function findContentChanges(
93
95
  for (let lFileName of lFileSet) {
94
96
  lDiffNewVsCached.push({
95
97
  name: lFileName,
96
- changeType: "added",
98
+ changeType: /** @type import('watskeburt').changeTypeType */ ("added"),
97
99
  checksum: getFileHashSync(join(pOptions.baseDir, lFileName)),
98
100
  });
99
101
  }
@@ -1,4 +1,4 @@
1
- /* eslint-disable import/exports-last */
1
+ // @ts-check
2
2
  import { createHash } from "node:crypto";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { readFile } from "node:fs/promises";
@@ -15,7 +15,7 @@ function hash(pString) {
15
15
  }
16
16
 
17
17
  /**
18
- * @param {import("fs").PathOrFileDescriptor} pFileName
18
+ * @param {string} pFileName
19
19
  * @returns {Promise<string>}
20
20
  */
21
21
  async function _getFileHash(pFileName) {
@@ -36,7 +36,7 @@ export async function addCheckSumToChange(pChange) {
36
36
  }
37
37
 
38
38
  /**
39
- * @param {import("fs").PathOrFileDescriptor} pFileName
39
+ * @param {string} pFileName
40
40
  * @returns {string}
41
41
  */
42
42
  function _getFileHashSync(pFileName) {
@@ -99,9 +99,15 @@ export function hasInterestingExtension(pExtensions) {
99
99
  * @returns {(pChange: import("watskeburt").IChange) => boolean}
100
100
  */
101
101
  export function changeHasInterestingExtension(pExtensions) {
102
- return (pChange) =>
103
- hasInterestingExtension(pExtensions)(pChange.name) ||
104
- (pChange.oldName && hasInterestingExtension(pExtensions)(pChange.oldName));
102
+ return (pChange) => {
103
+ const lNameHasInterestingExtension = hasInterestingExtension(pExtensions)(
104
+ pChange.name
105
+ );
106
+ const lOldNameHasInterestingExtension = Boolean(
107
+ pChange.oldName && hasInterestingExtension(pExtensions)(pChange.oldName)
108
+ );
109
+ return lNameHasInterestingExtension || lOldNameHasInterestingExtension;
110
+ };
105
111
  }
106
112
 
107
113
  // skipping: "pairing broken", "unmodified", "type changed", "ignored"
@@ -127,7 +133,7 @@ export function isInterestingChangeType(pInterestingChangeTypes) {
127
133
  }
128
134
 
129
135
  /**
130
- * @param {pModule:import("../..").IModule} pModule
136
+ * @param {import("../..").IModule} pModule
131
137
  */
132
138
  export function moduleIsInterestingForDiff(pModule) {
133
139
  return (
@@ -1,3 +1,5 @@
1
+ /* eslint-disable no-inline-comments */
2
+ // @ts-check
1
3
  import { isDeepStrictEqual } from "node:util";
2
4
  import { getSHA, list } from "watskeburt";
3
5
  import { bus } from "../utl/bus.mjs";
@@ -11,20 +13,19 @@ import {
11
13
 
12
14
  export default class MetaDataStrategy {
13
15
  /**
14
- * @param {Set<string>} pExtensions
15
- * @param {Set<import("watskeburt").changeTypeType>} pInterestingChangeTypes
16
- * @param {import("../../types/strict-options.js").IStrictCruiseOptions} pCruiseOptions
16
+ * @param {string} _pDirectory
17
+ * @param {import("../../types/cruise-result.js").ICruiseResult} _pCachedCruiseResult
17
18
  * @param {Object} pOptions
18
19
  * @param {Set<string>} pOptions.extensions
19
20
  * @param {Set<import("watskeburt").changeTypeType>} pOptions.interestingChangeTypes
20
- * @param {() => string} pOptions.shaRetrievalFn
21
- * @param {(pString:string) => Array<import("watskeburt").IChange>} pOptions.diffListFn
22
- * @param {(import("watskeburt").IChange) => import("../..").IRevisionChange} pOptions.checksumFn
23
- * @returns {import("../../types/dependency-cruiser.js").IRevisionData}
21
+ * @param {typeof getSHA=} pOptions.shaRetrievalFn
22
+ * @param {typeof list=} pOptions.diffListFn
23
+ * @param {typeof addCheckSumToChangeSync=} pOptions.checksumFn
24
+ * @returns {Promise<import("../../types/dependency-cruiser.js").IRevisionData>}
24
25
  */
25
26
  async getRevisionData(
26
- pDirectory,
27
- pCachedCruiseResult,
27
+ _pDirectory,
28
+ _pCachedCruiseResult,
28
29
  pCruiseOptions,
29
30
  pOptions
30
31
  ) {
@@ -38,7 +39,9 @@ export default class MetaDataStrategy {
38
39
  bus.debug("cache: - getting sha");
39
40
  const lSHA = await lOptions.shaRetrievalFn();
40
41
  bus.debug("cache: - getting diff");
41
- const lDiff = await lOptions.diffListFn(lSHA);
42
+ const lDiff = /** @type {import("watskeburt").IChange[]} */ (
43
+ await lOptions.diffListFn(lSHA)
44
+ );
42
45
  const lChanges = lDiff
43
46
  .filter(({ name }) => excludeFilter(pCruiseOptions.exclude)(name))
44
47
  .filter(({ name }) =>
@@ -74,7 +77,7 @@ export default class MetaDataStrategy {
74
77
 
75
78
  /**
76
79
  * @param {import("../../types/dependency-cruiser.js").ICruiseResult} pCruiseResult
77
- * @param {import("../../types/dependency-cruiser.js").IRevisionData} pRevisionData
80
+ * @param {import("../../types/dependency-cruiser.js").IRevisionData=} pRevisionData
78
81
  * @returns {import("../../types/dependency-cruiser.js").ICruiseResult}
79
82
  */
80
83
  prepareRevisionDataForSaving(pCruiseResult, pRevisionData) {
@@ -1,3 +1,4 @@
1
+ // @ts-check
1
2
  import { isDeepStrictEqual } from "node:util";
2
3
 
3
4
  /*
@@ -1 +1 @@
1
- var Handlebars=require("handlebars/runtime"),template=Handlebars.template,templates=Handlebars.templates=Handlebars.templates||{};templates["config.js.template.hbs"]=template({1:function(e,n,t,o,s){var i,r=null!=n?n:e.nullContext||{},a=e.hooks.helperMissing,l="function",c=e.escapeExpression,e=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" 'extends': '"+c(typeof(i=null!=(i=e(t,"preset")||(null!=n?e(n,"preset"):n))?i:a)==l?i.call(r,{name:"preset",hash:{},data:s,loc:{start:{line:4,column:14},end:{line:4,column:24}}}):i)+"',\n /*\n the '"+c(typeof(i=null!=(i=e(t,"preset")||(null!=n?e(n,"preset"):n))?i:a)==l?i.call(r,{name:"preset",hash:{},data:s,loc:{start:{line:6,column:10},end:{line:6,column:20}}}):i)+"' preset\n contains these rules:\n no-circular - flags all circular dependencies\n no-orphans - flags orphan modules (except typescript .d.ts files)\n no-deprecated-core - flags dependencies on deprecated node 'core' modules\n no-deprecated-npm - flags dependencies on deprecated npm modules\n no-non-package-json - flags (npm) dependencies that don't occur in package.json\n not-to-unresolvable - flags dependencies that can't be resolved`\n no-duplicate-dep-types - flags dependencies that occur more than once in package.json\n\n If you need to, you can override these rules. E.g. to ignore the\n no-duplicate-dep-types rule, you can set its severity to \"ignore\" by\n adding this to the 'forbidden' section:\n {\n name: 'no-duplicate-dep-types',\n severity: 'ignore'\n }\n\n Also, by default, the preset does not follow any external modules (things in\n node_modules or in yarn's plug'n'play magic). If you want to have that\n differently, just override it the options.doNotFollow key.\n */\n forbidden: [\n"},3:function(e,n,t,o,s){return" forbidden: [\n /* rules from the 'recommended' preset: */\n {\n name: 'no-circular',\n severity: 'warn',\n comment:\n 'This dependency is part of a circular relationship. You might want to revise ' +\n 'your solution (i.e. use dependency inversion, make sure the modules have a single responsibility) ',\n from: {},\n to: {\n circular: true\n }\n },\n {\n name: 'no-orphans',\n comment:\n \"This is an orphan module - it's likely not used (anymore?). Either use it or \" +\n \"remove it. If it's logical this module is an orphan (i.e. it's a config file), \" +\n \"add an exception for it in your dependency-cruiser configuration. By default \" +\n \"this rule does not scrutinize dot-files (e.g. .eslintrc.js), TypeScript declaration \" +\n \"files (.d.ts), tsconfig.json and some of the babel and webpack configs.\",\n severity: 'warn',\n from: {\n orphan: true,\n pathNot: [\n '(^|/)\\\\.[^/]+\\\\.(js|cjs|mjs|ts|json)$', // dot files\n '\\\\.d\\\\.ts$', // TypeScript declaration files\n '(^|/)tsconfig\\\\.json$', // TypeScript config\n '(^|/)(babel|webpack)\\\\.config\\\\.(js|cjs|mjs|ts|json)$' // other configs\n ]\n },\n to: {},\n },\n {\n name: 'no-deprecated-core',\n comment:\n 'A module depends on a node core module that has been deprecated. Find an alternative - these are ' +\n \"bound to exist - node doesn't deprecate lightly.\",\n severity: 'warn',\n from: {},\n to: {\n dependencyTypes: [\n 'core'\n ],\n path: [\n '^(v8\\/tools\\/codemap)$',\n '^(v8\\/tools\\/consarray)$',\n '^(v8\\/tools\\/csvparser)$',\n '^(v8\\/tools\\/logreader)$',\n '^(v8\\/tools\\/profile_view)$',\n '^(v8\\/tools\\/profile)$',\n '^(v8\\/tools\\/SourceMap)$',\n '^(v8\\/tools\\/splaytree)$',\n '^(v8\\/tools\\/tickprocessor-driver)$',\n '^(v8\\/tools\\/tickprocessor)$',\n '^(node-inspect\\/lib\\/_inspect)$',\n '^(node-inspect\\/lib\\/internal\\/inspect_client)$',\n '^(node-inspect\\/lib\\/internal\\/inspect_repl)$',\n '^(async_hooks)$',\n '^(punycode)$',\n '^(domain)$',\n '^(constants)$',\n '^(sys)$',\n '^(_linklist)$',\n '^(_stream_wrap)$'\n ],\n }\n },\n {\n name: 'not-to-deprecated',\n comment:\n 'This module uses a (version of an) npm module that has been deprecated. Either upgrade to a later ' +\n 'version of that module, or find an alternative. Deprecated modules are a security risk.',\n severity: 'warn',\n from: {},\n to: {\n dependencyTypes: [\n 'deprecated'\n ]\n }\n },\n {\n name: 'no-non-package-json',\n severity: 'error',\n comment:\n \"This module depends on an npm package that isn't in the 'dependencies' section of your package.json. \" +\n \"That's problematic as the package either (1) won't be available on live (2 - worse) will be \" +\n \"available on live with an non-guaranteed version. Fix it by adding the package to the dependencies \" +\n \"in your package.json.\",\n from: {},\n to: {\n dependencyTypes: [\n 'npm-no-pkg',\n 'npm-unknown'\n ]\n }\n },\n {\n name: 'not-to-unresolvable',\n comment:\n \"This module depends on a module that cannot be found ('resolved to disk'). If it's an npm \" +\n 'module: add it to your package.json. In all other cases you likely already know what to do.',\n severity: 'error',\n from: {},\n to: {\n couldNotResolve: true\n }\n },\n {\n name: 'no-duplicate-dep-types',\n comment:\n \"Likely this module depends on an external ('npm') package that occurs more than once \" +\n \"in your package.json i.e. bot as a devDependencies and in dependencies. This will cause \" +\n \"maintenance problems later on.\",\n severity: 'warn',\n from: {},\n to: {\n moreThanOneDependencyType: true,\n // as it's pretty common to have a type import be a type only import \n // _and_ (e.g.) a devDependency - don't consider type-only dependency\n // types for this rule\n dependencyTypesNot: [\"type-only\"]\n }\n },\n\n /* rules you might want to tweak for your specific situation: */\n"},5:function(e,n,t,o,s){var i,r=null!=n?n:e.nullContext||{},a=e.hooks.helperMissing,l="function",c=e.escapeExpression,e=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" {\n name: 'not-to-test',\n comment:\n \"This module depends on code within a folder that should only contain tests. As tests don't \" +\n \"implement functionality this is odd. Either you're writing a test outside the test folder \" +\n \"or there's something in the test folder that isn't a test.\",\n severity: 'error',\n from: {\n pathNot: '"+c(typeof(i=null!=(i=e(t,"testLocationRE")||(null!=n?e(n,"testLocationRE"):n))?i:a)==l?i.call(r,{name:"testLocationRE",hash:{},data:s,loc:{start:{line:166,column:18},end:{line:166,column:36}}}):i)+"'\n },\n to: {\n path: '"+c(typeof(i=null!=(i=e(t,"testLocationRE")||(null!=n?e(n,"testLocationRE"):n))?i:a)==l?i.call(r,{name:"testLocationRE",hash:{},data:s,loc:{start:{line:169,column:15},end:{line:169,column:33}}}):i)+"'\n }\n },\n"},7:function(e,n,t,o,s){return" tsPreCompilationDeps: true,\n"},9:function(e,n,t,o,s){return" // tsPreCompilationDeps: false,\n"},11:function(e,n,t,o,s){return" combinedDependencies: true,\n"},13:function(e,n,t,o,s){return" // combinedDependencies: false,\n"},15:function(e,n,t,o,s){var i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" tsConfig: {\n fileName: '"+e.escapeExpression("function"==typeof(t=null!=(t=i(t,"tsConfig")||(null!=n?i(n,"tsConfig"):n))?t:e.hooks.helperMissing)?t.call(null!=n?n:e.nullContext||{},{name:"tsConfig",hash:{},data:s,loc:{start:{line:316,column:17},end:{line:316,column:29}}}):t)+"'\n },\n"},17:function(e,n,t,o,s){var i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(t=i(t,"if").call(null!=n?n:e.nullContext||{},null!=n?i(n,"useJsConfig"):n,{name:"if",hash:{},fn:e.program(18,s,0),inverse:e.program(20,s,0),data:s,loc:{start:{line:319,column:6},end:{line:327,column:13}}}))?t:""},18:function(e,n,t,o,s){var i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" tsConfig: {\n fileName: '"+e.escapeExpression("function"==typeof(t=null!=(t=i(t,"jsConfig")||(null!=n?i(n,"jsConfig"):n))?t:e.hooks.helperMissing)?t.call(null!=n?n:e.nullContext||{},{name:"jsConfig",hash:{},data:s,loc:{start:{line:321,column:17},end:{line:321,column:29}}}):t)+"'\n },\n"},20:function(e,n,t,o,s){return" // tsConfig: {\n // fileName: './tsconfig.json'\n // },\n"},22:function(e,n,t,o,s){var i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" webpackConfig: {\n fileName: '"+e.escapeExpression("function"==typeof(t=null!=(t=i(t,"webpackConfig")||(null!=n?i(n,"webpackConfig"):n))?t:e.hooks.helperMissing)?t.call(null!=n?n:e.nullContext||{},{name:"webpackConfig",hash:{},data:s,loc:{start:{line:342,column:17},end:{line:342,column:34}}}):t)+"',\n // env: {},\n // arguments: {},\n },\n"},24:function(e,n,t,o,s){return" // webpackConfig: {\n // fileName: './webpack.config.js',\n // env: {},\n // arguments: {},\n // },\n"},26:function(e,n,t,o,s){var i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" babelConfig: {\n fileName: '"+e.escapeExpression("function"==typeof(t=null!=(t=i(t,"babelConfig")||(null!=n?i(n,"babelConfig"):n))?t:e.hooks.helperMissing)?t.call(null!=n?n:e.nullContext||{},{name:"babelConfig",hash:{},data:s,loc:{start:{line:362,column:17},end:{line:362,column:32}}}):t)+"'\n },\n"},28:function(e,n,t,o,s){return" // babelConfig: {\n // fileName: './.babelrc'\n // },\n"},30:function(e,n,t,o,s){var i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" extensions: "+(null!=(i="function"==typeof(t=null!=(t=i(t,"resolutionExtensionsAsString")||(null!=n?i(n,"resolutionExtensionsAsString"):n))?t:e.hooks.helperMissing)?t.call(null!=n?n:e.nullContext||{},{name:"resolutionExtensionsAsString",hash:{},data:s,loc:{start:{line:412,column:18},end:{line:412,column:52}}}):t)?i:"")+",\n"},32:function(e,n,t,o,s){return' // extensions: [".js", ".jsx", ".ts", ".tsx", ".d.ts"],\n'},34:function(e,n,t,o,s){return' mainFields: ["main", "types"],\n'},36:function(e,n,t,o,s){return' // mainFields: ["main", "types"],\n'},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,s){var i=null!=n?n:e.nullContext||{},r=e.hooks.helperMissing,a="function",l=e.escapeExpression,c=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]},p="/** @type {import('dependency-cruiser').IConfiguration} */\nmodule.exports = {\n"+(null!=(h=c(t,"if").call(i,null!=n?c(n,"preset"):n,{name:"if",hash:{},fn:e.program(1,s,0),inverse:e.program(3,s,0),data:s,loc:{start:{line:3,column:0},end:{line:156,column:7}}}))?h:""),u=null!=(u=c(t,"hasTestsOutsideSource")||(null!=n?c(n,"hasTestsOutsideSource"):n))?u:r,d={name:"hasTestsOutsideSource",hash:{},fn:e.program(5,s,0),inverse:e.noop,data:s,loc:{start:{line:157,column:4},end:{line:172,column:30}}},h=typeof u==a?u.call(i,d):u;return null!=(h=c(t,"hasTestsOutsideSource")?h:e.hooks.blockHelperMissing.call(n,h,d))&&(p+=h),p+" {\n name: 'not-to-spec',\n comment:\n 'This module depends on a spec (test) file. The sole responsibility of a spec file is to test code. ' +\n \"If there's something in a spec that's of use to other modules, it doesn't have that single \" +\n 'responsibility anymore. Factor it out into (e.g.) a separate utility/ helper or a mock.',\n severity: 'error',\n from: {},\n to: {\n path: '\\\\.(spec|test)\\\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\\\.md)$'\n }\n },\n {\n name: 'not-to-dev-dep',\n severity: 'error',\n comment:\n \"This module depends on an npm package from the 'devDependencies' section of your \" +\n 'package.json. It looks like something that ships to production, though. To prevent problems ' +\n \"with npm packages that aren't there on production declare it (only!) in the 'dependencies'\" +\n 'section of your package.json. If this module is development only - add it to the ' +\n 'from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration',\n from: {\n path: '"+l(typeof(u=null!=(u=c(t,"sourceLocationRE")||(null!=n?c(n,"sourceLocationRE"):n))?u:r)==a?u.call(i,{name:"sourceLocationRE",hash:{},data:s,loc:{start:{line:195,column:15},end:{line:195,column:35}}}):u)+"',\n pathNot: '\\\\.(spec|test)\\\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\\\.md)$'\n },\n to: {\n dependencyTypes: [\n 'npm-dev'\n ]\n }\n },\n {\n name: 'optional-deps-used',\n severity: 'info',\n comment:\n \"This module depends on an npm package that is declared as an optional dependency \" +\n \"in your package.json. As this makes sense in limited situations only, it's flagged here. \" +\n \"If you're using an optional dependency here by design - add an exception to your\" +\n \"dependency-cruiser configuration.\",\n from: {},\n to: {\n dependencyTypes: [\n 'npm-optional'\n ]\n }\n },\n {\n name: 'peer-deps-used',\n comment:\n \"This module depends on an npm package that is declared as a peer dependency \" +\n \"in your package.json. This makes sense if your package is e.g. a plugin, but in \" +\n \"other cases - maybe not so much. If the use of a peer dependency is intentional \" +\n \"add an exception to your dependency-cruiser configuration.\",\n severity: 'warn',\n from: {},\n to: {\n dependencyTypes: [\n 'npm-peer'\n ]\n }\n }\n ],\n options: {\n\n /* conditions specifying which files not to follow further when encountered:\n - path: a regular expression to match\n - dependencyTypes: see https://github.com/sverweij/dependency-cruiser/blob/master/doc/rules-reference.md#dependencytypes-and-dependencytypesnot\n for a complete list\n */\n doNotFollow: {\n path: 'node_modules'\n },\n\n /* conditions specifying which dependencies to exclude\n - path: a regular expression to match\n - dynamic: a boolean indicating whether to ignore dynamic (true) or static (false) dependencies.\n leave out if you want to exclude neither (recommended!)\n */\n // exclude : {\n // path: '',\n // dynamic: true\n // },\n\n /* pattern specifying which files to include (regular expression)\n dependency-cruiser will skip everything not matching this pattern\n */\n // includeOnly : '',\n\n /* dependency-cruiser will include modules matching against the focus\n regular expression in its output, as well as their neighbours (direct\n dependencies and dependents)\n */\n // focus : '',\n\n /* list of module systems to cruise */\n // moduleSystems: ['amd', 'cjs', 'es6', 'tsd'],\n\n /* prefix for links in html and svg output (e.g. 'https://github.com/you/yourrepo/blob/develop/'\n to open it on your online repo or `vscode://file/${process.cwd()}/` to \n open it in visual studio code),\n */\n // prefix: '',\n\n /* false (the default): ignore dependencies that only exist before typescript-to-javascript compilation\n true: also detect dependencies that only exist before typescript-to-javascript compilation\n \"specify\": for each dependency identify whether it only exists before compilation or also after\n */\n"+(null!=(h=c(t,"if").call(i,null!=n?c(n,"tsPreCompilationDeps"):n,{name:"if",hash:{},fn:e.program(7,s,0),inverse:e.program(9,s,0),data:s,loc:{start:{line:280,column:4},end:{line:284,column:11}}}))?h:"")+' \n /* \n list of extensions to scan that aren\'t javascript or compile-to-javascript. \n Empty by default. Only put extensions in here that you want to take into\n account that are _not_ parsable. \n */\n // extraExtensionsToScan: [".json", ".jpg", ".png", ".svg", ".webp"],\n\n /* if true combines the package.jsons found from the module up to the base\n folder the cruise is initiated from. Useful for how (some) mono-repos\n manage dependencies & dependency definitions.\n */\n'+(null!=(h=c(t,"if").call(i,null!=n?c(n,"combinedDependencies"):n,{name:"if",hash:{},fn:e.program(11,s,0),inverse:e.program(13,s,0),data:s,loc:{start:{line:297,column:4},end:{line:301,column:11}}}))?h:"")+"\n /* if true leave symlinks untouched, otherwise use the realpath */\n // preserveSymlinks: false,\n\n /* TypeScript project file ('tsconfig.json') to use for\n (1) compilation and\n (2) resolution (e.g. with the paths property)\n\n The (optional) fileName attribute specifies which file to take (relative to\n dependency-cruiser's current working directory). When not provided\n defaults to './tsconfig.json'.\n */\n"+(null!=(h=c(t,"if").call(i,null!=n?c(n,"useTsConfig"):n,{name:"if",hash:{},fn:e.program(15,s,0),inverse:e.program(17,s,0),data:s,loc:{start:{line:314,column:4},end:{line:328,column:11}}}))?h:"")+"\n /* Webpack configuration to use to get resolve options from.\n\n The (optional) fileName attribute specifies which file to take (relative\n to dependency-cruiser's current working directory. When not provided defaults\n to './webpack.conf.js'.\n\n The (optional) `env` and `arguments` attributes contain the parameters to be passed if\n your webpack config is a function and takes them (see webpack documentation\n for details)\n */\n"+(null!=(h=c(t,"if").call(i,null!=n?c(n,"useWebpackConfig"):n,{name:"if",hash:{},fn:e.program(22,s,0),inverse:e.program(24,s,0),data:s,loc:{start:{line:340,column:4},end:{line:352,column:11}}}))?h:"")+"\n /* Babel config ('.babelrc', '.babelrc.json', '.babelrc.json5', ...) to use\n for compilation (and whatever other naughty things babel plugins do to\n source code). This feature is well tested and usable, but might change\n behavior a bit over time (e.g. more precise results for used module \n systems) without dependency-cruiser getting a major version bump.\n */\n"+(null!=(h=c(t,"if").call(i,null!=n?c(n,"useBabelConfig"):n,{name:"if",hash:{},fn:e.program(26,s,0),inverse:e.program(28,s,0),data:s,loc:{start:{line:360,column:4},end:{line:368,column:11}}}))?h:"")+"\n /* List of strings you have in use in addition to cjs/ es6 requires\n & imports to declare module dependencies. Use this e.g. if you've\n re-declared require, use a require-wrapper or use window.require as\n a hack.\n */\n // exoticRequireStrings: [],\n /* options to pass on to enhanced-resolve, the package dependency-cruiser\n uses to resolve module references to disk. You can set most of these\n options in a webpack.conf.js - this section is here for those\n projects that don't have a separate webpack config file.\n\n Note: settings in webpack.conf.js override the ones specified here.\n */\n enhancedResolveOptions: {\n /* List of strings to consider as 'exports' fields in package.json. Use\n ['exports'] when you use packages that use such a field and your environment\n supports it (e.g. node ^12.19 || >=14.7 or recent versions of webpack).\n\n If you have an `exportsFields` attribute in your webpack config, that one\n will have precedence over the one specified here.\n */ \n exportsFields: [\"exports\"],\n /* List of conditions to check for in the exports field. e.g. use ['imports']\n if you're only interested in exposed es6 modules, ['require'] for commonjs,\n or all conditions at once `(['import', 'require', 'node', 'default']`)\n if anything goes for you. Only works when the 'exportsFields' array is\n non-empty.\n\n If you have a 'conditionNames' attribute in your webpack config, that one will\n have precedence over the one specified here.\n */\n conditionNames: [\"import\", \"require\", \"node\", \"default\"],\n /*\n The extensions, by default are the same as the ones dependency-cruiser\n can access (run `npx depcruise --info` to see which ones that are in\n _your_ environment. If that list is larger than what you need (e.g. \n it contains .js, .jsx, .ts, .tsx, .cts, .mts - but you don't use \n TypeScript you can pass just the extensions you actually use (e.g. \n [\".js\", \".jsx\"]). This can speed up the most expensive step in \n dependency cruising (module resolution) quite a bit.\n */\n"+(null!=(h=c(t,"if").call(i,null!=n?c(n,"specifyResolutionExtensions"):n,{name:"if",hash:{},fn:e.program(30,s,0),inverse:e.program(32,s,0),data:s,loc:{start:{line:411,column:6},end:{line:415,column:13}}}))?h:"")+' /* \n If your TypeScript project makes use of types specified in \'types\'\n fields in package.jsons of external dependencies, specify "types"\n in addition to "main" in here, so enhanced-resolve (the resolver\n dependency-cruiser uses) knows to also look there. You can also do\n this if you\'re not sure, but still use TypeScript. In a future version\n of dependency-cruiser this will likely become the default.\n */\n'+(null!=(h=c(t,"if").call(i,null!=n?c(n,"usesTypeScript"):n,{name:"if",hash:{},fn:e.program(34,s,0),inverse:e.program(36,s,0),data:s,loc:{start:{line:424,column:6},end:{line:428,column:13}}}))?h:"")+' },\n reporterOptions: {\n dot: {\n /* pattern of modules that can be consolidated in the detailed\n graphical dependency graph. The default pattern in this configuration\n collapses everything in node_modules to one folder deep so you see\n the external modules, but not the innards your app depends upon.\n */\n collapsePattern: \'node_modules/(@[^/]+/[^/]+|[^/]+)\',\n\n /* Options to tweak the appearance of your graph.See\n https://github.com/sverweij/dependency-cruiser/blob/master/doc/options-reference.md#reporteroptions\n for details and some examples. If you don\'t specify a theme\n don\'t worry - dependency-cruiser will fall back to the default one.\n */\n // theme: {\n // graph: {\n // /* use splines: "ortho" for straight lines. Be aware though\n // graphviz might take a long time calculating ortho(gonal)\n // routings.\n // */\n // splines: "true"\n // },\n // modules: [\n // {\n // criteria: { matchesFocus: true },\n // attributes: {\n // fillcolor: "lime",\n // penwidth: 2,\n // },\n // },\n // {\n // criteria: { matchesFocus: false },\n // attributes: {\n // fillcolor: "lightgrey",\n // },\n // },\n // {\n // criteria: { matchesReaches: true },\n // attributes: {\n // fillcolor: "lime",\n // penwidth: 2,\n // },\n // },\n // {\n // criteria: { matchesReaches: false },\n // attributes: {\n // fillcolor: "lightgrey",\n // },\n // },\n // {\n // criteria: { source: "^src/model" },\n // attributes: { fillcolor: "#ccccff" }\n // },\n // {\n // criteria: { source: "^src/view" },\n // attributes: { fillcolor: "#ccffcc" }\n // },\n // ],\n // dependencies: [\n // {\n // criteria: { "rules[0].severity": "error" },\n // attributes: { fontcolor: "red", color: "red" }\n // },\n // {\n // criteria: { "rules[0].severity": "warn" },\n // attributes: { fontcolor: "orange", color: "orange" }\n // },\n // {\n // criteria: { "rules[0].severity": "info" },\n // attributes: { fontcolor: "blue", color: "blue" }\n // },\n // {\n // criteria: { resolved: "^src/model" },\n // attributes: { color: "#0000ff77" }\n // },\n // {\n // criteria: { resolved: "^src/view" },\n // attributes: { color: "#00770077" }\n // }\n // ]\n // }\n },\n archi: {\n /* pattern of modules that can be consolidated in the high level\n graphical dependency graph. If you use the high level graphical\n dependency graph reporter (`archi`) you probably want to tweak\n this collapsePattern to your situation.\n */\n collapsePattern: \'^(packages|src|lib|app|bin|test(s?)|spec(s?))/[^/]+|node_modules/(@[^/]+/[^/]+|[^/]+)\',\n\n /* Options to tweak the appearance of your graph.See\n https://github.com/sverweij/dependency-cruiser/blob/master/doc/options-reference.md#reporteroptions\n for details and some examples. If you don\'t specify a theme\n for \'archi\' dependency-cruiser will use the one specified in the\n dot section (see above), if any, and otherwise use the default one.\n */\n // theme: {\n // },\n },\n "text": {\n "highlightFocused": true\n },\n }\n }\n};\n// generated: dependency-cruiser@'+l(typeof(u=null!=(u=c(t,"version")||(null!=n?c(n,"version"):n))?u:r)==a?u.call(i,{name:"version",hash:{},data:s,loc:{start:{line:535,column:33},end:{line:535,column:44}}}):u)+" on "+l(typeof(u=null!=(u=c(t,"date")||(null!=n?c(n,"date"):n))?u:r)==a?u.call(i,{name:"date",hash:{},data:s,loc:{start:{line:535,column:48},end:{line:535,column:56}}}):u)+"\n"},useData:!0});
1
+ var Handlebars=require("handlebars/runtime"),template=Handlebars.template,templates=Handlebars.templates=Handlebars.templates||{};templates["config.js.template.hbs"]=template({1:function(e,n,t,o,s){var i,r=null!=n?n:e.nullContext||{},a=e.hooks.helperMissing,l="function",c=e.escapeExpression,e=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" 'extends': '"+c(typeof(i=null!=(i=e(t,"preset")||(null!=n?e(n,"preset"):n))?i:a)==l?i.call(r,{name:"preset",hash:{},data:s,loc:{start:{line:4,column:14},end:{line:4,column:24}}}):i)+"',\n /*\n the '"+c(typeof(i=null!=(i=e(t,"preset")||(null!=n?e(n,"preset"):n))?i:a)==l?i.call(r,{name:"preset",hash:{},data:s,loc:{start:{line:6,column:10},end:{line:6,column:20}}}):i)+"' preset\n contains these rules:\n no-circular - flags all circular dependencies\n no-orphans - flags orphan modules (except typescript .d.ts files)\n no-deprecated-core - flags dependencies on deprecated node 'core' modules\n no-deprecated-npm - flags dependencies on deprecated npm modules\n no-non-package-json - flags (npm) dependencies that don't occur in package.json\n not-to-unresolvable - flags dependencies that can't be resolved`\n no-duplicate-dep-types - flags dependencies that occur more than once in package.json\n\n If you need to, you can override these rules. E.g. to ignore the\n no-duplicate-dep-types rule, you can set its severity to \"ignore\" by\n adding this to the 'forbidden' section:\n {\n name: 'no-duplicate-dep-types',\n severity: 'ignore'\n }\n\n Also, by default, the preset does not follow any external modules (things in\n node_modules or in yarn's plug'n'play magic). If you want to have that\n differently, just override it the options.doNotFollow key.\n */\n forbidden: [\n"},3:function(e,n,t,o,s){return" forbidden: [\n /* rules from the 'recommended' preset: */\n {\n name: 'no-circular',\n severity: 'warn',\n comment:\n 'This dependency is part of a circular relationship. You might want to revise ' +\n 'your solution (i.e. use dependency inversion, make sure the modules have a single responsibility) ',\n from: {},\n to: {\n circular: true\n }\n },\n {\n name: 'no-orphans',\n comment:\n \"This is an orphan module - it's likely not used (anymore?). Either use it or \" +\n \"remove it. If it's logical this module is an orphan (i.e. it's a config file), \" +\n \"add an exception for it in your dependency-cruiser configuration. By default \" +\n \"this rule does not scrutinize dot-files (e.g. .eslintrc.js), TypeScript declaration \" +\n \"files (.d.ts), tsconfig.json and some of the babel and webpack configs.\",\n severity: 'warn',\n from: {\n orphan: true,\n pathNot: [\n '(^|/)\\\\.[^/]+\\\\.(js|cjs|mjs|ts|json)$', // dot files\n '\\\\.d\\\\.ts$', // TypeScript declaration files\n '(^|/)tsconfig\\\\.json$', // TypeScript config\n '(^|/)(babel|webpack)\\\\.config\\\\.(js|cjs|mjs|ts|json)$' // other configs\n ]\n },\n to: {},\n },\n {\n name: 'no-deprecated-core',\n comment:\n 'A module depends on a node core module that has been deprecated. Find an alternative - these are ' +\n \"bound to exist - node doesn't deprecate lightly.\",\n severity: 'warn',\n from: {},\n to: {\n dependencyTypes: [\n 'core'\n ],\n path: [\n '^(v8\\/tools\\/codemap)$',\n '^(v8\\/tools\\/consarray)$',\n '^(v8\\/tools\\/csvparser)$',\n '^(v8\\/tools\\/logreader)$',\n '^(v8\\/tools\\/profile_view)$',\n '^(v8\\/tools\\/profile)$',\n '^(v8\\/tools\\/SourceMap)$',\n '^(v8\\/tools\\/splaytree)$',\n '^(v8\\/tools\\/tickprocessor-driver)$',\n '^(v8\\/tools\\/tickprocessor)$',\n '^(node-inspect\\/lib\\/_inspect)$',\n '^(node-inspect\\/lib\\/internal\\/inspect_client)$',\n '^(node-inspect\\/lib\\/internal\\/inspect_repl)$',\n '^(async_hooks)$',\n '^(punycode)$',\n '^(domain)$',\n '^(constants)$',\n '^(sys)$',\n '^(_linklist)$',\n '^(_stream_wrap)$'\n ],\n }\n },\n {\n name: 'not-to-deprecated',\n comment:\n 'This module uses a (version of an) npm module that has been deprecated. Either upgrade to a later ' +\n 'version of that module, or find an alternative. Deprecated modules are a security risk.',\n severity: 'warn',\n from: {},\n to: {\n dependencyTypes: [\n 'deprecated'\n ]\n }\n },\n {\n name: 'no-non-package-json',\n severity: 'error',\n comment:\n \"This module depends on an npm package that isn't in the 'dependencies' section of your package.json. \" +\n \"That's problematic as the package either (1) won't be available on live (2 - worse) will be \" +\n \"available on live with an non-guaranteed version. Fix it by adding the package to the dependencies \" +\n \"in your package.json.\",\n from: {},\n to: {\n dependencyTypes: [\n 'npm-no-pkg',\n 'npm-unknown'\n ]\n }\n },\n {\n name: 'not-to-unresolvable',\n comment:\n \"This module depends on a module that cannot be found ('resolved to disk'). If it's an npm \" +\n 'module: add it to your package.json. In all other cases you likely already know what to do.',\n severity: 'error',\n from: {},\n to: {\n couldNotResolve: true\n }\n },\n {\n name: 'no-duplicate-dep-types',\n comment:\n \"Likely this module depends on an external ('npm') package that occurs more than once \" +\n \"in your package.json i.e. bot as a devDependencies and in dependencies. This will cause \" +\n \"maintenance problems later on.\",\n severity: 'warn',\n from: {},\n to: {\n moreThanOneDependencyType: true,\n // as it's pretty common to have a type import be a type only import \n // _and_ (e.g.) a devDependency - don't consider type-only dependency\n // types for this rule\n dependencyTypesNot: [\"type-only\"]\n }\n },\n\n /* rules you might want to tweak for your specific situation: */\n"},5:function(e,n,t,o,s){var i,r=null!=n?n:e.nullContext||{},a=e.hooks.helperMissing,l="function",c=e.escapeExpression,e=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" {\n name: 'not-to-test',\n comment:\n \"This module depends on code within a folder that should only contain tests. As tests don't \" +\n \"implement functionality this is odd. Either you're writing a test outside the test folder \" +\n \"or there's something in the test folder that isn't a test.\",\n severity: 'error',\n from: {\n pathNot: '"+c(typeof(i=null!=(i=e(t,"testLocationRE")||(null!=n?e(n,"testLocationRE"):n))?i:a)==l?i.call(r,{name:"testLocationRE",hash:{},data:s,loc:{start:{line:166,column:18},end:{line:166,column:36}}}):i)+"'\n },\n to: {\n path: '"+c(typeof(i=null!=(i=e(t,"testLocationRE")||(null!=n?e(n,"testLocationRE"):n))?i:a)==l?i.call(r,{name:"testLocationRE",hash:{},data:s,loc:{start:{line:169,column:15},end:{line:169,column:33}}}):i)+"'\n }\n },\n"},7:function(e,n,t,o,s){return" tsPreCompilationDeps: true,\n"},9:function(e,n,t,o,s){return" // tsPreCompilationDeps: false,\n"},11:function(e,n,t,o,s){return" combinedDependencies: true,\n"},13:function(e,n,t,o,s){return" // combinedDependencies: false,\n"},15:function(e,n,t,o,s){var i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" tsConfig: {\n fileName: '"+e.escapeExpression("function"==typeof(t=null!=(t=i(t,"tsConfig")||(null!=n?i(n,"tsConfig"):n))?t:e.hooks.helperMissing)?t.call(null!=n?n:e.nullContext||{},{name:"tsConfig",hash:{},data:s,loc:{start:{line:316,column:17},end:{line:316,column:29}}}):t)+"'\n },\n"},17:function(e,n,t,o,s){var i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(t=i(t,"if").call(null!=n?n:e.nullContext||{},null!=n?i(n,"useJsConfig"):n,{name:"if",hash:{},fn:e.program(18,s,0),inverse:e.program(20,s,0),data:s,loc:{start:{line:319,column:6},end:{line:327,column:13}}}))?t:""},18:function(e,n,t,o,s){var i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" tsConfig: {\n fileName: '"+e.escapeExpression("function"==typeof(t=null!=(t=i(t,"jsConfig")||(null!=n?i(n,"jsConfig"):n))?t:e.hooks.helperMissing)?t.call(null!=n?n:e.nullContext||{},{name:"jsConfig",hash:{},data:s,loc:{start:{line:321,column:17},end:{line:321,column:29}}}):t)+"'\n },\n"},20:function(e,n,t,o,s){return" // tsConfig: {\n // fileName: './tsconfig.json'\n // },\n"},22:function(e,n,t,o,s){var i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" webpackConfig: {\n fileName: '"+e.escapeExpression("function"==typeof(t=null!=(t=i(t,"webpackConfig")||(null!=n?i(n,"webpackConfig"):n))?t:e.hooks.helperMissing)?t.call(null!=n?n:e.nullContext||{},{name:"webpackConfig",hash:{},data:s,loc:{start:{line:342,column:17},end:{line:342,column:34}}}):t)+"',\n // env: {},\n // arguments: {},\n },\n"},24:function(e,n,t,o,s){return" // webpackConfig: {\n // fileName: './webpack.config.js',\n // env: {},\n // arguments: {},\n // },\n"},26:function(e,n,t,o,s){var i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" babelConfig: {\n fileName: '"+e.escapeExpression("function"==typeof(t=null!=(t=i(t,"babelConfig")||(null!=n?i(n,"babelConfig"):n))?t:e.hooks.helperMissing)?t.call(null!=n?n:e.nullContext||{},{name:"babelConfig",hash:{},data:s,loc:{start:{line:362,column:17},end:{line:362,column:32}}}):t)+"'\n },\n"},28:function(e,n,t,o,s){return" // babelConfig: {\n // fileName: './.babelrc'\n // },\n"},30:function(e,n,t,o,s){var i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" extensions: "+(null!=(i="function"==typeof(t=null!=(t=i(t,"resolutionExtensionsAsString")||(null!=n?i(n,"resolutionExtensionsAsString"):n))?t:e.hooks.helperMissing)?t.call(null!=n?n:e.nullContext||{},{name:"resolutionExtensionsAsString",hash:{},data:s,loc:{start:{line:412,column:18},end:{line:412,column:52}}}):t)?i:"")+",\n"},32:function(e,n,t,o,s){return' // extensions: [".js", ".jsx", ".ts", ".tsx", ".d.ts"],\n'},34:function(e,n,t,o,s){return' mainFields: ["main", "types"],\n'},36:function(e,n,t,o,s){return' // mainFields: ["main", "types"],\n'},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,s){var i=null!=n?n:e.nullContext||{},r=e.hooks.helperMissing,a="function",l=e.escapeExpression,c=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]},p="/** @type {import('dependency-cruiser').IConfiguration} */\nmodule.exports = {\n"+(null!=(h=c(t,"if").call(i,null!=n?c(n,"preset"):n,{name:"if",hash:{},fn:e.program(1,s,0),inverse:e.program(3,s,0),data:s,loc:{start:{line:3,column:0},end:{line:156,column:7}}}))?h:""),u=null!=(u=c(t,"hasTestsOutsideSource")||(null!=n?c(n,"hasTestsOutsideSource"):n))?u:r,d={name:"hasTestsOutsideSource",hash:{},fn:e.program(5,s,0),inverse:e.noop,data:s,loc:{start:{line:157,column:4},end:{line:172,column:30}}},h=typeof u==a?u.call(i,d):u;return null!=(h=c(t,"hasTestsOutsideSource")?h:e.hooks.blockHelperMissing.call(n,h,d))&&(p+=h),p+" {\n name: 'not-to-spec',\n comment:\n 'This module depends on a spec (test) file. The sole responsibility of a spec file is to test code. ' +\n \"If there's something in a spec that's of use to other modules, it doesn't have that single \" +\n 'responsibility anymore. Factor it out into (e.g.) a separate utility/ helper or a mock.',\n severity: 'error',\n from: {},\n to: {\n path: '\\\\.(spec|test)\\\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\\\.md)$'\n }\n },\n {\n name: 'not-to-dev-dep',\n severity: 'error',\n comment:\n \"This module depends on an npm package from the 'devDependencies' section of your \" +\n 'package.json. It looks like something that ships to production, though. To prevent problems ' +\n \"with npm packages that aren't there on production declare it (only!) in the 'dependencies'\" +\n 'section of your package.json. If this module is development only - add it to the ' +\n 'from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration',\n from: {\n path: '"+l(typeof(u=null!=(u=c(t,"sourceLocationRE")||(null!=n?c(n,"sourceLocationRE"):n))?u:r)==a?u.call(i,{name:"sourceLocationRE",hash:{},data:s,loc:{start:{line:195,column:15},end:{line:195,column:35}}}):u)+"',\n pathNot: '\\\\.(spec|test)\\\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\\\.md)$'\n },\n to: {\n dependencyTypes: [\n 'npm-dev'\n ]\n }\n },\n {\n name: 'optional-deps-used',\n severity: 'info',\n comment:\n \"This module depends on an npm package that is declared as an optional dependency \" +\n \"in your package.json. As this makes sense in limited situations only, it's flagged here. \" +\n \"If you're using an optional dependency here by design - add an exception to your\" +\n \"dependency-cruiser configuration.\",\n from: {},\n to: {\n dependencyTypes: [\n 'npm-optional'\n ]\n }\n },\n {\n name: 'peer-deps-used',\n comment:\n \"This module depends on an npm package that is declared as a peer dependency \" +\n \"in your package.json. This makes sense if your package is e.g. a plugin, but in \" +\n \"other cases - maybe not so much. If the use of a peer dependency is intentional \" +\n \"add an exception to your dependency-cruiser configuration.\",\n severity: 'warn',\n from: {},\n to: {\n dependencyTypes: [\n 'npm-peer'\n ]\n }\n }\n ],\n options: {\n\n /* conditions specifying which files not to follow further when encountered:\n - path: a regular expression to match\n - dependencyTypes: see https://github.com/sverweij/dependency-cruiser/blob/main/doc/rules-reference.md#dependencytypes-and-dependencytypesnot\n for a complete list\n */\n doNotFollow: {\n path: 'node_modules'\n },\n\n /* conditions specifying which dependencies to exclude\n - path: a regular expression to match\n - dynamic: a boolean indicating whether to ignore dynamic (true) or static (false) dependencies.\n leave out if you want to exclude neither (recommended!)\n */\n // exclude : {\n // path: '',\n // dynamic: true\n // },\n\n /* pattern specifying which files to include (regular expression)\n dependency-cruiser will skip everything not matching this pattern\n */\n // includeOnly : '',\n\n /* dependency-cruiser will include modules matching against the focus\n regular expression in its output, as well as their neighbours (direct\n dependencies and dependents)\n */\n // focus : '',\n\n /* list of module systems to cruise */\n // moduleSystems: ['amd', 'cjs', 'es6', 'tsd'],\n\n /* prefix for links in html and svg output (e.g. 'https://github.com/you/yourrepo/blob/develop/'\n to open it on your online repo or `vscode://file/${process.cwd()}/` to \n open it in visual studio code),\n */\n // prefix: '',\n\n /* false (the default): ignore dependencies that only exist before typescript-to-javascript compilation\n true: also detect dependencies that only exist before typescript-to-javascript compilation\n \"specify\": for each dependency identify whether it only exists before compilation or also after\n */\n"+(null!=(h=c(t,"if").call(i,null!=n?c(n,"tsPreCompilationDeps"):n,{name:"if",hash:{},fn:e.program(7,s,0),inverse:e.program(9,s,0),data:s,loc:{start:{line:280,column:4},end:{line:284,column:11}}}))?h:"")+' \n /* \n list of extensions to scan that aren\'t javascript or compile-to-javascript. \n Empty by default. Only put extensions in here that you want to take into\n account that are _not_ parsable. \n */\n // extraExtensionsToScan: [".json", ".jpg", ".png", ".svg", ".webp"],\n\n /* if true combines the package.jsons found from the module up to the base\n folder the cruise is initiated from. Useful for how (some) mono-repos\n manage dependencies & dependency definitions.\n */\n'+(null!=(h=c(t,"if").call(i,null!=n?c(n,"combinedDependencies"):n,{name:"if",hash:{},fn:e.program(11,s,0),inverse:e.program(13,s,0),data:s,loc:{start:{line:297,column:4},end:{line:301,column:11}}}))?h:"")+"\n /* if true leave symlinks untouched, otherwise use the realpath */\n // preserveSymlinks: false,\n\n /* TypeScript project file ('tsconfig.json') to use for\n (1) compilation and\n (2) resolution (e.g. with the paths property)\n\n The (optional) fileName attribute specifies which file to take (relative to\n dependency-cruiser's current working directory). When not provided\n defaults to './tsconfig.json'.\n */\n"+(null!=(h=c(t,"if").call(i,null!=n?c(n,"useTsConfig"):n,{name:"if",hash:{},fn:e.program(15,s,0),inverse:e.program(17,s,0),data:s,loc:{start:{line:314,column:4},end:{line:328,column:11}}}))?h:"")+"\n /* Webpack configuration to use to get resolve options from.\n\n The (optional) fileName attribute specifies which file to take (relative\n to dependency-cruiser's current working directory. When not provided defaults\n to './webpack.conf.js'.\n\n The (optional) `env` and `arguments` attributes contain the parameters to be passed if\n your webpack config is a function and takes them (see webpack documentation\n for details)\n */\n"+(null!=(h=c(t,"if").call(i,null!=n?c(n,"useWebpackConfig"):n,{name:"if",hash:{},fn:e.program(22,s,0),inverse:e.program(24,s,0),data:s,loc:{start:{line:340,column:4},end:{line:352,column:11}}}))?h:"")+"\n /* Babel config ('.babelrc', '.babelrc.json', '.babelrc.json5', ...) to use\n for compilation (and whatever other naughty things babel plugins do to\n source code). This feature is well tested and usable, but might change\n behavior a bit over time (e.g. more precise results for used module \n systems) without dependency-cruiser getting a major version bump.\n */\n"+(null!=(h=c(t,"if").call(i,null!=n?c(n,"useBabelConfig"):n,{name:"if",hash:{},fn:e.program(26,s,0),inverse:e.program(28,s,0),data:s,loc:{start:{line:360,column:4},end:{line:368,column:11}}}))?h:"")+"\n /* List of strings you have in use in addition to cjs/ es6 requires\n & imports to declare module dependencies. Use this e.g. if you've\n re-declared require, use a require-wrapper or use window.require as\n a hack.\n */\n // exoticRequireStrings: [],\n /* options to pass on to enhanced-resolve, the package dependency-cruiser\n uses to resolve module references to disk. You can set most of these\n options in a webpack.conf.js - this section is here for those\n projects that don't have a separate webpack config file.\n\n Note: settings in webpack.conf.js override the ones specified here.\n */\n enhancedResolveOptions: {\n /* List of strings to consider as 'exports' fields in package.json. Use\n ['exports'] when you use packages that use such a field and your environment\n supports it (e.g. node ^12.19 || >=14.7 or recent versions of webpack).\n\n If you have an `exportsFields` attribute in your webpack config, that one\n will have precedence over the one specified here.\n */ \n exportsFields: [\"exports\"],\n /* List of conditions to check for in the exports field. e.g. use ['imports']\n if you're only interested in exposed es6 modules, ['require'] for commonjs,\n or all conditions at once `(['import', 'require', 'node', 'default']`)\n if anything goes for you. Only works when the 'exportsFields' array is\n non-empty.\n\n If you have a 'conditionNames' attribute in your webpack config, that one will\n have precedence over the one specified here.\n */\n conditionNames: [\"import\", \"require\", \"node\", \"default\"],\n /*\n The extensions, by default are the same as the ones dependency-cruiser\n can access (run `npx depcruise --info` to see which ones that are in\n _your_ environment. If that list is larger than what you need (e.g. \n it contains .js, .jsx, .ts, .tsx, .cts, .mts - but you don't use \n TypeScript you can pass just the extensions you actually use (e.g. \n [\".js\", \".jsx\"]). This can speed up the most expensive step in \n dependency cruising (module resolution) quite a bit.\n */\n"+(null!=(h=c(t,"if").call(i,null!=n?c(n,"specifyResolutionExtensions"):n,{name:"if",hash:{},fn:e.program(30,s,0),inverse:e.program(32,s,0),data:s,loc:{start:{line:411,column:6},end:{line:415,column:13}}}))?h:"")+' /* \n If your TypeScript project makes use of types specified in \'types\'\n fields in package.jsons of external dependencies, specify "types"\n in addition to "main" in here, so enhanced-resolve (the resolver\n dependency-cruiser uses) knows to also look there. You can also do\n this if you\'re not sure, but still use TypeScript. In a future version\n of dependency-cruiser this will likely become the default.\n */\n'+(null!=(h=c(t,"if").call(i,null!=n?c(n,"usesTypeScript"):n,{name:"if",hash:{},fn:e.program(34,s,0),inverse:e.program(36,s,0),data:s,loc:{start:{line:424,column:6},end:{line:428,column:13}}}))?h:"")+' },\n reporterOptions: {\n dot: {\n /* pattern of modules that can be consolidated in the detailed\n graphical dependency graph. The default pattern in this configuration\n collapses everything in node_modules to one folder deep so you see\n the external modules, but not the innards your app depends upon.\n */\n collapsePattern: \'node_modules/(@[^/]+/[^/]+|[^/]+)\',\n\n /* Options to tweak the appearance of your graph.See\n https://github.com/sverweij/dependency-cruiser/blob/main/doc/options-reference.md#reporteroptions\n for details and some examples. If you don\'t specify a theme\n don\'t worry - dependency-cruiser will fall back to the default one.\n */\n // theme: {\n // graph: {\n // /* use splines: "ortho" for straight lines. Be aware though\n // graphviz might take a long time calculating ortho(gonal)\n // routings.\n // */\n // splines: "true"\n // },\n // modules: [\n // {\n // criteria: { matchesFocus: true },\n // attributes: {\n // fillcolor: "lime",\n // penwidth: 2,\n // },\n // },\n // {\n // criteria: { matchesFocus: false },\n // attributes: {\n // fillcolor: "lightgrey",\n // },\n // },\n // {\n // criteria: { matchesReaches: true },\n // attributes: {\n // fillcolor: "lime",\n // penwidth: 2,\n // },\n // },\n // {\n // criteria: { matchesReaches: false },\n // attributes: {\n // fillcolor: "lightgrey",\n // },\n // },\n // {\n // criteria: { source: "^src/model" },\n // attributes: { fillcolor: "#ccccff" }\n // },\n // {\n // criteria: { source: "^src/view" },\n // attributes: { fillcolor: "#ccffcc" }\n // },\n // ],\n // dependencies: [\n // {\n // criteria: { "rules[0].severity": "error" },\n // attributes: { fontcolor: "red", color: "red" }\n // },\n // {\n // criteria: { "rules[0].severity": "warn" },\n // attributes: { fontcolor: "orange", color: "orange" }\n // },\n // {\n // criteria: { "rules[0].severity": "info" },\n // attributes: { fontcolor: "blue", color: "blue" }\n // },\n // {\n // criteria: { resolved: "^src/model" },\n // attributes: { color: "#0000ff77" }\n // },\n // {\n // criteria: { resolved: "^src/view" },\n // attributes: { color: "#00770077" }\n // }\n // ]\n // }\n },\n archi: {\n /* pattern of modules that can be consolidated in the high level\n graphical dependency graph. If you use the high level graphical\n dependency graph reporter (`archi`) you probably want to tweak\n this collapsePattern to your situation.\n */\n collapsePattern: \'^(packages|src|lib|app|bin|test(s?)|spec(s?))/[^/]+|node_modules/(@[^/]+/[^/]+|[^/]+)\',\n\n /* Options to tweak the appearance of your graph.See\n https://github.com/sverweij/dependency-cruiser/blob/main/doc/options-reference.md#reporteroptions\n for details and some examples. If you don\'t specify a theme\n for \'archi\' dependency-cruiser will use the one specified in the\n dot section (see above), if any, and otherwise use the default one.\n */\n // theme: {\n // },\n },\n "text": {\n "highlightFocused": true\n },\n }\n }\n};\n// generated: dependency-cruiser@'+l(typeof(u=null!=(u=c(t,"version")||(null!=n?c(n,"version"):n))?u:r)==a?u.call(i,{name:"version",hash:{},data:s,loc:{start:{line:535,column:33},end:{line:535,column:44}}}):u)+" on "+l(typeof(u=null!=(u=c(t,"date")||(null!=n?c(n,"date"):n))?u:r)==a?u.call(i,{name:"date",hash:{},data:s,loc:{start:{line:535,column:48},end:{line:535,column:56}}}):u)+"\n"},useData:!0});
@@ -1,4 +1,3 @@
1
- /* eslint-disable import/exports-last */
2
1
  // @ts-check
3
2
  import { readFileSync, readdirSync, accessSync, statSync, R_OK } from "node:fs";
4
3
  import { join } from "node:path";
@@ -1,4 +1,3 @@
1
- /* eslint-disable import/exports-last */
2
1
  /* eslint-disable security/detect-object-injection */
3
2
  import { writeFileSync } from "node:fs";
4
3
  import figures from "figures";
@@ -76,7 +76,7 @@ export default function setUpNDJSONListener(
76
76
  ) {
77
77
  let lState = {
78
78
  runStartTime: new Date(Date.now()).toISOString(),
79
- previousMessage: "starting nodejs",
79
+ previousMessage: "nodejs starting",
80
80
  previousTime: 0,
81
81
  previousUserUsage: 0,
82
82
  previousSystemUsage: 0,