@groma/scanner-angular 0.1.5 → 0.2.1
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/README.md +90 -54
- package/dist/index.js +19073 -21293
- package/dist/lib.d.ts +1 -3
- package/dist/lib.decorators.d.ts +1 -3
- package/dist/lib.decorators.legacy.d.ts +1 -3
- package/dist/lib.dom.asynciterable.d.ts +3 -26
- package/dist/lib.dom.d.ts +12638 -6942
- package/dist/lib.dom.iterable.d.ts +3 -556
- package/dist/lib.es2015.collection.d.ts +7 -4
- package/dist/lib.es2015.core.d.ts +2 -4
- package/dist/lib.es2015.d.ts +1 -3
- package/dist/lib.es2015.generator.d.ts +1 -3
- package/dist/lib.es2015.iterable.d.ts +2 -4
- package/dist/lib.es2015.promise.d.ts +1 -3
- package/dist/lib.es2015.proxy.d.ts +1 -3
- package/dist/lib.es2015.reflect.d.ts +1 -3
- package/dist/lib.es2015.symbol.d.ts +1 -3
- package/dist/lib.es2015.symbol.wellknown.d.ts +1 -3
- package/dist/lib.es2016.array.include.d.ts +1 -3
- package/dist/lib.es2016.d.ts +1 -3
- package/dist/lib.es2016.full.d.ts +1 -3
- package/dist/lib.es2016.intl.d.ts +1 -3
- package/dist/lib.es2017.arraybuffer.d.ts +1 -3
- package/dist/lib.es2017.d.ts +1 -3
- package/dist/lib.es2017.date.d.ts +1 -3
- package/dist/lib.es2017.full.d.ts +1 -3
- package/dist/lib.es2017.intl.d.ts +1 -3
- package/dist/lib.es2017.object.d.ts +1 -3
- package/dist/lib.es2017.sharedmemory.d.ts +1 -3
- package/dist/lib.es2017.string.d.ts +1 -3
- package/dist/lib.es2017.typedarrays.d.ts +1 -3
- package/dist/lib.es2018.asyncgenerator.d.ts +1 -3
- package/dist/lib.es2018.asynciterable.d.ts +1 -3
- package/dist/lib.es2018.d.ts +1 -3
- package/dist/lib.es2018.full.d.ts +1 -3
- package/dist/lib.es2018.intl.d.ts +1 -3
- package/dist/lib.es2018.promise.d.ts +1 -3
- package/dist/lib.es2018.regexp.d.ts +1 -3
- package/dist/lib.es2019.array.d.ts +1 -3
- package/dist/lib.es2019.d.ts +1 -3
- package/dist/lib.es2019.full.d.ts +1 -3
- package/dist/lib.es2019.intl.d.ts +1 -3
- package/dist/lib.es2019.object.d.ts +1 -3
- package/dist/lib.es2019.string.d.ts +1 -3
- package/dist/lib.es2019.symbol.d.ts +1 -3
- package/dist/lib.es2020.bigint.d.ts +5 -7
- package/dist/lib.es2020.d.ts +1 -3
- package/dist/lib.es2020.date.d.ts +1 -3
- package/dist/lib.es2020.full.d.ts +1 -3
- package/dist/lib.es2020.intl.d.ts +1 -3
- package/dist/lib.es2020.number.d.ts +1 -3
- package/dist/lib.es2020.promise.d.ts +1 -3
- package/dist/lib.es2020.sharedmemory.d.ts +1 -3
- package/dist/lib.es2020.string.d.ts +2 -4
- package/dist/lib.es2020.symbol.wellknown.d.ts +2 -4
- package/dist/lib.es2021.d.ts +1 -3
- package/dist/lib.es2021.full.d.ts +1 -3
- package/dist/lib.es2021.intl.d.ts +1 -3
- package/dist/lib.es2021.promise.d.ts +1 -3
- package/dist/lib.es2021.string.d.ts +1 -3
- package/dist/lib.es2021.weakref.d.ts +1 -3
- package/dist/lib.es2022.array.d.ts +1 -3
- package/dist/lib.es2022.d.ts +1 -3
- package/dist/lib.es2022.error.d.ts +1 -3
- package/dist/lib.es2022.full.d.ts +1 -3
- package/dist/lib.es2022.intl.d.ts +1 -3
- package/dist/lib.es2022.object.d.ts +1 -3
- package/dist/lib.es2022.regexp.d.ts +2 -4
- package/dist/lib.es2022.string.d.ts +1 -3
- package/dist/lib.es2023.array.d.ts +1 -3
- package/dist/lib.es2023.collection.d.ts +1 -3
- package/dist/lib.es2023.d.ts +1 -3
- package/dist/lib.es2023.full.d.ts +1 -3
- package/dist/lib.es2023.intl.d.ts +10 -4
- package/dist/lib.es2024.arraybuffer.d.ts +1 -3
- package/dist/lib.es2024.collection.d.ts +1 -3
- package/dist/lib.es2024.d.ts +1 -3
- package/dist/lib.es2024.full.d.ts +1 -3
- package/dist/lib.es2024.object.d.ts +1 -3
- package/dist/lib.es2024.promise.d.ts +1 -3
- package/dist/lib.es2024.regexp.d.ts +1 -3
- package/dist/lib.es2024.sharedmemory.d.ts +1 -3
- package/dist/lib.es2024.string.d.ts +1 -3
- package/dist/lib.es2025.collection.d.ts +94 -0
- package/dist/lib.es2025.d.ts +23 -0
- package/dist/{lib.esnext.float16.d.ts → lib.es2025.float16.d.ts} +1 -3
- package/dist/lib.es2025.full.d.ts +22 -0
- package/dist/lib.es2025.intl.d.ts +200 -0
- package/dist/{lib.esnext.iterator.d.ts → lib.es2025.iterator.d.ts} +1 -3
- package/dist/{lib.esnext.promise.d.ts → lib.es2025.promise.d.ts} +1 -3
- package/dist/lib.es2025.regexp.d.ts +30 -0
- package/dist/lib.es5.d.ts +22 -24
- package/dist/lib.es6.d.ts +1 -3
- package/dist/lib.esnext.array.d.ts +1 -3
- package/dist/lib.esnext.collection.d.ts +20 -69
- package/dist/lib.esnext.d.ts +6 -8
- package/dist/lib.esnext.date.d.ts +21 -0
- package/dist/lib.esnext.decorators.d.ts +1 -3
- package/dist/lib.esnext.disposable.d.ts +1 -3
- package/dist/lib.esnext.error.d.ts +1 -3
- package/dist/lib.esnext.full.d.ts +1 -3
- package/dist/lib.esnext.intl.d.ts +89 -3
- package/dist/lib.esnext.sharedmemory.d.ts +1 -3
- package/dist/lib.esnext.temporal.d.ts +485 -0
- package/dist/lib.esnext.typedarrays.d.ts +90 -0
- package/dist/lib.scripthost.d.ts +1 -3
- package/dist/lib.webworker.asynciterable.d.ts +3 -26
- package/dist/lib.webworker.d.ts +3396 -940
- package/dist/lib.webworker.importscripts.d.ts +1 -3
- package/dist/lib.webworker.iterable.d.ts +3 -325
- package/dist/typescript.cjs +2589 -1826
- package/package.json +26 -3
- 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
|
-
|
|
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
|
|
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
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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,
|
|
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,
|
|
51
|
-
to its existing owner. All member paths appear in
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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.
|
|
69
|
-
|
|
70
|
-
|
|
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:
|
|
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
|
|
135
|
-
the call
|
|
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
|
|
145
|
-
automatic Spring wiring,
|
|
146
|
-
expressions, output mutation, or exhaustive Angular
|
|
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
|
|
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
|
-
##
|
|
162
|
-
|
|
163
|
-
Run
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
files
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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.
|