@pikku/inspector 0.12.34 → 0.12.35
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 +15 -0
- package/dist/add/add-http-route.js +4 -1
- package/dist/add/add-rpc-invocations.js +7 -0
- package/dist/inspector.js +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/utils/filter-inspector-state.js +43 -0
- package/dist/utils/load-addon-functions-meta.js +20 -14
- package/dist/utils/post-process.js +38 -13
- package/dist/utils/serialize-inspector-state.d.ts +1 -0
- package/dist/utils/serialize-inspector-state.js +2 -0
- package/package.json +2 -2
- package/run-tests.sh +4 -4
- package/src/add/add-http-route.ts +4 -1
- package/src/add/add-rpc-invocations.test.ts +113 -0
- package/src/add/add-rpc-invocations.ts +8 -0
- package/src/inspector.ts +1 -0
- package/src/types.ts +1 -0
- package/src/utils/filter-inspector-state.test.ts +231 -0
- package/src/utils/filter-inspector-state.ts +56 -0
- package/src/utils/load-addon-functions-meta.ts +26 -16
- package/src/utils/post-process.test.ts +254 -0
- package/src/utils/post-process.ts +41 -14
- package/src/utils/serialize-inspector-state.ts +11 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -155,6 +155,7 @@ export interface SerializableInspectorState {
|
|
|
155
155
|
exposedMeta: InspectorState['rpc']['exposedMeta']
|
|
156
156
|
exposedFiles: Array<[string, { path: string; exportedName: string }]>
|
|
157
157
|
invokedFunctions: string[]
|
|
158
|
+
invokedFunctionsByFile?: Array<[string, string[]]>
|
|
158
159
|
usedAddons: string[]
|
|
159
160
|
wireAddonDeclarations: Array<
|
|
160
161
|
[
|
|
@@ -379,6 +380,11 @@ export function serializeInspectorState(
|
|
|
379
380
|
exposedMeta: state.rpc.exposedMeta,
|
|
380
381
|
exposedFiles: Array.from(state.rpc.exposedFiles.entries()),
|
|
381
382
|
invokedFunctions: Array.from(state.rpc.invokedFunctions),
|
|
383
|
+
invokedFunctionsByFile: Array.from(
|
|
384
|
+
(
|
|
385
|
+
state.rpc.invokedFunctionsByFile ?? new Map<string, Set<string>>()
|
|
386
|
+
).entries()
|
|
387
|
+
).map(([file, fns]): [string, string[]] => [file, Array.from(fns)]),
|
|
382
388
|
usedAddons: Array.from(state.rpc.usedAddons),
|
|
383
389
|
wireAddonDeclarations: Array.from(
|
|
384
390
|
state.rpc.wireAddonDeclarations.entries()
|
|
@@ -565,6 +571,11 @@ export function deserializeInspectorState(
|
|
|
565
571
|
exposedMeta: data.rpc.exposedMeta,
|
|
566
572
|
exposedFiles: new Map(data.rpc.exposedFiles),
|
|
567
573
|
invokedFunctions: new Set(data.rpc.invokedFunctions),
|
|
574
|
+
invokedFunctionsByFile: new Map(
|
|
575
|
+
(data.rpc.invokedFunctionsByFile || []).map(
|
|
576
|
+
([file, fns]): [string, Set<string>] => [file, new Set(fns)]
|
|
577
|
+
)
|
|
578
|
+
),
|
|
568
579
|
usedAddons: new Set(data.rpc.usedAddons || []),
|
|
569
580
|
wireAddonDeclarations: new Map(data.rpc.wireAddonDeclarations || []),
|
|
570
581
|
wireAddonFiles: new Set(data.rpc.wireAddonFiles || []),
|