@groma/scanner-angular 0.1.4 → 0.2.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 (113) hide show
  1. package/README.md +90 -54
  2. package/dist/index.js +19073 -21293
  3. package/dist/lib.d.ts +1 -3
  4. package/dist/lib.decorators.d.ts +1 -3
  5. package/dist/lib.decorators.legacy.d.ts +1 -3
  6. package/dist/lib.dom.asynciterable.d.ts +3 -26
  7. package/dist/lib.dom.d.ts +12638 -6942
  8. package/dist/lib.dom.iterable.d.ts +3 -556
  9. package/dist/lib.es2015.collection.d.ts +7 -4
  10. package/dist/lib.es2015.core.d.ts +2 -4
  11. package/dist/lib.es2015.d.ts +1 -3
  12. package/dist/lib.es2015.generator.d.ts +1 -3
  13. package/dist/lib.es2015.iterable.d.ts +2 -4
  14. package/dist/lib.es2015.promise.d.ts +1 -3
  15. package/dist/lib.es2015.proxy.d.ts +1 -3
  16. package/dist/lib.es2015.reflect.d.ts +1 -3
  17. package/dist/lib.es2015.symbol.d.ts +1 -3
  18. package/dist/lib.es2015.symbol.wellknown.d.ts +1 -3
  19. package/dist/lib.es2016.array.include.d.ts +1 -3
  20. package/dist/lib.es2016.d.ts +1 -3
  21. package/dist/lib.es2016.full.d.ts +1 -3
  22. package/dist/lib.es2016.intl.d.ts +1 -3
  23. package/dist/lib.es2017.arraybuffer.d.ts +1 -3
  24. package/dist/lib.es2017.d.ts +1 -3
  25. package/dist/lib.es2017.date.d.ts +1 -3
  26. package/dist/lib.es2017.full.d.ts +1 -3
  27. package/dist/lib.es2017.intl.d.ts +1 -3
  28. package/dist/lib.es2017.object.d.ts +1 -3
  29. package/dist/lib.es2017.sharedmemory.d.ts +1 -3
  30. package/dist/lib.es2017.string.d.ts +1 -3
  31. package/dist/lib.es2017.typedarrays.d.ts +1 -3
  32. package/dist/lib.es2018.asyncgenerator.d.ts +1 -3
  33. package/dist/lib.es2018.asynciterable.d.ts +1 -3
  34. package/dist/lib.es2018.d.ts +1 -3
  35. package/dist/lib.es2018.full.d.ts +1 -3
  36. package/dist/lib.es2018.intl.d.ts +1 -3
  37. package/dist/lib.es2018.promise.d.ts +1 -3
  38. package/dist/lib.es2018.regexp.d.ts +1 -3
  39. package/dist/lib.es2019.array.d.ts +1 -3
  40. package/dist/lib.es2019.d.ts +1 -3
  41. package/dist/lib.es2019.full.d.ts +1 -3
  42. package/dist/lib.es2019.intl.d.ts +1 -3
  43. package/dist/lib.es2019.object.d.ts +1 -3
  44. package/dist/lib.es2019.string.d.ts +1 -3
  45. package/dist/lib.es2019.symbol.d.ts +1 -3
  46. package/dist/lib.es2020.bigint.d.ts +5 -7
  47. package/dist/lib.es2020.d.ts +1 -3
  48. package/dist/lib.es2020.date.d.ts +1 -3
  49. package/dist/lib.es2020.full.d.ts +1 -3
  50. package/dist/lib.es2020.intl.d.ts +1 -3
  51. package/dist/lib.es2020.number.d.ts +1 -3
  52. package/dist/lib.es2020.promise.d.ts +1 -3
  53. package/dist/lib.es2020.sharedmemory.d.ts +1 -3
  54. package/dist/lib.es2020.string.d.ts +2 -4
  55. package/dist/lib.es2020.symbol.wellknown.d.ts +2 -4
  56. package/dist/lib.es2021.d.ts +1 -3
  57. package/dist/lib.es2021.full.d.ts +1 -3
  58. package/dist/lib.es2021.intl.d.ts +1 -3
  59. package/dist/lib.es2021.promise.d.ts +1 -3
  60. package/dist/lib.es2021.string.d.ts +1 -3
  61. package/dist/lib.es2021.weakref.d.ts +1 -3
  62. package/dist/lib.es2022.array.d.ts +1 -3
  63. package/dist/lib.es2022.d.ts +1 -3
  64. package/dist/lib.es2022.error.d.ts +1 -3
  65. package/dist/lib.es2022.full.d.ts +1 -3
  66. package/dist/lib.es2022.intl.d.ts +1 -3
  67. package/dist/lib.es2022.object.d.ts +1 -3
  68. package/dist/lib.es2022.regexp.d.ts +2 -4
  69. package/dist/lib.es2022.string.d.ts +1 -3
  70. package/dist/lib.es2023.array.d.ts +1 -3
  71. package/dist/lib.es2023.collection.d.ts +1 -3
  72. package/dist/lib.es2023.d.ts +1 -3
  73. package/dist/lib.es2023.full.d.ts +1 -3
  74. package/dist/lib.es2023.intl.d.ts +10 -4
  75. package/dist/lib.es2024.arraybuffer.d.ts +1 -3
  76. package/dist/lib.es2024.collection.d.ts +1 -3
  77. package/dist/lib.es2024.d.ts +1 -3
  78. package/dist/lib.es2024.full.d.ts +1 -3
  79. package/dist/lib.es2024.object.d.ts +1 -3
  80. package/dist/lib.es2024.promise.d.ts +1 -3
  81. package/dist/lib.es2024.regexp.d.ts +1 -3
  82. package/dist/lib.es2024.sharedmemory.d.ts +1 -3
  83. package/dist/lib.es2024.string.d.ts +1 -3
  84. package/dist/lib.es2025.collection.d.ts +94 -0
  85. package/dist/lib.es2025.d.ts +23 -0
  86. package/dist/{lib.esnext.float16.d.ts → lib.es2025.float16.d.ts} +1 -3
  87. package/dist/lib.es2025.full.d.ts +22 -0
  88. package/dist/lib.es2025.intl.d.ts +200 -0
  89. package/dist/{lib.esnext.iterator.d.ts → lib.es2025.iterator.d.ts} +1 -3
  90. package/dist/{lib.esnext.promise.d.ts → lib.es2025.promise.d.ts} +1 -3
  91. package/dist/lib.es2025.regexp.d.ts +30 -0
  92. package/dist/lib.es5.d.ts +22 -24
  93. package/dist/lib.es6.d.ts +1 -3
  94. package/dist/lib.esnext.array.d.ts +1 -3
  95. package/dist/lib.esnext.collection.d.ts +20 -69
  96. package/dist/lib.esnext.d.ts +6 -8
  97. package/dist/lib.esnext.date.d.ts +21 -0
  98. package/dist/lib.esnext.decorators.d.ts +1 -3
  99. package/dist/lib.esnext.disposable.d.ts +1 -3
  100. package/dist/lib.esnext.error.d.ts +1 -3
  101. package/dist/lib.esnext.full.d.ts +1 -3
  102. package/dist/lib.esnext.intl.d.ts +89 -3
  103. package/dist/lib.esnext.sharedmemory.d.ts +1 -3
  104. package/dist/lib.esnext.temporal.d.ts +485 -0
  105. package/dist/lib.esnext.typedarrays.d.ts +90 -0
  106. package/dist/lib.scripthost.d.ts +1 -3
  107. package/dist/lib.webworker.asynciterable.d.ts +3 -26
  108. package/dist/lib.webworker.d.ts +3396 -940
  109. package/dist/lib.webworker.importscripts.d.ts +1 -3
  110. package/dist/lib.webworker.iterable.d.ts +3 -325
  111. package/dist/typescript.cjs +2589 -1826
  112. package/package.json +25 -2
  113. package/validation.md +4 -4
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Angular scanner
2
2
 
