@codependix/file-imports 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.0.9 (2026-10-08)
2
+
3
+ This was a version bump only for codependix-file-imports to align it with other projects, there were no code changes.
4
+
5
+ ## 0.0.8 (2026-10-08)
6
+
7
+ This was a version bump only for codependix-file-imports to align it with other projects, there were no code changes.
8
+
1
9
  ## 0.0.7 (2026-10-08)
2
10
 
3
11
  This was a version bump only for codependix-file-imports to align it with other projects, there were no code changes.
package/README.md CHANGED
@@ -260,13 +260,13 @@ None.
260
260
  ### Project
261
261
 
262
262
  ![Lines of Code](https://img.shields.io/badge/Lines_of_Code-2921-22c55e?style=flat-square)
263
- ![Repository Size](https://img.shields.io/badge/Repository_Size-107.49_kB-6b7280?style=flat-square)
263
+ ![Repository Size](https://img.shields.io/badge/Repository_Size-107.77_kB-6b7280?style=flat-square)
264
264
  ![Folders](https://img.shields.io/badge/Folders-6-4a4a4a?style=flat-square)
265
265
  ![Source Files](https://img.shields.io/badge/Source_Files-40-3178c6?style=flat-square)
266
266
 
267
267
  ### Measured Targets
268
268
 
269
- ![Compiled JavaScript Size](https://img.shields.io/badge/Compiled_JavaScript_Size-4.14_kB_gzip-6b7280?style=flat-square)
269
+ ![Compiled JavaScript Size](https://img.shields.io/badge/Compiled_JavaScript_Size-4.19_kB_gzip-6b7280?style=flat-square)
270
270
 
271
271
  ### TypeScript
272
272
 
@@ -448,14 +448,14 @@ None.
448
448
  ### Markdown
449
449
 
450
450
  ![Markdown Files](https://img.shields.io/badge/Markdown_Files-2-083fa1?style=flat-square)
451
- ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-239-1f6feb?style=flat-square)
451
+ ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-247-1f6feb?style=flat-square)
452
452
  ![H1](https://img.shields.io/badge/H1-1-7c3aed?style=flat-square)
453
- ![H2](https://img.shields.io/badge/H2-11-8b5cf6?style=flat-square)
453
+ ![H2](https://img.shields.io/badge/H2-13-8b5cf6?style=flat-square)
454
454
  ![H3](https://img.shields.io/badge/H3-13-a78bfa?style=flat-square)
455
455
  ![H4](https://img.shields.io/badge/H4-0-c4b5fd?style=flat-square)
456
456
  ![H5](https://img.shields.io/badge/H5-0-ddd6fe?style=flat-square)
457
457
  ![H6](https://img.shields.io/badge/H6-0-ede9fe?style=flat-square)
458
- ![Paragraphs](https://img.shields.io/badge/Paragraphs-49-64748b?style=flat-square)
458
+ ![Paragraphs](https://img.shields.io/badge/Paragraphs-51-64748b?style=flat-square)
459
459
  ![Lists](https://img.shields.io/badge/Lists-7-16a34a?style=flat-square)
460
460
  ![List Items](https://img.shields.io/badge/List_Items-26-22c55e?style=flat-square)
461
461
  ![Task List Items](https://img.shields.io/badge/Task_List_Items-0-4ade80?style=flat-square)
package/dist/src/index.js CHANGED
@@ -2,16 +2,16 @@ import { Injectable as e, Module as t } from "@nestjs/common";
2
2
  import { existsSync as n, readFileSync as r, readdirSync as i } from "node:fs";
3
3
  import a from "node:path";
4
4
  import o from "typescript";
5
- //#region packages/ic-suite/codependix/codependix-file-imports/src/modules/file-imports-workspace-graph/file-imports-workspace-graph.constants.ts
5
+ //#region \0rolldown/runtime.js
6
6
  var s = "_This workspace has no internal file imports, in any project._", c = "graph LR";
7
7
  //#endregion
8
8
  //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorateMetadata.js
9
- function l(e, t) {
9
+ function __decorateMetadata(e, t) {
10
10
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
11
11
  }
12
12
  //#endregion
13
13
  //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorate.js
14
- function u(e, t, n, r) {
14
+ function __decorate(e, t, n, r) {
15
15
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
16
16
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
17
17
  else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
@@ -19,7 +19,7 @@ function u(e, t, n, r) {
19
19
  }
20
20
  //#endregion
21
21
  //#region packages/ic-suite/codependix/codependix-file-imports/src/modules/file-imports-workspace-graph/file-imports-workspace-graph.service.ts
22
- var d = class {
22
+ var l = class FileImportsWorkspaceGraphService {
23
23
  constructor() {}
24
24
  compareEdges(e, t) {
25
25
  return e.source.localeCompare(t.source) || e.target.localeCompare(t.target);
@@ -56,19 +56,19 @@ var d = class {
56
56
  ].join("\n");
57
57
  }
58
58
  };
59
- d = u([e(), l("design:paramtypes", [])], d);
59
+ l = __decorate([e(), __decorateMetadata("design:paramtypes", [])], l);
60
60
  //#endregion
61
61
  //#region packages/ic-suite/codependix/codependix-file-imports/src/modules/file-imports-workspace-graph/file-imports-workspace-graph.module.ts
62
- var f = class {};
63
- f = u([t({
62
+ var u = class FileImportsWorkspaceGraphModule {};
63
+ u = __decorate([t({
64
64
  controllers: [],
65
- exports: [d],
65
+ exports: [l],
66
66
  imports: [],
67
- providers: [d]
68
- })], f);
67
+ providers: [l]
68
+ })], u);
69
69
  //#endregion
70
70
  //#region packages/ic-suite/codependix/codependix-file-imports/src/modules/python/python-import-parser.constants.ts
71
- var p = /^from\s+(?<dots>\.*)(?<modulePath>[\w.]*)\s+import\s+.+$/u, m = /^import\s+(?<specifiers>.+)$/u, h = /^(?<modulePath>[\w.]+)/u, g = /^(?:from|import)\b/u, _ = class {
71
+ var d = /^from\s+(?<dots>\.*)(?<modulePath>[\w.]*)\s+import\s+.+$/u, f = /^import\s+(?<specifiers>.+)$/u, p = /^(?<modulePath>[\w.]+)/u, m = /^(?:from|import)\b/u, h = class PythonImportParserService {
72
72
  constructor() {}
73
73
  collectStatement(e, t) {
74
74
  let n = 0, r = [], i = t;
@@ -89,13 +89,13 @@ var p = /^from\s+(?<dots>\.*)(?<modulePath>[\w.]*)\s+import\s+.+$/u, m = /^impor
89
89
  return e.split(t).length - 1;
90
90
  }
91
91
  isTopLevelImportStart(e) {
92
- return this.measureIndent(e) === 0 && g.test(this.stripComment(e).trim());
92
+ return this.measureIndent(e) === 0 && m.test(this.stripComment(e).trim());
93
93
  }
94
94
  measureIndent(e) {
95
95
  return e.length - e.trimStart().length;
96
96
  }
97
97
  parseFromStatement(e) {
98
- let t = p.exec(e);
98
+ let t = d.exec(e);
99
99
  if (t?.groups === void 0) return [];
100
100
  /* v8 ignore next 2 -- both named groups always participate in a
101
101
  successful match, even as an empty string, so they are never undefined */
@@ -106,8 +106,8 @@ var p = /^from\s+(?<dots>\.*)(?<modulePath>[\w.]*)\s+import\s+.+$/u, m = /^impor
106
106
  }];
107
107
  }
108
108
  parseImportStatement(e) {
109
- let t = m.exec(e);
110
- return t?.groups === void 0 ? [] : (t.groups.specifiers ?? "").split(",").map((e) => h.exec(e.trim())?.groups?.modulePath).filter((e) => e !== void 0).map((e) => ({
109
+ let t = f.exec(e);
110
+ return t?.groups === void 0 ? [] : (t.groups.specifiers ?? "").split(",").map((e) => p.exec(e.trim())?.groups?.modulePath).filter((e) => e !== void 0).map((e) => ({
111
111
  level: 0,
112
112
  modulePath: e
113
113
  }));
@@ -146,10 +146,10 @@ var p = /^from\s+(?<dots>\.*)(?<modulePath>[\w.]*)\s+import\s+.+$/u, m = /^impor
146
146
  return n;
147
147
  }
148
148
  };
149
- _ = u([e(), l("design:paramtypes", [])], _);
149
+ h = __decorate([e(), __decorateMetadata("design:paramtypes", [])], h);
150
150
  //#endregion
151
151
  //#region packages/ic-suite/codependix/codependix-file-imports/src/modules/python/python.constants.ts
152
- var v = "__init__.py", y = "graph LR", b = "_This project has no internal file imports._", x = /* @__PURE__ */ new Set([
152
+ var g = "__init__.py", _ = "graph LR", v = "_This project has no internal file imports._", y = /* @__PURE__ */ new Set([
153
153
  ".git",
154
154
  ".mypy_cache",
155
155
  ".pytest_cache",
@@ -157,14 +157,14 @@ var v = "__init__.py", y = "graph LR", b = "_This project has no internal file i
157
157
  ".venv",
158
158
  "__pycache__",
159
159
  "node_modules"
160
- ]), S = "language:python", C = class {
160
+ ]), b = "language:python", x = class PythonProjectService {
161
161
  constructor() {}
162
162
  listSourceFilesInDirectory(e) {
163
163
  let t = [];
164
164
  for (let n of i(e, { withFileTypes: !0 })) {
165
165
  let r = a.join(e, n.name);
166
166
  if (n.isDirectory()) {
167
- if (x.has(n.name)) continue;
167
+ if (y.has(n.name)) continue;
168
168
  t.push(...this.listSourceFilesInDirectory(r));
169
169
  } else n.name.endsWith(".py") && t.push(r);
170
170
  }
@@ -180,16 +180,16 @@ var v = "__init__.py", y = "graph LR", b = "_This project has no internal file i
180
180
  return e.filter((e) => this.isPythonProject(e)).map((e) => this.describeProject(e.absoluteRoot, e.name));
181
181
  }
182
182
  isPythonProject(e) {
183
- return e.tags.includes(S);
183
+ return e.tags.includes(b);
184
184
  }
185
185
  listSourceFileNames(e) {
186
186
  return this.listSourceFilesInDirectory(e.absoluteRoot).toSorted((e, t) => e.localeCompare(t));
187
187
  }
188
188
  };
189
- C = u([e(), l("design:paramtypes", [])], C);
189
+ x = __decorate([e(), __decorateMetadata("design:paramtypes", [])], x);
190
190
  //#endregion
191
191
  //#region packages/ic-suite/codependix/codependix-file-imports/src/modules/python/python-import-graph.service.ts
192
- var w = class {
192
+ var S = class PythonImportGraphService {
193
193
  pythonImportParserService;
194
194
  pythonProjectService;
195
195
  constructor(e, t) {
@@ -232,7 +232,7 @@ var w = class {
232
232
  let e = `${c}.py`;
233
233
  if (n(e)) return e;
234
234
  }
235
- let l = a.join(c, v);
235
+ let l = a.join(c, g);
236
236
  return n(l) ? l : void 0;
237
237
  }
238
238
  toNodeIdentifier(e) {
@@ -255,19 +255,19 @@ var w = class {
255
255
  };
256
256
  }
257
257
  renderMermaid(e) {
258
- return e.edges.length === 0 ? b : [
258
+ return e.edges.length === 0 ? v : [
259
259
  "```mermaid",
260
- y,
260
+ _,
261
261
  ...e.fileNames.map((e) => this.renderNode(e)),
262
262
  ...e.edges.map((e) => ` ${this.toNodeIdentifier(e.source)} --> ${this.toNodeIdentifier(e.target)}`),
263
263
  "```"
264
264
  ].join("\n");
265
265
  }
266
266
  };
267
- w = u([e(), l("design:paramtypes", [_ === void 0 ? Object : _, C === void 0 ? Object : C])], w);
267
+ S = __decorate([e(), __decorateMetadata("design:paramtypes", [h === void 0 ? Object : h, x === void 0 ? Object : x])], S);
268
268
  //#endregion
269
269
  //#region packages/ic-suite/codependix/codependix-file-imports/src/modules/python/python.service.ts
270
- var T = class {
270
+ var C = class PythonService {
271
271
  pythonImportGraphService;
272
272
  pythonProjectService;
273
273
  constructor(e, t) {
@@ -283,32 +283,32 @@ var T = class {
283
283
  return this.pythonImportGraphService.renderMermaid(e);
284
284
  }
285
285
  };
286
- T = u([e(), l("design:paramtypes", [w === void 0 ? Object : w, C === void 0 ? Object : C])], T);
286
+ C = __decorate([e(), __decorateMetadata("design:paramtypes", [S === void 0 ? Object : S, x === void 0 ? Object : x])], C);
287
287
  //#endregion
288
288
  //#region packages/ic-suite/codependix/codependix-file-imports/src/modules/python/python.module.ts
289
- var E = class {};
290
- E = u([t({
289
+ var w = class PythonModule {};
290
+ w = __decorate([t({
291
291
  controllers: [],
292
- exports: [T],
292
+ exports: [C],
293
293
  imports: [],
294
294
  providers: [
295
- w,
296
- _,
297
- C,
298
- T
295
+ S,
296
+ h,
297
+ x,
298
+ C
299
299
  ]
300
- })], E);
300
+ })], w);
301
301
  //#endregion
302
302
  //#region packages/ic-suite/codependix/codependix-file-imports/src/modules/typescript/typescript.constants.ts
303
- var D = ".d.ts", O = "graph LR", k = "_This project has no internal file imports._", A = "tsconfig.json", j = class extends Error {
303
+ var T = ".d.ts", E = "graph LR", D = "_This project has no internal file imports._", O = "tsconfig.json", TypescriptProjectConfigurationError = class extends Error {
304
304
  constructor(e) {
305
305
  super(`Could not read ${e.configurationPath}: ${e.messages.join("; ")}`), this.name = "TypescriptProjectConfigurationError";
306
306
  }
307
- }, M = class {
307
+ }, k = class TypescriptProjectService {
308
308
  constructor() {}
309
309
  parseConfiguration(e) {
310
310
  let t = o.readJsonConfigFile(e.tsconfigPath, (e) => o.sys.readFile(e)), n = o.parseJsonSourceFileConfigFileContent(t, o.sys, a.dirname(e.tsconfigPath), void 0, e.tsconfigPath);
311
- if (n.errors.length > 0) throw new j({
311
+ if (n.errors.length > 0) throw new TypescriptProjectConfigurationError({
312
312
  configurationPath: e.tsconfigPath,
313
313
  messages: n.errors.map((e) => o.flattenDiagnosticMessageText(e.messageText, " "))
314
314
  });
@@ -331,20 +331,20 @@ var D = ".d.ts", O = "graph LR", k = "_This project has no internal file imports
331
331
  return {
332
332
  absoluteRoot: e,
333
333
  name: t,
334
- tsconfigPath: a.join(e, A)
334
+ tsconfigPath: a.join(e, O)
335
335
  };
336
336
  }
337
337
  discoverProjects(e) {
338
- return e.filter((e) => n(a.join(e.absoluteRoot, A))).map((e) => this.describeProject(e.absoluteRoot, e.name));
338
+ return e.filter((e) => n(a.join(e.absoluteRoot, O))).map((e) => this.describeProject(e.absoluteRoot, e.name));
339
339
  }
340
340
  toRealPath(e) {
341
341
  return o.sys.realpath === void 0 ? e : o.sys.realpath(e);
342
342
  }
343
343
  };
344
- M = u([e(), l("design:paramtypes", [])], M);
344
+ k = __decorate([e(), __decorateMetadata("design:paramtypes", [])], k);
345
345
  //#endregion
346
346
  //#region packages/ic-suite/codependix/codependix-file-imports/src/modules/typescript/typescript-import-graph.service.ts
347
- var N = class {
347
+ var A = class TypescriptImportGraphService {
348
348
  typescriptProjectService;
349
349
  constructor(e) {
350
350
  this.typescriptProjectService = e;
@@ -380,7 +380,7 @@ var N = class {
380
380
  return [...t.values()].toSorted((e, t) => this.compareEdges(e, t));
381
381
  }
382
382
  listOwnedSourceFileNames(e) {
383
- return [...this.resolveOwnedFileNames(e)].filter((e) => !e.endsWith(D)).toSorted((e, t) => e.localeCompare(t));
383
+ return [...this.resolveOwnedFileNames(e)].filter((e) => !e.endsWith(T)).toSorted((e, t) => e.localeCompare(t));
384
384
  }
385
385
  renderNode(e) {
386
386
  return ` ${this.toNodeIdentifier(e)}["${e}"]`;
@@ -412,19 +412,19 @@ var N = class {
412
412
  };
413
413
  }
414
414
  renderMermaid(e) {
415
- return e.edges.length === 0 ? k : [
415
+ return e.edges.length === 0 ? D : [
416
416
  "```mermaid",
417
- O,
417
+ E,
418
418
  ...e.fileNames.map((e) => this.renderNode(e)),
419
419
  ...e.edges.map((e) => ` ${this.toNodeIdentifier(e.source)} --> ${this.toNodeIdentifier(e.target)}`),
420
420
  "```"
421
421
  ].join("\n");
422
422
  }
423
423
  };
424
- N = u([e(), l("design:paramtypes", [M === void 0 ? Object : M])], N);
424
+ A = __decorate([e(), __decorateMetadata("design:paramtypes", [k === void 0 ? Object : k])], A);
425
425
  //#endregion
426
426
  //#region packages/ic-suite/codependix/codependix-file-imports/src/modules/typescript/typescript.service.ts
427
- var P = class {
427
+ var j = class TypescriptService {
428
428
  typescriptImportGraphService;
429
429
  typescriptProjectService;
430
430
  constructor(e, t) {
@@ -443,19 +443,19 @@ var P = class {
443
443
  return this.typescriptImportGraphService.renderMermaid(e);
444
444
  }
445
445
  };
446
- P = u([e(), l("design:paramtypes", [N === void 0 ? Object : N, M === void 0 ? Object : M])], P);
446
+ j = __decorate([e(), __decorateMetadata("design:paramtypes", [A === void 0 ? Object : A, k === void 0 ? Object : k])], j);
447
447
  //#endregion
448
448
  //#region packages/ic-suite/codependix/codependix-file-imports/src/modules/typescript/typescript.module.ts
449
- var F = class {};
450
- F = u([t({
449
+ var M = class TypescriptModule {};
450
+ M = __decorate([t({
451
451
  controllers: [],
452
- exports: [P],
452
+ exports: [j],
453
453
  imports: [],
454
454
  providers: [
455
- N,
456
- M,
457
- P
455
+ A,
456
+ k,
457
+ j
458
458
  ]
459
- })], F);
459
+ })], M);
460
460
  //#endregion
461
- export { c as FILE_IMPORTS_WORKSPACE_GRAPH_MERMAID_HEADER, s as FILE_IMPORTS_WORKSPACE_GRAPH_UNCONNECTED, f as FileImportsWorkspaceGraphModule, d as FileImportsWorkspaceGraphService, w as PythonImportGraphService, _ as PythonImportParserService, E as PythonModule, C as PythonProjectService, T as PythonService, N as TypescriptImportGraphService, F as TypescriptModule, M as TypescriptProjectService, P as TypescriptService };
461
+ export { c as FILE_IMPORTS_WORKSPACE_GRAPH_MERMAID_HEADER, s as FILE_IMPORTS_WORKSPACE_GRAPH_UNCONNECTED, u as FileImportsWorkspaceGraphModule, l as FileImportsWorkspaceGraphService, S as PythonImportGraphService, h as PythonImportParserService, w as PythonModule, x as PythonProjectService, C as PythonService, A as TypescriptImportGraphService, M as TypescriptModule, k as TypescriptProjectService, j as TypescriptService };
package/package.json CHANGED
@@ -60,5 +60,5 @@
60
60
  "strict": true
61
61
  },
62
62
  "types": "./dist/src/index.d.ts",
63
- "version": "0.0.7"
63
+ "version": "0.0.9"
64
64
  }