@rpack-dev/core 0.1.15 → 0.1.16
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 +1 -1
- package/dist/docs.json +6575 -5700
- package/dist/rpack-core-esm.bundle.js +1 -1
- package/dist/rpack-core-umd.bundle.js +1 -1
- package/dist/rpack-core.d.ts +20 -5
- package/package.json +1 -1
package/dist/rpack-core.d.ts
CHANGED
|
@@ -71,6 +71,11 @@ export declare abstract class RPPlatform {
|
|
|
71
71
|
protected constructor(id: string);
|
|
72
72
|
abstract createRPackInstance(constructor: (options: RPackConstructorOptions) => RPack): Promise<RPack>;
|
|
73
73
|
abstract createRPackThread(threadId: string, pluginKey: string): Promise<RPackThread>;
|
|
74
|
+
abstract restart(): void;
|
|
75
|
+
abstract addWindowFocusHandler(handler: () => void): void;
|
|
76
|
+
abstract removeWindowFocusHandler(handler: () => void): void;
|
|
77
|
+
abstract addWindowUnfocusHandler(handler: () => void): void;
|
|
78
|
+
abstract removeWindowUnfocusHandler(handler: () => void): void;
|
|
74
79
|
}
|
|
75
80
|
export declare abstract class RPackThread {
|
|
76
81
|
private readonly threadId;
|
|
@@ -186,6 +191,8 @@ export declare class DevPluginServerClient {
|
|
|
186
191
|
private socket?;
|
|
187
192
|
constructor(parent: DevPluginSource, port: number, manifest: DevPluginSourceServerManifest);
|
|
188
193
|
init(): void;
|
|
194
|
+
isConnected(): Promise<boolean>;
|
|
195
|
+
getManifest(): Promise<DevPluginSourceServerManifest>;
|
|
189
196
|
getAllPlugins(): AsyncIterableIterator<PluginManifest>;
|
|
190
197
|
getPlugin(groupId: string, pluginId: string): Promise<PluginManifest | null>;
|
|
191
198
|
getPluginArchive(groupId: string, pluginId: string): Promise<ArrayBuffer>;
|
|
@@ -200,15 +207,16 @@ export declare class DevPluginSource implements PluginSource {
|
|
|
200
207
|
private readonly rpack;
|
|
201
208
|
private portRanges;
|
|
202
209
|
private autoScanRate;
|
|
203
|
-
private
|
|
210
|
+
private currentScanPromise;
|
|
204
211
|
private autoScanTimeout;
|
|
205
|
-
private
|
|
206
|
-
private
|
|
212
|
+
private lastFoundServer;
|
|
213
|
+
private focusHandler;
|
|
207
214
|
constructor(rpack: RPack, portRanges: [
|
|
208
215
|
number,
|
|
209
216
|
number
|
|
210
217
|
][], autoScanRate: number);
|
|
211
|
-
performScan(): Promise<
|
|
218
|
+
performScan(): Promise<DevPluginServerClient | null>;
|
|
219
|
+
private __actualScan;
|
|
212
220
|
private scanPorts;
|
|
213
221
|
getRPack(): RPack;
|
|
214
222
|
getSourceId(): string;
|
|
@@ -218,6 +226,7 @@ export declare class DevPluginSource implements PluginSource {
|
|
|
218
226
|
getAllPlugins(): AsyncIterableIterator<PluginManifest>;
|
|
219
227
|
getPlugin(groupId: string, pluginId: string, version?: string): Promise<PluginManifest | null>;
|
|
220
228
|
getPluginArchive(groupId: string, pluginId: string, version: string): Promise<PluginArchive>;
|
|
229
|
+
removeServer(client: DevPluginServerClient): void;
|
|
221
230
|
}
|
|
222
231
|
export declare class FilteredIterableIterator<T> implements IterableIterator<T> {
|
|
223
232
|
private readonly it;
|
|
@@ -807,9 +816,14 @@ export interface DevPluginSourceS2RHelloPacket {
|
|
|
807
816
|
serverVersion: string;
|
|
808
817
|
serverBrand: string;
|
|
809
818
|
}
|
|
819
|
+
export interface DevPluginSourceS2ROverrideUpdatePacket {
|
|
820
|
+
id: "override_update";
|
|
821
|
+
name: string;
|
|
822
|
+
}
|
|
810
823
|
export interface DevPluginSourceS2RPackets {
|
|
811
824
|
"hello_response": DevPluginSourceS2RHelloPacket;
|
|
812
825
|
"plugin_update": DevPluginSourceS2RPluginUpdatePacket;
|
|
826
|
+
"override_update": DevPluginSourceS2ROverrideUpdatePacket;
|
|
813
827
|
}
|
|
814
828
|
export interface DevPluginSourceS2RPluginUpdatePacket {
|
|
815
829
|
id: "plugin_update";
|
|
@@ -823,7 +837,7 @@ export interface DevPluginSourceServerManifest {
|
|
|
823
837
|
version: string;
|
|
824
838
|
overrides?: {
|
|
825
839
|
secret: string;
|
|
826
|
-
modules: Record<string, boolean | undefined>;
|
|
840
|
+
modules: Record<string, boolean | undefined> | Record<KnownModules, boolean | undefined>;
|
|
827
841
|
};
|
|
828
842
|
websocketRefresh?: boolean;
|
|
829
843
|
}
|
|
@@ -1189,6 +1203,7 @@ export type H2WPackets = {
|
|
|
1189
1203
|
export type JSONLike = string | number | boolean | null | {
|
|
1190
1204
|
[key: string]: JSONLike;
|
|
1191
1205
|
} | JSONLike[];
|
|
1206
|
+
export type KnownModules = "@rpack-dev/core" | "@rpack-dev/platform-browser";
|
|
1192
1207
|
export type MappedDeserializedData<T> = T extends SerializedUndefined ? undefined : T extends SerializedJSON ? JSONLike : T extends SerializedRegistry ? Registry<any, any> : T extends SerializedError ? ErrorType : T extends SerializedObject ? SerializableObject : T extends SerializedRegistryEntry ? RegistryObject<any> : T extends SerializedFunction ? SerializableFunction : T extends {
|
|
1193
1208
|
"type": "well_known";
|
|
1194
1209
|
"kind": "RPack";
|