3
3
  The Angular scanner adds explicit component source units and concrete
4
- external-template output bindings to the TypeScript scanner evidence. Enable it alongside the Java scanner for the
4
+ template output bindings to the TypeScript scanner evidence. Enable it alongside the Java scanner for the
5
5
  supported Maven and Angular application. Healthy scanners update the map; failed scanners retain their saved evidence.
6
6
 
7
7
  ## Build and install
8
8
 
9
- From the Groma checkout:
9
+ From the groma.md checkout:
10
10
 
11
11
  ```sh
12
12
  bun install --frozen-lockfile --ignore-scripts
@@ -24,50 +24,63 @@ The package contains a bundled ESM entry and TypeScript standard-library
24
24
  declarations. Consumers do not run a package build or installation script.
25
25
  The prototype package name is not a public publication commitment.
26
26
 
27
- The scanner reads each selected project's `tsconfig.json`, source entry points
28
- and external templates. The package supplies the compiler tools; project
29
- `node_modules`, application compilation and dependency installation are not
30
- required. Application code is never executed.
27
+ The scanner reads each selected project's TypeScript configs, sources and
28
+ templates. The package supplies the compiler tools; project `node_modules`,
29
+ application compilation and dependency installation are not required.
30
+ Application code is never executed.
31
31
 
32
32
  ## Compiler tooling
33
33
 
34
- The package pins `@angular/compiler` and `@angular/compiler-cli` to 21.2.17
35
- and its own TypeScript to 5.9.3. Angular 21.2 supports TypeScript 5.9;
36
- see the [official compatibility table](https://angular.dev/reference/versions).
37
- The TypeScript scanner uses its own 7.1 SDK. The package build resolves every
38
- compiler TypeScript import to the scanner's 5.9.3 installation before bundling,
39
- so workspace dependency hoisting cannot substitute Groma's compiler.
34
+ The package bundles `@angular/compiler` and its own TypeScript 6.0. Angular
35
+ supports that TypeScript, see the
36
+ [official compatibility table](https://angular.dev/reference/versions), and it
37
+ is the last release with the classic compiler API this scanner uses. The package
38
+ manifest pins the exact versions. A config
39
+ setting this TypeScript cannot read, such as an option from a newer TypeScript
40
+ or an extended config the checkout lacks, produces an `angular-unreadable-config`
41
+ warning; the rest of the config applies.
42
+ The TypeScript scanner uses the native TypeScript 7 SDK. The package build resolves every
43
+ compiler TypeScript import to the scanner's own installation before bundling,
44
+ so workspace dependency hoisting cannot substitute groma.md's compiler.
40
45
 
41
46
  Angular's template parser and selector matcher read template syntax. TypeScript
42
47
  resolves local class, property and handler identities. The adapter recognizes
43
- literal `@Component` metadata, direct standalone imports and Angular output
44
- API imports from source, even when the Angular package is absent.
48
+ literal `@Component` and `@Directive` metadata, standalone imports and Angular
49
+ output API imports from source, even when the Angular package is absent.
45
50
 
46
51
  ## Supported evidence
47
52
 
48
53
  Literal `templateUrl`, `styleUrl`, and `styleUrls` declarations associate a
49
- component class with its directly named local template and stylesheet files.
50
- Core uses that source unit to create one component, or attach new unowned files
51
- to its existing owner. All member paths appear in Code details. Inline content
52
- does not create files; ordinary imports, neighboring files, global styles, and
53
- transitive stylesheet imports do not become companion files. Shared companions
54
- and conflicting curated ownership follow the core source-unit review rules.
55
-
56
- A direct method call in an external template can bind a single resolved
57
- source output property to a source method with a body. TypeScript locates
58
- `emit()` calls on that exact property declaration. An emit inside an arrow
59
- callback belongs to that callback, not to the surrounding method.
54
+ component class with its directly named local template and stylesheet files,
55
+ with or without a selector. Core uses that source unit to create one component,
56
+ or attach new unowned files to its existing owner. All member paths appear in
57
+ Code details. A named file the checkout lacks is left out of the unit with an
58
+ `angular-missing-resource` warning. Inline content does not create files;
59
+ ordinary imports, neighboring files, global styles, and transitive stylesheet
60
+ imports do not become companion files. Shared companions and conflicting
61
+ curated ownership follow the core source-unit review rules.
62
+
63
+ A direct method call in a template, external or inline, can bind a single
64
+ resolved source output property to a source method with a body. The element
65
+ must match source components or directives that the parent imports directly,
66
+ through a spread, or in a constant array, and exactly one of them must declare
67
+ the output with `@Output()` or `output()`. TypeScript locates `emit()` and
68
+ `EventEmitter` `next()` calls on that exact property declaration. An emit
69
+ inside an arrow callback belongs to that callback, not to the surrounding
70
+ method. An emit in an event handler of the child's own template is template
71
+ code, an operation of its own at that handler in the template's file.
60
72
 
61
73
  The observation includes the emitting operation, handler operation, emit
62
- position, and HTML event attribute position. Positions are zero-based UTF-16
63
- offsets; binding and invocation lines are one-based. Named bindings use the
64
- existing shared supplied-callback rule. Ordinary TypeScript evidence can remain
65
- unresolved while Angular establishes the concrete binding.
74
+ position, and event attribute position. An inline template keeps the positions
75
+ of its class file. Positions are zero-based UTF-16 offsets; binding and
76
+ invocation lines are one-based. Named bindings use the existing shared
77
+ supplied-callback rule. Ordinary TypeScript evidence can remain unresolved
78
+ while Angular establishes the concrete binding.
66
79
 
67
80
  Angular reports `angular` Code provenance for its source contribution.
68
- The exact source path keeps one curated owner across both scanners. HTML edits
69
- participate in the existing watch lifecycle, as do CSS, SCSS, Sass, Less, and Stylus
70
- source edits. Repeat scans retain authored
81
+ The exact source path keeps one curated owner across both scanners. A change to
82
+ a file the include list names, such as a template or a CSS, SCSS, Sass, Less or
83
+ Stylus stylesheet, triggers a rescan. Repeat scans retain authored
71
84
  architecture, and compiler errors leave the previous complete map in place.
72
85
 
73
86
  In OKF, the result remains ordinary Code links and readable relationship rows.
@@ -92,12 +105,15 @@ here Angular, with the symbols of all those links.
92
105
  ## HTTP endpoints and requests
93
106
 
94
107
  The scanner reports [HTTP facts](../evidence.md#http-endpoints-and-requests) for
95
- Angular's `HttpClient`. An Angular application is a client: it serves no endpoint.
108
+ Angular's `HttpClient` and `httpResource`. An Angular application is a client:
109
+ it serves no endpoint.
96
110
 
97
111
  | Construct | Reported |
98
112
  | --- | --- |
99
113
  | `get`, `post`, `put`, `patch`, `delete`, `head`, `options` | Request with that method and the URL the first argument states |
100
114
  | `request(method, url)` | Request with that literal method; a computed method leaves the method out |
115
+ | `httpResource(() => url)` | GET request for the URL the function returns |
116
+ | `httpResource(() => ({ url, method }))` | Request with the stated method, GET without one |
101
117
 
102
118
  The receiver must hold the injected client: a constructor parameter property, a
103
119
  field, or a local whose declared type is `HttpClient`, or one that
@@ -131,8 +147,10 @@ ecosystem:
131
147
  literal environment base is the value in the source file, which an Angular
132
148
  build's `fileReplacements` can swap for another environment, so the reported
133
149
  path is the development one.
134
- 6. **File-location routes.** None: every request names the function that runs
135
- the call, and a call outside any function reports nothing.
150
+ 6. **File-location routes.** None: every request names the function, method or
151
+ constructor that runs the call. A field initializer runs in the class's
152
+ constructor, and an `httpResource` request belongs to the arrow function that
153
+ returns it. A call outside any of them reports nothing.
136
154
  7. **Constrained segments.** None: the scanner reports no endpoint, so it reads
137
155
  no route pattern.
138
156
  8. **Registration order.** None: without endpoints there is no route order to
@@ -140,34 +158,52 @@ ecosystem:
140
158
 
141
159
  ## Coverage limits
142
160
 
143
- This revision qualifies the CompanyMergeDialog output-to-parent-handler flow.
144
- It does not establish injected service receivers, routing, HTTP matching,
145
- automatic Spring wiring, inline-template bindings, arbitrary handler
146
- expressions, output mutation, or exhaustive Angular runtime behavior.
161
+ This revision qualifies the CompanyMergeDialog output-to-parent-handler flow
162
+ and ten public Angular repositories. It does not establish injected service
163
+ receivers, routing, HTTP matching, automatic Spring wiring, arbitrary handler
164
+ expressions, `model()` two-way bindings, output mutation, or exhaustive Angular
165
+ runtime behavior.
147
166
  Unresolved or unsupported event bindings produce
148
167
  `unsupported-angular-binding` diagnostics rather than relationships.
149
168
  DOM events and dependency-library outputs have no supported source output
150
169
  provider in this rule. Missing external types and unsupported bindings remain
151
170
  uncertain. Invalid TypeScript or template syntax fails the observation. Source
152
171
  scanning does not perform Angular application type checking. Nonliteral
153
- component metadata, module-based scopes and indirect imports are outside the
154
- supported binding extraction.
172
+ component metadata, module-based scopes and imports computed at runtime are
173
+ outside the supported binding extraction.
155
174
 
156
175
  Independent fixture tests load the built package and cover concrete callback
157
176
  endpoints, complementary TypeScript evidence, curated ownership, HTML-triggered
158
177
  rescan, failure preservation, the source outline, and the HTTP requests. See [fresh-checkout validation](../fresh-checkout-validation.md) for the
159
178
  real-project result and remaining release gates.
160
179
 
161
- ## Nested projects
162
-
163
- Run Groma from the repository root. The scanner finds package declarations in
164
- tracked and unignored files, including nested apps and libraries. Dependencies,
165
- dev dependencies, peer dependencies and optional dependencies identify candidates.
166
- A candidate also needs a tracked or unignored `tsconfig.json` and TypeScript source
167
- files belonging to that package, outside nested packages. Declaration files and
168
- inactive fixtures with a `.fixture` suffix do not qualify. Packages with only
169
- framework tooling dependencies are skipped. No matching project produces no evidence. Each compiler uses that project's configuration and local source;
170
- imported source in sibling repository libraries keeps its original source path.
171
- Readiness checks all selected projects. An invalid selected project fails this scanner's observation; other scanners
172
- can still update the architecture.
173
- Source and nested package/configuration changes use the shared scanner watch flow.
180
+ ## Projects
181
+
182
+ Run groma.md from the repository root. The scanner finds package declarations
183
+ among its files, including nested apps and libraries. Dependencies, dev
184
+ dependencies, peer dependencies and optional dependencies identify candidates;
185
+ a `package.json` that is not JSON declares none. A candidate also needs a
186
+ `tsconfig.json` among its files in its directory or below it, as an Nx
187
+ workspace keeps one in each project while declaring Angular once at its root,
188
+ and TypeScript source files belonging to that package, outside nested
189
+ candidates. Declaration files and inactive fixtures with a `.fixture`
190
+ suffix do not qualify. Packages with only framework tooling dependencies are
191
+ skipped. No matching project produces no evidence.
192
+
193
+ A project compiles its own TypeScript sources among the files groma.md hands
194
+ it. The package declares the default
195
+ [include and exclude lists](../index.md#selecting-source-files): it includes
196
+ `.ts` sources, HTML templates and stylesheets, `tsconfig*.json` configs, and the
197
+ `package.json`, `angular.json`, `project.json` and `nx.json` files the entry
198
+ reader reads, and excludes `*.spec.ts` and `*.test.ts` specs and the `.angular`,
199
+ `node_modules`, `dist`, `build` and `coverage` folders. A template or stylesheet
200
+ outside the files gets the `angular-missing-resource` warning, and the source
201
+ listing names files before exclusions. As in the
202
+ [TypeScript scanner](../typescript/index.md), each source compiles with the
203
+ deepest config that includes it, following the references of a solution config
204
+ that lists no files of its own; a source no config includes compiles with default
205
+ options. Imported source in sibling repository libraries keeps its original source
206
+ path and supplies child directives and values, but only its own project reports it.
207
+ Readiness reads every selected project's configs; invalid configuration or source
208
+ syntax fails this scanner's observation, and other scanners can still update the
209
+ architecture.