DevCompanion: Update
This commit is contained in:
parent
0b0285e68b
commit
94cc3fc424
3 changed files with 13 additions and 4 deletions
|
|
@ -48,13 +48,12 @@ export const settings = definePluginSettings({
|
|||
export default definePlugin({
|
||||
name: "DevCompanion",
|
||||
description: "Dev Companion Plugin. Please report anything not working or being weird (most likely its a bug) to sadan, either ping or dm, thanks!",
|
||||
authors: [Devs.Ven, Devs.sadan, Devs.Samwich],
|
||||
authors: [Devs.Ven, Devs.sadan],
|
||||
reporterTestable: ReporterTestable.None,
|
||||
isModified: true,
|
||||
settings,
|
||||
|
||||
toolboxActions: {
|
||||
"Reconnect"() {
|
||||
Reconnect() {
|
||||
socket?.close(1000, "Reconnecting");
|
||||
initWs(true);
|
||||
}
|
||||
|
|
@ -64,6 +63,10 @@ export default definePlugin({
|
|||
// if we're running the reporter, we need to initws in the reporter file to avoid a race condition
|
||||
if (!IS_DEV) throw new Error("This plugin requires dev mode to run, please build with pnpm build --dev");
|
||||
initWs();
|
||||
window.reconnectDevtools = () => {
|
||||
socket?.close(1000, "Reconnecting");
|
||||
initWs(true);
|
||||
};
|
||||
},
|
||||
|
||||
stop: stopWs,
|
||||
|
|
|
|||
|
|
@ -262,6 +262,9 @@ export function initWs(isManual = false) {
|
|||
case "Component":
|
||||
results = findAll(parsedArgs[0]);
|
||||
break;
|
||||
case "CssClasses":
|
||||
results = findAll(filters.byClassNames(...parsedArgs), { topLevelOnly: true });
|
||||
break;
|
||||
case "ByProps":
|
||||
results = findAll(filters.byProps(...parsedArgs));
|
||||
break;
|
||||
|
|
@ -373,6 +376,9 @@ export function initWs(isManual = false) {
|
|||
case "ByProps":
|
||||
results = findAll(filters.byProps(...parsedArgs));
|
||||
break;
|
||||
case "CssClasses":
|
||||
results = findAll(filters.byClassNames(...parsedArgs), { topLevelOnly: true });
|
||||
break;
|
||||
case "Store":
|
||||
results = findAll(filters.byStoreName(parsedArgs[0]));
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export type FindOrSearchData =
|
|||
} & _PrefixKeys<_CapitalizeKeys<FindData>, "find">);
|
||||
|
||||
export type AnyFindType =
|
||||
`find${"Component" | "ByProps" | "Store" | "ByCode" | "ModuleId" | "ComponentByCode" | ""}${"Lazy" | ""}`;
|
||||
`find${"Component" | "ByProps" | "CssClasses" | "Store" | "ByCode" | "ModuleId" | "ComponentByCode" | ""}${"Lazy" | ""}`;
|
||||
|
||||
export type StringNode = {
|
||||
type: "string";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue