ngrx-entity-crud 19.2.6 → 19.4.0-beta.5
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 +156 -24
- package/devtools/agnostic-selectors.d.ts +32 -0
- package/devtools/agnostic-selectors.d.ts.map +1 -0
- package/devtools/idb-adapter.token.d.ts +11 -0
- package/devtools/idb-adapter.token.d.ts.map +1 -0
- package/devtools/index.d.ts +6 -0
- package/devtools/mask.d.ts +15 -0
- package/devtools/mask.d.ts.map +1 -0
- package/devtools/models.d.ts +93 -0
- package/devtools/models.d.ts.map +1 -0
- package/devtools/nec-dashboard.component.d.ts +46 -0
- package/devtools/nec-dashboard.component.d.ts.map +1 -0
- package/devtools/ngrx-entity-crud-devtools.d.ts.map +1 -0
- package/devtools/package.json +3 -0
- package/devtools/probes/nec-indexeddb-probe.service.d.ts +25 -0
- package/devtools/probes/nec-indexeddb-probe.service.d.ts.map +1 -0
- package/devtools/probes/nec-local-storage-probe.service.d.ts +27 -0
- package/devtools/probes/nec-local-storage-probe.service.d.ts.map +1 -0
- package/devtools/probes/nec-store-probe.service.d.ts +30 -0
- package/devtools/probes/nec-store-probe.service.d.ts.map +1 -0
- package/devtools/public-api.d.ts +16 -0
- package/devtools/public-api.d.ts.map +1 -0
- package/fesm2022/ngrx-entity-crud-devtools.mjs +1033 -0
- package/fesm2022/ngrx-entity-crud-devtools.mjs.map +1 -0
- package/package.json +5 -1
- package/schematics/collection.json +9 -4
- package/schematics/dashboard/files/primeng/__clazz@dasherize__/__clazz@dasherize__-main/__clazz@dasherize__-main.component.html +12 -0
- package/schematics/dashboard/files/primeng/__clazz@dasherize__/__clazz@dasherize__-main/__clazz@dasherize__-main.component.ts +14 -0
- package/schematics/dashboard/files/primeng/__clazz@dasherize__/__clazz@dasherize__-routing.module.ts +30 -0
- package/schematics/dashboard/files/primeng/__clazz@dasherize__/__clazz@dasherize__.module.ts +21 -0
- package/schematics/dashboard/index.d.ts +12 -0
- package/schematics/dashboard/index.js +71 -0
- package/schematics/dashboard/index.js.map +1 -0
- package/schematics/dashboard/index.ts +77 -0
- package/schematics/dashboard/schema.d.ts +21 -0
- package/schematics/dashboard/schema.json +31 -0
- package/schematics/lazy-report/index.d.ts +2 -0
- package/schematics/lazy-report/index.js +288 -0
- package/schematics/lazy-report/index.js.map +1 -0
- package/schematics/lazy-report/index.ts +332 -0
- package/schematics/lazy-report/schema.d.ts +23 -0
- package/schematics/lazy-report/schema.json +33 -0
- package/schematics/my-utility.d.ts +0 -16
- package/schematics/my-utility.js +0 -34
- package/schematics/my-utility.js.map +1 -1
- package/schematics/my-utility.ts +0 -51
- package/schematics/ng-add/files/src/app/root-store/selectors.ts +80 -19
- package/schematics/store/index.js +24 -14
- package/schematics/store/index.js.map +1 -1
- package/schematics/store/index.ts +26 -15
- package/schematics/store/schema.d.ts +8 -0
- package/schematics/store/schema.json +16 -0
- package/schematics/auth0/files/store/auth-store/actions.ts +0 -21
- package/schematics/auth0/files/store/auth-store/auth-store.module.ts +0 -32
- package/schematics/auth0/files/store/auth-store/auth.guard.ts +0 -44
- package/schematics/auth0/files/store/auth-store/authentication.service.ts +0 -32
- package/schematics/auth0/files/store/auth-store/conf.ts +0 -2
- package/schematics/auth0/files/store/auth-store/effects.ts +0 -59
- package/schematics/auth0/files/store/auth-store/index.d.ts +0 -13
- package/schematics/auth0/files/store/auth-store/index.ts +0 -13
- package/schematics/auth0/files/store/auth-store/login.component.ts +0 -75
- package/schematics/auth0/files/store/auth-store/names.ts +0 -3
- package/schematics/auth0/files/store/auth-store/profile.ts +0 -12
- package/schematics/auth0/files/store/auth-store/reducer.ts +0 -23
- package/schematics/auth0/files/store/auth-store/selectors.ts +0 -24
- package/schematics/auth0/files/store/auth-store/state.ts +0 -11
- package/schematics/auth0/index.d.ts +0 -2
- package/schematics/auth0/index.js +0 -66
- package/schematics/auth0/index.js.map +0 -1
- package/schematics/auth0/index.ts +0 -76
- package/schematics/auth0/schema.d.ts +0 -21
- package/schematics/auth0/schema.json +0 -21
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Commands for code generation:
|
|
|
4
4
|
- `store`: Generates a feature set containing an `entity`, `actions`, `reducer`, ... file.
|
|
5
5
|
- `section`: Generates a new Angular CRUD page containing an `list`, `detail`, `search`, ... file.
|
|
6
6
|
- `auth`: Generates a boilerplate for authentication implementation containing an `store section` and `components` file.
|
|
7
|
-
- `
|
|
7
|
+
- `lazy-report`: Scans the project and reports which stores are good candidates to become lazy.
|
|
8
8
|
|
|
9
9
|
# How to use it?
|
|
10
10
|
To create your first project, follow this [guide](https://github.com/jucasoft/ngrx-entity-crud-prime-ng-boilerplate).
|
|
@@ -49,8 +49,28 @@ Store type:
|
|
|
49
49
|
- Enum: `"CRUD-PLURAL", "CRUD-SINGULAR", "CRUD+GRAPHQL", "BASE"`
|
|
50
50
|
- Default: `false`
|
|
51
51
|
|
|
52
|
+
Store registration strategy:
|
|
53
|
+
- `eager`: the store is declared in the application `RootStoreModule` (historical behavior); reducers/effects are loaded at startup.
|
|
54
|
+
- `lazy`: the store is **not** registered in the root; the view feature module is responsible for importing `<Clazz>StoreModule`, so reducers/effects are loaded only when the section is opened.
|
|
55
|
+
|
|
56
|
+
- `--registration`
|
|
57
|
+
- Type: `string`
|
|
58
|
+
- Enum: `"eager", "lazy"`
|
|
59
|
+
- Optional. If omitted, the schematic asks interactively. In non-interactive runs (CI/scripts) it falls back to `eager`, so existing pipelines keep working unchanged.
|
|
60
|
+
|
|
61
|
+
> **Lazy mode notes**
|
|
62
|
+
> - With `--registration=lazy` nothing registers the store automatically: you must import `<Clazz>StoreModule` in the feature module generated for the view (e.g. `coin.module.ts`).
|
|
63
|
+
> - The generated slice is declared as **optional** in `root-store/state.ts`, because it does not exist in the runtime state until the section is loaded.
|
|
64
|
+
> - `root-store/selectors.ts` exposes the global loading/error selectors (`selectIsLoading`, `selectError`, `selectLoadingNames`) in a **store-agnostic** way: they scan the root state using the `EntityCrudBaseState` convention (every CRUD slice exposes `isLoading`/`error` at the top level), so lazily-registered stores contribute to the global loading/error state without coupling the root to any specific domain.
|
|
65
|
+
|
|
52
66
|
#### Examples
|
|
53
67
|
|
|
68
|
+
```sh
|
|
69
|
+
ng generate ngrx-entity-crud:store --name=coin --clazz=Coin --type=CRUD-PLURAL --registration=lazy
|
|
70
|
+
```
|
|
71
|
+
With `--registration=lazy` the store is not added to `RootStoreModule`; remember to import `CoinStoreModule` in the view feature module.
|
|
72
|
+
|
|
73
|
+
|
|
54
74
|
```sh
|
|
55
75
|
ng generate ngrx-entity-crud:store --name=coin --clazz=Coin --type=CRUD-PLURAL
|
|
56
76
|
```
|
|
@@ -242,50 +262,162 @@ UPDATE src/app/root-store/__clazz@dasherize__.state.ts (184 bytes)
|
|
|
242
262
|
UPDATE src/app/root-store/root-store.module.ts (1051 bytes)
|
|
243
263
|
```
|
|
244
264
|
|
|
245
|
-
##
|
|
265
|
+
## lazy-report
|
|
246
266
|
|
|
247
267
|
---
|
|
248
268
|
|
|
249
269
|
### Overview
|
|
250
270
|
|
|
251
|
-
|
|
271
|
+
Read-only analysis command. It scans the project and produces a report that maps each store to
|
|
272
|
+
the sections that use it, then suggests which stores are good candidates to be registered as
|
|
273
|
+
**lazy** (see the `--registration` option of the `store` command). Nothing is modified except the
|
|
274
|
+
generated report file: you decide what to convert.
|
|
275
|
+
|
|
276
|
+
How a store is classified:
|
|
277
|
+
- **candidato lazy**: used by exactly one section, and that section is on a lazy route (`loadChildren`).
|
|
278
|
+
- **multi-sezione**: used by more than one section (evaluate a shared lazy module).
|
|
279
|
+
- **tieni eager (usato dalla shell)**: referenced by the app shell (`core/`, `main/components`, `app.component`) — must stay eager.
|
|
280
|
+
- **sezione non lazy-routed**: its only section is loaded eagerly, so going lazy gives little benefit.
|
|
281
|
+
- **infra (eager)**: infrastructure store (e.g. `router-store`), excluded from candidates.
|
|
282
|
+
- **orfano**: not referenced by any section.
|
|
283
|
+
|
|
284
|
+
The scan is static and relies on the naming convention (`XxxStoreActions/Selectors/State/Module`).
|
|
285
|
+
Paths are read from `ngrx-entity-crud.conf.json` when present, otherwise defaults are used
|
|
286
|
+
(`src/app/root-store`, `src/app/main/views`, `src/app`).
|
|
252
287
|
|
|
253
288
|
### Command
|
|
254
289
|
|
|
255
290
|
```sh
|
|
256
|
-
ng generate ngrx-entity-crud:
|
|
291
|
+
ng generate ngrx-entity-crud:lazy-report [options]
|
|
257
292
|
```
|
|
258
293
|
|
|
294
|
+
### Options
|
|
295
|
+
|
|
296
|
+
Report file to write (relative to the workspace root); empty string = console only.
|
|
297
|
+
- `--output`
|
|
298
|
+
- Type: `string`
|
|
299
|
+
- Default: `lazy-report.md`
|
|
300
|
+
|
|
301
|
+
Format of the written report.
|
|
302
|
+
- `--format`
|
|
303
|
+
- Type: `string`
|
|
304
|
+
- Enum: `"md", "json"`
|
|
305
|
+
- Default: `md`
|
|
306
|
+
|
|
307
|
+
Infrastructure stores excluded from lazy candidates (folder names).
|
|
308
|
+
- `--infra-stores`
|
|
309
|
+
- Type: `string[]`
|
|
310
|
+
- Default: `["router-store"]`
|
|
311
|
+
|
|
312
|
+
Include detected persistence providers (localStorage/IndexedDB) from `package.json` in the report.
|
|
313
|
+
- `--storage`
|
|
314
|
+
- Type: `boolean`
|
|
315
|
+
- Default: `true`
|
|
316
|
+
|
|
317
|
+
The JSON report (`--format=json`) also includes a top-level `generatedAt` (ISO timestamp, for
|
|
318
|
+
staleness detection) and, per store, the structured booleans `lazyRoute` and `isLazyCandidate`
|
|
319
|
+
(so tools can correlate without parsing the textual `verdict`). When `--storage` is enabled it
|
|
320
|
+
adds a `storage` object `{ providers, source }`. The `{ paths, stores }` shape is unchanged
|
|
321
|
+
(additive, backward-compatible).
|
|
322
|
+
|
|
259
323
|
#### Examples
|
|
260
324
|
|
|
261
325
|
```sh
|
|
262
|
-
ng generate ngrx-entity-crud:
|
|
326
|
+
ng generate ngrx-entity-crud:lazy-report
|
|
327
|
+
ng generate ngrx-entity-crud:lazy-report --format=json --output=lazy-report.json
|
|
328
|
+
ng generate ngrx-entity-crud:lazy-report --output= # solo console
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
Example output (excerpt):
|
|
332
|
+
|
|
333
|
+
```md
|
|
334
|
+
| store | clazz | type | sezioni | n | lazy route | shell | verdetto |
|
|
335
|
+
|---|---|---|---|---|---|---|---|
|
|
336
|
+
| coin-store | Coin | CRUD-PLURAL | coin | 1 | si | no | candidato lazy |
|
|
337
|
+
| currency-store | Currency | CRUD-PLURAL | coin, invoice | 2 | si | no | multi-sezione (2) -> valuta modulo condiviso |
|
|
338
|
+
| menu-store | Menu | CRUD-PLURAL | - | 0 | - | si | tieni eager (usato dalla shell) |
|
|
263
339
|
```
|
|
264
340
|
|
|
265
|
-
|
|
341
|
+
## dashboard
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
### Overview
|
|
346
|
+
|
|
347
|
+
Scaffolds a **project dashboard** view with three runtime summaries: localStorage usage,
|
|
348
|
+
IndexedDB usage (agnostic to the persistence library you use), and NgRx stores + lazy-loading
|
|
349
|
+
candidates. The generated module is a thin PrimeNG wrapper that hosts `<nec-dashboard>`, the
|
|
350
|
+
standalone component exported by the secondary entry-point `ngrx-entity-crud/devtools`; all the
|
|
351
|
+
diagnostic logic lives in the library (versioned and tested), not in generated code.
|
|
352
|
+
|
|
353
|
+
By default it also generates `src/assets/lazy-report.json` (reusing `lazy-report --format=json`),
|
|
354
|
+
which the dashboard reads at runtime to correlate the loaded/lazy state of each store.
|
|
355
|
+
|
|
356
|
+
The dashboard can run in **production**: by default it shows only keys, sizes and counts — never
|
|
357
|
+
raw values. Value reveal is opt-in (`[allowRevealValues]="true"`) and always masks sensitive
|
|
358
|
+
patterns (token/JWT/email/secret); keys that look sensitive are flagged.
|
|
359
|
+
|
|
360
|
+
### Command
|
|
266
361
|
|
|
267
362
|
```sh
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
CREATE src/app/root-store/auth-store/auth.guard.ts (1359 bytes)
|
|
271
|
-
CREATE src/app/root-store/auth-store/authentication.service.ts (675 bytes)
|
|
272
|
-
CREATE src/app/root-store/auth-store/conf.ts (75 bytes)
|
|
273
|
-
CREATE src/app/root-store/auth-store/__clazz@dasherize__.effects.ts (1754 bytes)
|
|
274
|
-
CREATE src/app/root-store/auth-store/index.d.ts (271 bytes)
|
|
275
|
-
CREATE src/app/root-store/auth-store/index.ts (271 bytes)
|
|
276
|
-
CREATE src/app/root-store/auth-store/login.component.ts (2117 bytes)
|
|
277
|
-
CREATE src/app/root-store/auth-store/__clazz@dasherize__.names.ts (47 bytes)
|
|
278
|
-
CREATE src/app/root-store/auth-store/profile.ts (224 bytes)
|
|
279
|
-
CREATE src/app/root-store/auth-store/__clazz@dasherize__.reducer.ts (475 bytes)
|
|
280
|
-
CREATE src/app/root-store/auth-store/__clazz@dasherize__.selectors.ts (699 bytes)
|
|
281
|
-
CREATE src/app/root-store/auth-store/__clazz@dasherize__.state.ts (192 bytes)
|
|
363
|
+
ng generate ngrx-entity-crud:dashboard [options]
|
|
364
|
+
```
|
|
282
365
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
366
|
+
### Options
|
|
367
|
+
|
|
368
|
+
Feature name (drives the lazy route and the generated file names).
|
|
369
|
+
- `--clazz`
|
|
370
|
+
- Type: `string`
|
|
371
|
+
- Default: `Dashboard`
|
|
372
|
+
|
|
373
|
+
Generate the lazy-report JSON read by the dashboard.
|
|
374
|
+
- `--include-lazy-report`
|
|
375
|
+
- Type: `boolean`
|
|
376
|
+
- Default: `true`
|
|
377
|
+
|
|
378
|
+
Path of the generated lazy-report JSON.
|
|
379
|
+
- `--lazy-report-output`
|
|
380
|
+
- Type: `string`
|
|
381
|
+
- Default: `src/assets/lazy-report.json`
|
|
382
|
+
|
|
383
|
+
The name of the project.
|
|
384
|
+
- `--project`
|
|
385
|
+
- Type: `string`
|
|
386
|
+
|
|
387
|
+
#### Using the standalone component directly
|
|
388
|
+
|
|
389
|
+
If you prefer not to scaffold, import the component from the secondary entry-point and mount it
|
|
390
|
+
anywhere (e.g. behind a dev-only route):
|
|
391
|
+
|
|
392
|
+
```ts
|
|
393
|
+
import { NecDashboardComponent } from 'ngrx-entity-crud/devtools';
|
|
394
|
+
|
|
395
|
+
@Component({
|
|
396
|
+
standalone: true,
|
|
397
|
+
imports: [NecDashboardComponent],
|
|
398
|
+
template: `<nec-dashboard
|
|
399
|
+
lazyReportUrl="assets/lazy-report.json"
|
|
400
|
+
[idbDatabaseNames]="['NgRxStateStore']"
|
|
401
|
+
[allowRevealValues]="false"
|
|
402
|
+
[pollingMs]="0"></nec-dashboard>`,
|
|
403
|
+
})
|
|
404
|
+
export class DevPanelComponent {}
|
|
287
405
|
```
|
|
288
406
|
|
|
407
|
+
Inputs: `blacklist` / `whitelist` (`string[]`, filter store slices), `lazyReportUrl`
|
|
408
|
+
(default `assets/lazy-report.json`; empty string disables the static correlation),
|
|
409
|
+
`idbDatabaseNames` (`string[]`, DB names to inspect where `indexedDB.databases()` is unsupported —
|
|
410
|
+
Firefox / older Safari), `pollingMs` (`number`, auto-refresh; `0` = manual), `allowRevealValues`
|
|
411
|
+
(`boolean`, opt-in masked value reveal).
|
|
412
|
+
|
|
413
|
+
Notes:
|
|
414
|
+
- IndexedDB is introspected **agnostically** via native APIs (`indexedDB.databases()` + `count()`),
|
|
415
|
+
with an optional `NEC_IDB_ADAPTER` injection token for custom providers. Byte sizes per
|
|
416
|
+
record/store are not measurable; only record counts and the aggregate origin quota
|
|
417
|
+
(`navigator.storage.estimate()`) are shown.
|
|
418
|
+
- `<nec-dashboard>` requires Angular 17+ on the consumer (standalone component + control flow);
|
|
419
|
+
the main entry-point keeps the wider peer range.
|
|
420
|
+
|
|
289
421
|
## Running unit tests
|
|
290
422
|
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
291
423
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MemoizedSelector } from '@ngrx/store';
|
|
2
|
+
/**
|
|
3
|
+
* Versione FACTORY (parametrizzabile) dei selettori agnostici di loading/error che il
|
|
4
|
+
* template `ng-add` installa in `root-store/selectors.ts`.
|
|
5
|
+
*
|
|
6
|
+
* Il template resta invariato (retro-compatibilità): qui la logica è IDENTICA ma con
|
|
7
|
+
* `rootSelector`/`blacklist`/`whitelist` resi parametri invece che costanti hardcoded, così
|
|
8
|
+
* è riutilizzabile dal pacchetto npm (entry-point `ngrx-entity-crud/devtools`).
|
|
9
|
+
*
|
|
10
|
+
* Scandisce lo stato sfruttando la convenzione `EntityCrudBaseState`: ogni slice CRUD espone
|
|
11
|
+
* `isLoading: boolean` ed `error: string | null` al livello top.
|
|
12
|
+
*/
|
|
13
|
+
export interface AgnosticLoadingSelectorsOptions {
|
|
14
|
+
/** Selettore della radice da scandire (default: l'intero stato root). */
|
|
15
|
+
rootSelector?: (state: any) => Record<string, any>;
|
|
16
|
+
/** Chiavi di slice da escludere dallo scan. */
|
|
17
|
+
blacklist?: ReadonlyArray<string>;
|
|
18
|
+
/** Se valorizzata, considera SOLO queste chiavi (precede la blacklist). */
|
|
19
|
+
whitelist?: ReadonlyArray<string>;
|
|
20
|
+
}
|
|
21
|
+
export interface AgnosticLoadingSelectors {
|
|
22
|
+
/** Nomi delle slice attualmente in caricamento (`isLoading === true`). */
|
|
23
|
+
selectLoadingNames: MemoizedSelector<any, string[]>;
|
|
24
|
+
/** `true` se almeno una slice CRUD è in caricamento. */
|
|
25
|
+
selectIsLoading: MemoizedSelector<any, boolean>;
|
|
26
|
+
/** Elenco degli errori non vuoti presenti nelle slice CRUD. */
|
|
27
|
+
selectErrors: MemoizedSelector<any, string[]>;
|
|
28
|
+
/** Concatenazione degli errori non vuoti (stringa vuota se non ce ne sono). */
|
|
29
|
+
selectError: MemoizedSelector<any, string>;
|
|
30
|
+
}
|
|
31
|
+
export declare function createAgnosticLoadingSelectors(options?: AgnosticLoadingSelectorsOptions): AgnosticLoadingSelectors;
|
|
32
|
+
//# sourceMappingURL=agnostic-selectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agnostic-selectors.d.ts","sourceRoot":"","sources":["../../../libs/ngrx-entity-crud/devtools/agnostic-selectors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,+BAA+B;IAC9C,yEAAyE;IACzE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnD,+CAA+C;IAC/C,SAAS,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAClC,2EAA2E;IAC3E,SAAS,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,wBAAwB;IACvC,0EAA0E;IAC1E,kBAAkB,EAAE,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC;IACpD,wDAAwD;IACxD,eAAe,EAAE,gBAAgB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAChD,+DAA+D;IAC/D,YAAY,EAAE,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC;IAC9C,+EAA+E;IAC/E,WAAW,EAAE,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;CAC5C;AAOD,wBAAgB,8BAA8B,CAC5C,OAAO,GAAE,+BAAoC,GAC5C,wBAAwB,CAoC1B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { NecIdbAdapter } from './models';
|
|
3
|
+
/**
|
|
4
|
+
* Adapter IndexedDB OPZIONALE, agnostico rispetto alla libreria di persistenza.
|
|
5
|
+
*
|
|
6
|
+
* Fornendolo, il `NecIndexedDbProbeService` lo usa con priorità per enumerare i database
|
|
7
|
+
* (utile quando la libreria del consumer nasconde i nomi DB o su browser senza
|
|
8
|
+
* `indexedDB.databases()`, es. Firefox). Quando NON fornito, il probe usa solo le API native.
|
|
9
|
+
*/
|
|
10
|
+
export declare const NEC_IDB_ADAPTER: InjectionToken<NecIdbAdapter>;
|
|
11
|
+
//# sourceMappingURL=idb-adapter.token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"idb-adapter.token.d.ts","sourceRoot":"","sources":["../../../libs/ngrx-entity-crud/devtools/idb-adapter.token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,+BAAuD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility di privacy per la dashboard: poiché può girare anche in PRODUZIONE, i valori non
|
|
3
|
+
* vengono mai mostrati di default e — quando il consumer abilita esplicitamente il reveal —
|
|
4
|
+
* vengono comunque mascherati i pattern sensibili (token/JWT/email/segreti).
|
|
5
|
+
*/
|
|
6
|
+
/** `true` se il nome chiave suggerisce un contenuto sensibile (token, password, ecc.). */
|
|
7
|
+
export declare function looksSensitiveKey(key: string): boolean;
|
|
8
|
+
/** Redige nel testo i pattern sensibili comuni (JWT, email, token/hex lunghi). */
|
|
9
|
+
export declare function redactSensitive(value: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Valore "sicuro da mostrare": se la chiave è sensibile, nasconde tutto (mostra solo la
|
|
12
|
+
* lunghezza); altrimenti redige i pattern sensibili e tronca a `maxLength`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function maskValue(key: string, value: string, maxLength?: number): string;
|
|
15
|
+
//# sourceMappingURL=mask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mask.d.ts","sourceRoot":"","sources":["../../../libs/ngrx-entity-crud/devtools/mask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMrD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,SAAM,GAAG,MAAM,CAS7E"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modelli dei report prodotti dai probe della dashboard (`ngrx-entity-crud/devtools`).
|
|
3
|
+
*
|
|
4
|
+
* Sono volutamente indipendenti dai tipi del main entry-point: i probe leggono lo stato
|
|
5
|
+
* per CONVENZIONE (vedi `EntityCrudBaseState` in `src/lib/models.ts`), non per tipo, così
|
|
6
|
+
* il sotto-modulo `devtools` resta autonomo e agnostico rispetto alla persistenza usata.
|
|
7
|
+
*/
|
|
8
|
+
export interface NecStorageEntry {
|
|
9
|
+
key: string;
|
|
10
|
+
/** Byte verso la quota (UTF-16): `(key.length + value.length) * 2`. Metrica primaria. */
|
|
11
|
+
bytesUtf16: number;
|
|
12
|
+
/** Byte della serializzazione UTF-8 (`TextEncoder`/`Blob`). Metrica secondaria. */
|
|
13
|
+
bytesUtf8: number;
|
|
14
|
+
}
|
|
15
|
+
export interface NecStorageReport {
|
|
16
|
+
available: boolean;
|
|
17
|
+
type: 'local' | 'session';
|
|
18
|
+
entries: NecStorageEntry[];
|
|
19
|
+
count: number;
|
|
20
|
+
totalBytesUtf16: number;
|
|
21
|
+
totalBytesUtf8: number;
|
|
22
|
+
}
|
|
23
|
+
/** Stima quota AGGREGATA per-origine (localStorage + IndexedDB + Cache), non scorporabile. */
|
|
24
|
+
export interface NecQuotaEstimate {
|
|
25
|
+
available: boolean;
|
|
26
|
+
usage?: number;
|
|
27
|
+
quota?: number;
|
|
28
|
+
/** Non-standard (solo Chromium): byte per area. Assente su Firefox/Safari. */
|
|
29
|
+
usageDetails?: Record<string, number>;
|
|
30
|
+
}
|
|
31
|
+
export interface NecIdbStoreReport {
|
|
32
|
+
name: string;
|
|
33
|
+
/** Numero record (`objectStore.count()`); `null` se non determinabile. */
|
|
34
|
+
count: number | null;
|
|
35
|
+
}
|
|
36
|
+
export interface NecIdbDbReport {
|
|
37
|
+
name: string;
|
|
38
|
+
version: number | null;
|
|
39
|
+
stores: NecIdbStoreReport[];
|
|
40
|
+
note?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface NecIdbReport {
|
|
43
|
+
available: boolean;
|
|
44
|
+
/** `false` se non è stato possibile elencare i database (es. Firefox senza nomi forniti). */
|
|
45
|
+
enumerable: boolean;
|
|
46
|
+
/** Nome dell'adapter usato: `'native'`, il nome di un `NecIdbAdapter`, o `null`. */
|
|
47
|
+
adapter: string | null;
|
|
48
|
+
databases: NecIdbDbReport[];
|
|
49
|
+
note?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Punto di estensione agnostico: il consumer può fornire un adapter esplicito (via
|
|
53
|
+
* `NEC_IDB_ADAPTER`) per conteggi accurati quando la sua libreria di persistenza nasconde
|
|
54
|
+
* i nomi DB. Quando assente, il probe usa solo le API native.
|
|
55
|
+
*/
|
|
56
|
+
export interface NecIdbAdapter {
|
|
57
|
+
name: string;
|
|
58
|
+
isAvailable(): boolean;
|
|
59
|
+
listDatabases(): Promise<NecIdbDbReport[]>;
|
|
60
|
+
}
|
|
61
|
+
export type NecSliceKind = 'plural' | 'singular' | 'unknown';
|
|
62
|
+
export interface NecStoreSlice {
|
|
63
|
+
key: string;
|
|
64
|
+
kind: NecSliceKind;
|
|
65
|
+
isLoading: boolean;
|
|
66
|
+
isLoaded: boolean;
|
|
67
|
+
error: string | null;
|
|
68
|
+
/** Numero entità (solo slice `plural`). */
|
|
69
|
+
entityCount?: number;
|
|
70
|
+
responsesCount: number;
|
|
71
|
+
}
|
|
72
|
+
export type NecRuntimeStatus = 'loaded' | 'lazy-not-loaded' | 'unknown';
|
|
73
|
+
export interface NecLazyEntry {
|
|
74
|
+
name: string;
|
|
75
|
+
clazz?: string;
|
|
76
|
+
type?: string;
|
|
77
|
+
verdict?: string;
|
|
78
|
+
isLazyCandidate: boolean;
|
|
79
|
+
lazyRoute?: boolean;
|
|
80
|
+
sections: string[];
|
|
81
|
+
usedByShell: boolean;
|
|
82
|
+
runtimeStatus: NecRuntimeStatus;
|
|
83
|
+
}
|
|
84
|
+
export interface NecStoreReport {
|
|
85
|
+
slices: NecStoreSlice[];
|
|
86
|
+
loadingNames: string[];
|
|
87
|
+
errors: string[];
|
|
88
|
+
/** Presente solo se è stato fornito un `lazyReportUrl` e il fetch è riuscito. */
|
|
89
|
+
lazy?: NecLazyEntry[];
|
|
90
|
+
/** Timestamp ISO di generazione del `lazy-report.json` (per segnalare snapshot stantii). */
|
|
91
|
+
lazyReportGeneratedAt?: string;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../libs/ngrx-entity-crud/devtools/models.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,yFAAyF;IACzF,UAAU,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,8FAA8F;AAC9F,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;AAMD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,6FAA6F;IAC7F,UAAU,EAAE,OAAO,CAAC;IACpB,oFAAoF;IACpF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,IAAI,OAAO,CAAC;IACvB,aAAa,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;CAC5C;AAMD,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;AAE7D,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,iBAAiB,GAAG,SAAS,CAAC;AAExE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,gBAAgB,CAAC;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,iFAAiF;IACjF,IAAI,CAAC,EAAE,YAAY,EAAE,CAAC;IACtB,4FAA4F;IAC5F,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { NecIdbReport, NecQuotaEstimate, NecStorageReport, NecStoreReport } from './models';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* `<nec-dashboard>` — dashboard di gestione progetto plug-and-play.
|
|
6
|
+
*
|
|
7
|
+
* Standalone, OnPush, template HTML inline (nessun PrimeNG → importabile ovunque). Tre
|
|
8
|
+
* pannelli: localStorage, IndexedDB (agnostico), store NgRx + sezioni lazy. Per privacy
|
|
9
|
+
* mostra SOLO chiavi/dimensioni/conteggi, mai i valori grezzi. Refresh manuale di default;
|
|
10
|
+
* polling opt-in via `pollingMs`. Pensato per essere usabile anche in produzione.
|
|
11
|
+
*/
|
|
12
|
+
export declare class NecDashboardComponent implements OnInit, OnDestroy {
|
|
13
|
+
private readonly localStorageProbe;
|
|
14
|
+
private readonly indexedDbProbe;
|
|
15
|
+
private readonly storeProbe;
|
|
16
|
+
/** Chiavi di slice da escludere dallo scan dello store. */
|
|
17
|
+
blacklist: string[];
|
|
18
|
+
/** Se valorizzata, considera SOLO queste chiavi di slice (precede la blacklist). */
|
|
19
|
+
whitelist: string[];
|
|
20
|
+
/** URL del report statico (`lazy-report --format=json`); `null`/'' per disattivarlo. */
|
|
21
|
+
lazyReportUrl: string | null;
|
|
22
|
+
/** Nomi DB IndexedDB da ispezionare dove `databases()` non è supportato (es. Firefox). */
|
|
23
|
+
idbDatabaseNames: string[];
|
|
24
|
+
/** Intervallo di auto-refresh in ms; 0 = solo manuale (default). */
|
|
25
|
+
pollingMs: number;
|
|
26
|
+
/** Abilita il reveal opt-in dei valori localStorage (sempre mascherati). Default: false. */
|
|
27
|
+
allowRevealValues: boolean;
|
|
28
|
+
readonly busy: import("@angular/core").WritableSignal<boolean>;
|
|
29
|
+
readonly lastUpdated: import("@angular/core").WritableSignal<string>;
|
|
30
|
+
readonly storage: import("@angular/core").WritableSignal<NecStorageReport>;
|
|
31
|
+
readonly quota: import("@angular/core").WritableSignal<NecQuotaEstimate>;
|
|
32
|
+
readonly idb: import("@angular/core").WritableSignal<NecIdbReport>;
|
|
33
|
+
readonly storeReport: import("@angular/core").WritableSignal<NecStoreReport>;
|
|
34
|
+
readonly revealed: import("@angular/core").WritableSignal<Record<string, string>>;
|
|
35
|
+
private timer;
|
|
36
|
+
ngOnInit(): void;
|
|
37
|
+
ngOnDestroy(): void;
|
|
38
|
+
refresh(): Promise<void>;
|
|
39
|
+
/** Reveal opt-in di un valore localStorage, sempre passato per `maskValue` (privacy). */
|
|
40
|
+
reveal(key: string): void;
|
|
41
|
+
isSensitive(key: string): boolean;
|
|
42
|
+
formatBytes(n: number | undefined | null): string;
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NecDashboardComponent, never>;
|
|
44
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NecDashboardComponent, "nec-dashboard", never, { "blacklist": { "alias": "blacklist"; "required": false; }; "whitelist": { "alias": "whitelist"; "required": false; }; "lazyReportUrl": { "alias": "lazyReportUrl"; "required": false; }; "idbDatabaseNames": { "alias": "idbDatabaseNames"; "required": false; }; "pollingMs": { "alias": "pollingMs"; "required": false; }; "allowRevealValues": { "alias": "allowRevealValues"; "required": false; }; }, {}, never, never, true, never>;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=nec-dashboard.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nec-dashboard.component.d.ts","sourceRoot":"","sources":["../../../libs/ngrx-entity-crud/devtools/nec-dashboard.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,SAAS,EACT,MAAM,EAEP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;;AAM1F;;;;;;;GAOG;AACH,qBAsRa,qBAAsB,YAAW,MAAM,EAAE,SAAS;IAC7D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAuC;IACzE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAoC;IACnE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgC;IAE3D,2DAA2D;IAClD,SAAS,EAAE,MAAM,EAAE,CAAM;IAClC,oFAAoF;IAC3E,SAAS,EAAE,MAAM,EAAE,CAAM;IAClC,wFAAwF;IAC/E,aAAa,EAAE,MAAM,GAAG,IAAI,CAA6B;IAClE,0FAA0F;IACjF,gBAAgB,EAAE,MAAM,EAAE,CAAM;IACzC,oEAAoE;IAC3D,SAAS,SAAK;IACvB,4FAA4F;IACnF,iBAAiB,UAAS;IAEnC,QAAQ,CAAC,IAAI,kDAAiB;IAC9B,QAAQ,CAAC,WAAW,iDAA+B;IACnD,QAAQ,CAAC,OAAO,2DAAyC;IACzD,QAAQ,CAAC,KAAK,2DAAyC;IACvD,QAAQ,CAAC,GAAG,uDAAqC;IACjD,QAAQ,CAAC,WAAW,yDAAuC;IAC3D,QAAQ,CAAC,QAAQ,iEAAsC;IAEvD,OAAO,CAAC,KAAK,CAA+C;IAE5D,QAAQ,IAAI,IAAI;IAOhB,WAAW,IAAI,IAAI;IAOb,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAuB9B,yFAAyF;IACzF,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKzB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIjC,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM;yCA3EtC,qBAAqB;2CAArB,qBAAqB;CAuFjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngrx-entity-crud-devtools.d.ts","sourceRoot":"","sources":["../../../libs/ngrx-entity-crud/devtools/ngrx-entity-crud-devtools.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { NecIdbAdapter, NecIdbReport } from '../models';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Riepilogo IndexedDB AGNOSTICO rispetto alla libreria di persistenza.
|
|
5
|
+
*
|
|
6
|
+
* Priorità reale: (1) `NEC_IDB_ADAPTER` esplicito, (2) API native
|
|
7
|
+
* (`indexedDB.databases()` + `open()` + `count()`). NESSUN import di librerie di
|
|
8
|
+
* persistenza. Mostra il numero di record per object store; i byte per-store NON sono
|
|
9
|
+
* misurabili e non vengono promessi (solo la quota aggregata, altrove).
|
|
10
|
+
*/
|
|
11
|
+
export declare class NecIndexedDbProbeService {
|
|
12
|
+
private readonly adapter;
|
|
13
|
+
constructor(adapter: NecIdbAdapter | null);
|
|
14
|
+
/**
|
|
15
|
+
* @param fallbackDatabaseNames nomi DB da ispezionare quando `indexedDB.databases()` non
|
|
16
|
+
* è supportato (Firefox / Safari vecchi). Passa qui i nomi noti della tua persistenza.
|
|
17
|
+
* @param openTimeoutMs timeout per ogni `open()` (default 3000ms).
|
|
18
|
+
*/
|
|
19
|
+
read(fallbackDatabaseNames?: string[], openTimeoutMs?: number): Promise<NecIdbReport>;
|
|
20
|
+
private listDatabaseNames;
|
|
21
|
+
private inspectDatabase;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NecIndexedDbProbeService, [{ optional: true; }]>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NecIndexedDbProbeService>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=nec-indexeddb-probe.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nec-indexeddb-probe.service.d.ts","sourceRoot":"","sources":["../../../../libs/ngrx-entity-crud/devtools/probes/nec-indexeddb-probe.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAkB,YAAY,EAAoB,MAAM,WAAW,CAAC;;AAGzF;;;;;;;GAOG;AACH,qBACa,wBAAwB;IACc,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,aAAa,GAAG,IAAI;IAE/F;;;;OAIG;IACG,IAAI,CAAC,qBAAqB,GAAE,MAAM,EAAO,EAAE,aAAa,SAAO,GAAG,OAAO,CAAC,YAAY,CAAC;YA2C/E,iBAAiB;IAkB/B,OAAO,CAAC,eAAe;yCArEZ,wBAAwB;6CAAxB,wBAAwB;CA0KpC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { NecQuotaEstimate, NecStorageReport } from '../models';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Riepilogo di `localStorage` / `sessionStorage`.
|
|
5
|
+
*
|
|
6
|
+
* Sincrono per la lettura delle chiavi. NON espone i valori: solo chiavi e dimensioni
|
|
7
|
+
* (privacy). La metrica primaria verso la quota è UTF-16 `(key.length + value.length) * 2`,
|
|
8
|
+
* perché è ciò che conta verso il limite ~5-10MB; la metrica UTF-8 è secondaria.
|
|
9
|
+
*/
|
|
10
|
+
export declare class NecLocalStorageProbeService {
|
|
11
|
+
read(type?: 'local' | 'session'): NecStorageReport;
|
|
12
|
+
/**
|
|
13
|
+
* Legge ON-DEMAND il valore grezzo di una singola chiave (per il reveal esplicito in UI).
|
|
14
|
+
* Non viene mai incluso nel report: la dashboard lo richiede solo su azione dell'utente e lo
|
|
15
|
+
* maschera tramite `maskValue`.
|
|
16
|
+
*/
|
|
17
|
+
readValue(key: string, type?: 'local' | 'session'): string | null;
|
|
18
|
+
/**
|
|
19
|
+
* Stima quota AGGREGATA per-origine (include anche IndexedDB e Cache): NON è scorporabile
|
|
20
|
+
* per area. Può essere assente (Safari/contesto non sicuro) o arrotondata (anti-fingerprint).
|
|
21
|
+
*/
|
|
22
|
+
estimate(): Promise<NecQuotaEstimate>;
|
|
23
|
+
private utf8Bytes;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NecLocalStorageProbeService, never>;
|
|
25
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NecLocalStorageProbeService>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=nec-local-storage-probe.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nec-local-storage-probe.service.d.ts","sourceRoot":"","sources":["../../../../libs/ngrx-entity-crud/devtools/probes/nec-local-storage-probe.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAmB,gBAAgB,EAAC,MAAM,WAAW,CAAC;;AAE9E;;;;;;GAMG;AACH,qBACa,2BAA2B;IACtC,IAAI,CAAC,IAAI,GAAE,OAAO,GAAG,SAAmB,GAAG,gBAAgB;IA0D3D;;;;OAIG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,OAAO,GAAG,SAAmB,GAAG,MAAM,GAAG,IAAI;IAY1E;;;OAGG;IACG,QAAQ,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAsB3C,OAAO,CAAC,SAAS;yCAtGN,2BAA2B;6CAA3B,2BAA2B;CAuHvC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { NecStoreReport } from '../models';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
interface ProbeOptions {
|
|
4
|
+
blacklist?: string[];
|
|
5
|
+
whitelist?: string[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Riepilogo degli store NgRx a runtime.
|
|
9
|
+
*
|
|
10
|
+
* Enumera le slice CRUD montate per CONVENZIONE (`typeof value.isLoading === 'boolean'`,
|
|
11
|
+
* vedi `EntityCrudBaseState`), senza dipendere dai selettori per-dominio. Una slice lazy non
|
|
12
|
+
* ancora caricata semplicemente non ha la chiave nello stato root.
|
|
13
|
+
*/
|
|
14
|
+
export declare class NecStoreProbeService {
|
|
15
|
+
private readonly store;
|
|
16
|
+
/** Lettura sincrona dello stato root (NgRx emette il valore corrente all'iscrizione). */
|
|
17
|
+
read(opts?: ProbeOptions): NecStoreReport;
|
|
18
|
+
/** Come `read()`, ma correla con l'inventario statico di `lazy-report.json` (se raggiungibile). */
|
|
19
|
+
readWithLazyReport(url: string, opts?: ProbeOptions): Promise<NecStoreReport>;
|
|
20
|
+
private fetchLazyReport;
|
|
21
|
+
/**
|
|
22
|
+
* Best-effort: il root state usa `strings.underscore(name)` come chiave di slice, mentre il
|
|
23
|
+
* report usa il nome dasherizzato. (Fase 1: far emettere a `lazy-report` la feature key reale.)
|
|
24
|
+
*/
|
|
25
|
+
private toSliceKey;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NecStoreProbeService, never>;
|
|
27
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NecStoreProbeService>;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=nec-store-probe.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nec-store-probe.service.d.ts","sourceRoot":"","sources":["../../../../libs/ngrx-entity-crud/devtools/probes/nec-store-probe.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAA6B,cAAc,EAAgB,MAAM,WAAW,CAAC;;AAEpF,UAAU,YAAY;IACpB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;;GAMG;AACH,qBACa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAiB;IAEvC,yFAAyF;IACzF,IAAI,CAAC,IAAI,GAAE,YAAiB,GAAG,cAAc;IA4D7C,mGAAmG;IAC7F,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,cAAc,CAAC;YASzE,eAAe;IA6C7B;;;OAGG;IACH,OAAO,CAAC,UAAU;yCA3HP,oBAAoB;6CAApB,oBAAoB;CA8HhC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Secondary entry-point `ngrx-entity-crud/devtools`.
|
|
3
|
+
*
|
|
4
|
+
* Dashboard di gestione progetto: riepiloghi runtime di localStorage, IndexedDB (agnostico)
|
|
5
|
+
* e store NgRx + sezioni promovibili al lazy loading. Tree-shakable: chi non lo importa non
|
|
6
|
+
* lo paga nel bundle. Vedi `ngrx-entity-crud-dashboard-plan.md`.
|
|
7
|
+
*/
|
|
8
|
+
export * from './models';
|
|
9
|
+
export * from './idb-adapter.token';
|
|
10
|
+
export * from './agnostic-selectors';
|
|
11
|
+
export * from './mask';
|
|
12
|
+
export * from './probes/nec-local-storage-probe.service';
|
|
13
|
+
export * from './probes/nec-indexeddb-probe.service';
|
|
14
|
+
export * from './probes/nec-store-probe.service';
|
|
15
|
+
export * from './nec-dashboard.component';
|
|
16
|
+
//# sourceMappingURL=public-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../../libs/ngrx-entity-crud/devtools/public-api.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,QAAQ,CAAC;AACvB,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC"}
|