@rsdoctor/core 2.0.0-rc.0 → 2.0.0-rc.2
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/dist/e.js +6030 -888
- package/dist/e.js.LICENSE.txt +1 -1
- package/dist/index.d.ts +458 -7
- package/dist/index.js +2519 -1684
- package/dist/index.js.LICENSE.txt +8 -2
- package/dist/probe-loader.d.ts +13 -0
- package/dist/proxy-loader.d.ts +36 -1
- package/dist/r.js +9218 -241
- package/dist/r.js.LICENSE.txt +57 -0
- package/package.json +26 -26
- package/dist/build-utils/build/chunks/assetsModules.d.ts +0 -23
- package/dist/build-utils/build/chunks/index.d.ts +0 -2
- package/dist/build-utils/build/chunks/rspack/transform.d.ts +0 -13
- package/dist/build-utils/build/envinfo.d.ts +0 -13
- package/dist/build-utils/build/file/cache.d.ts +0 -5
- package/dist/build-utils/build/file/index.d.ts +0 -3
- package/dist/build-utils/build/file/sharding.d.ts +0 -21
- package/dist/build-utils/build/index.d.ts +0 -10
- package/dist/build-utils/build/json.d.ts +0 -3
- package/dist/build-utils/build/loader/index.d.ts +0 -2
- package/dist/build-utils/build/loader/probeLoader.d.ts +0 -9
- package/dist/build-utils/build/loader/probeLoaderPlugin.d.ts +0 -6
- package/dist/build-utils/build/module-graph/index.d.ts +0 -1
- package/dist/build-utils/build/module-graph/rspack/transform.d.ts +0 -26
- package/dist/build-utils/build/process.d.ts +0 -2
- package/dist/build-utils/build/server.d.ts +0 -14
- package/dist/build-utils/build/utils/index.d.ts +0 -3
- package/dist/build-utils/build/utils/loader.d.ts +0 -20
- package/dist/build-utils/build/utils/parseBundle.d.ts +0 -12
- package/dist/build-utils/build/utils/plugin.d.ts +0 -5
- package/dist/build-utils/index.d.ts +0 -11
- package/dist/common/global-config.d.ts +0 -21
- package/dist/compat.d.ts +0 -34
- package/dist/error/error.d.ts +0 -35
- package/dist/error/index.d.ts +0 -2
- package/dist/error/transform.d.ts +0 -3
- package/dist/error/utils.d.ts +0 -4
- package/dist/inner-plugins/constants.d.ts +0 -6
- package/dist/inner-plugins/index.d.ts +0 -2
- package/dist/inner-plugins/loaders/proxy.d.ts +0 -7
- package/dist/inner-plugins/plugins/base.d.ts +0 -12
- package/dist/inner-plugins/plugins/bundle.d.ts +0 -15
- package/dist/inner-plugins/plugins/ensureModulesChunkGraph.d.ts +0 -34
- package/dist/inner-plugins/plugins/errors.d.ts +0 -12
- package/dist/inner-plugins/plugins/index.d.ts +0 -10
- package/dist/inner-plugins/plugins/loader.d.ts +0 -12
- package/dist/inner-plugins/plugins/plugins.d.ts +0 -8
- package/dist/inner-plugins/plugins/progress.d.ts +0 -8
- package/dist/inner-plugins/plugins/resolver.d.ts +0 -12
- package/dist/inner-plugins/plugins/rspack.d.ts +0 -9
- package/dist/inner-plugins/plugins/rules.d.ts +0 -8
- package/dist/inner-plugins/plugins/sourcemapTool.d.ts +0 -47
- package/dist/inner-plugins/plugins/summary.d.ts +0 -15
- package/dist/inner-plugins/utils/circleDetect.d.ts +0 -4
- package/dist/inner-plugins/utils/config.d.ts +0 -6
- package/dist/inner-plugins/utils/index.d.ts +0 -9
- package/dist/inner-plugins/utils/loader.d.ts +0 -10
- package/dist/inner-plugins/utils/normalize-config.d.ts +0 -32
- package/dist/inner-plugins/utils/openBrowser.d.ts +0 -1
- package/dist/inner-plugins/utils/plugin-common.d.ts +0 -11
- package/dist/inner-plugins/utils/plugin.d.ts +0 -4
- package/dist/inner-plugins/utils/ruleWarnings.d.ts +0 -2
- package/dist/inner-plugins/utils/sdk.d.ts +0 -8
- package/dist/logger.d.ts +0 -9
- package/dist/rspack-plugin/constants.d.ts +0 -9
- package/dist/rspack-plugin/index.d.ts +0 -1
- package/dist/rspack-plugin/plugin.d.ts +0 -55
- package/dist/rspack-plugin/session.d.ts +0 -19
- package/dist/rspack-plugin/writeStore.d.ts +0 -2
- package/dist/rule-utils/document/document.d.ts +0 -16
- package/dist/rule-utils/document/index.d.ts +0 -3
- package/dist/rule-utils/document/server.d.ts +0 -4
- package/dist/rule-utils/document/types.d.ts +0 -31
- package/dist/rule-utils/index.d.ts +0 -2
- package/dist/rule-utils/parser/asserts.d.ts +0 -81
- package/dist/rule-utils/parser/index.d.ts +0 -4
- package/dist/rule-utils/parser/parser.d.ts +0 -118
- package/dist/rule-utils/parser/types.d.ts +0 -30
- package/dist/rule-utils/parser/utils.d.ts +0 -27
- package/dist/rules/index.d.ts +0 -3
- package/dist/rules/linter.d.ts +0 -9
- package/dist/rules/rule.d.ts +0 -27
- package/dist/rules/rules/cjs-require/index.d.ts +0 -4
- package/dist/rules/rules/cjs-require/types.d.ts +0 -7
- package/dist/rules/rules/cross-chunks-package/index.d.ts +0 -4
- package/dist/rules/rules/cross-chunks-package/types.d.ts +0 -3
- package/dist/rules/rules/cross-chunks-package/utils.d.ts +0 -1
- package/dist/rules/rules/default-import-check/index.d.ts +0 -4
- package/dist/rules/rules/default-import-check/types.d.ts +0 -4
- package/dist/rules/rules/default-import-check/utils.d.ts +0 -10
- package/dist/rules/rules/duplicate-package/index.d.ts +0 -4
- package/dist/rules/rules/duplicate-package/types.d.ts +0 -24
- package/dist/rules/rules/duplicate-package/utils.d.ts +0 -3
- package/dist/rules/rules/ecma-version-check/htmlParserStub.d.ts +0 -3
- package/dist/rules/rules/ecma-version-check/index.d.ts +0 -5
- package/dist/rules/rules/ecma-version-check/types.d.ts +0 -13
- package/dist/rules/rules/esm-resolved-to-cjs/index.d.ts +0 -4
- package/dist/rules/rules/esm-resolved-to-cjs/types.d.ts +0 -8
- package/dist/rules/rules/index.d.ts +0 -2
- package/dist/rules/rules/loader-performance-optimization/index.d.ts +0 -4
- package/dist/rules/rules/loader-performance-optimization/types.d.ts +0 -22
- package/dist/rules/rules/loader-performance-optimization/utils.d.ts +0 -1
- package/dist/rules/rules/module-mixed-chunks/index.d.ts +0 -4
- package/dist/rules/rules/module-mixed-chunks/types.d.ts +0 -3
- package/dist/rules/rules/side-effects-only-imports/index.d.ts +0 -4
- package/dist/rules/rules/side-effects-only-imports/types.d.ts +0 -9
- package/dist/rules/utils.d.ts +0 -3
- package/dist/sdk/index.d.ts +0 -2
- package/dist/sdk/multiple/controller.d.ts +0 -26
- package/dist/sdk/multiple/index.d.ts +0 -2
- package/dist/sdk/multiple/primary.d.ts +0 -41
- package/dist/sdk/multiple/server.d.ts +0 -7
- package/dist/sdk/sdk/core.d.ts +0 -34
- package/dist/sdk/sdk/index.d.ts +0 -54
- package/dist/sdk/sdk/types.d.ts +0 -26
- package/dist/sdk/server/apis/alerts.d.ts +0 -5
- package/dist/sdk/server/apis/base.d.ts +0 -11
- package/dist/sdk/server/apis/bundle-diff.d.ts +0 -6
- package/dist/sdk/server/apis/data.d.ts +0 -6
- package/dist/sdk/server/apis/fs.d.ts +0 -5
- package/dist/sdk/server/apis/graph.d.ts +0 -12
- package/dist/sdk/server/apis/index.d.ts +0 -10
- package/dist/sdk/server/apis/loader.d.ts +0 -15
- package/dist/sdk/server/apis/plugin.d.ts +0 -6
- package/dist/sdk/server/apis/project.d.ts +0 -8
- package/dist/sdk/server/apis/renderer.d.ts +0 -6
- package/dist/sdk/server/apis/resolver.d.ts +0 -6
- package/dist/sdk/server/client.d.ts +0 -3
- package/dist/sdk/server/fakeServer.d.ts +0 -9
- package/dist/sdk/server/index.d.ts +0 -44
- package/dist/sdk/server/json-body.d.ts +0 -6
- package/dist/sdk/server/router.d.ts +0 -24
- package/dist/sdk/server/security.d.ts +0 -5
- package/dist/sdk/server/socket/api.d.ts +0 -15
- package/dist/sdk/server/socket/index.d.ts +0 -48
- package/dist/sdk/server/utils.d.ts +0 -6
- package/dist/sdk/utils/base.d.ts +0 -1
- package/dist/sdk/utils/constant.d.ts +0 -1
- package/dist/sdk/utils/date.d.ts +0 -1
- package/dist/sdk/utils/index.d.ts +0 -4
- package/dist/sdk/utils/manifestSharding.d.ts +0 -16
- package/dist/sdk/utils/openBrowser.d.ts +0 -4
- package/dist/sdk/utils/upload.d.ts +0 -2
- package/dist/sdk/utils/writeJson.d.ts +0 -1
- package/dist/sdk.d.ts +0 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/loader.d.ts +0 -24
- package/dist/types/plugin.d.ts +0 -22
- package/dist/types/rules.d.ts +0 -7
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Common, SDK, Thirdparty, Client } from '@rsdoctor/shared/types';
|
|
2
|
-
export * from './utils.js';
|
|
3
|
-
export type ISocketType = {
|
|
4
|
-
port: number;
|
|
5
|
-
socketUrl: string;
|
|
6
|
-
token: string;
|
|
7
|
-
};
|
|
8
|
-
export type RsdoctorServerOptions = {
|
|
9
|
-
innerClientPath?: string;
|
|
10
|
-
printServerUrl?: boolean;
|
|
11
|
-
cors?: SDK.RsdoctorServerConfig['cors'];
|
|
12
|
-
};
|
|
13
|
-
export declare class RsdoctorServer implements SDK.RsdoctorServerInstance {
|
|
14
|
-
protected sdk: SDK.RsdoctorBuilderSDKInstance;
|
|
15
|
-
private _server;
|
|
16
|
-
port: number;
|
|
17
|
-
private _socket?;
|
|
18
|
-
private disposed;
|
|
19
|
-
private _router;
|
|
20
|
-
private _innerClientPath;
|
|
21
|
-
private _printServerUrl;
|
|
22
|
-
private _cors;
|
|
23
|
-
private _socketToken;
|
|
24
|
-
constructor(sdk: SDK.RsdoctorBuilderSDKInstance, port?: number, config?: RsdoctorServerOptions);
|
|
25
|
-
get app(): SDK.RsdoctorServerInstance['app'];
|
|
26
|
-
get host(): string;
|
|
27
|
-
get origin(): string;
|
|
28
|
-
get socketUrl(): ISocketType;
|
|
29
|
-
get innerClientPath(): string;
|
|
30
|
-
private createInnerServer;
|
|
31
|
-
private resolveCorsOptions;
|
|
32
|
-
bootstrap(): Promise<void>;
|
|
33
|
-
protected wrapNextHandleFunction(method: 'GET' | 'POST', cb: (...args: Parameters<Thirdparty.connect.NextHandleFunction>) => Common.PlainObject | string): Thirdparty.connect.NextHandleFunction;
|
|
34
|
-
proxy(api: SDK.ServerAPI.API, method: 'GET' | 'POST', cb: (...args: Parameters<Thirdparty.connect.NextHandleFunction>) => Common.PlainObject | string): void;
|
|
35
|
-
get: SDK.RsdoctorServerInstance['get'];
|
|
36
|
-
post: SDK.RsdoctorServerInstance['post'];
|
|
37
|
-
getClientUrl(route: Client.RsdoctorClientRoutes, baselineUrl: string, currentUrl: string): string;
|
|
38
|
-
getClientUrl(route?: 'homepage'): string;
|
|
39
|
-
openClientPage(route: Client.RsdoctorClientRoutes, baselineUrl: string, currentUrl: string): Promise<void>;
|
|
40
|
-
openClientPage(route?: 'homepage'): Promise<void>;
|
|
41
|
-
sendAPIDataToClient<T extends SDK.ServerAPI.API | SDK.ServerAPI.APIExtends>(api: T, msg: SDK.ServerAPI.SocketResponseType<T>): void;
|
|
42
|
-
broadcast(): Promise<void>;
|
|
43
|
-
dispose: (exitCode?: number) => Promise<void>;
|
|
44
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Thirdparty } from '@rsdoctor/shared/types';
|
|
2
|
-
interface JsonBodyParserOptions {
|
|
3
|
-
limit?: number | string | ((req: Thirdparty.connect.IncomingMessage) => number | string);
|
|
4
|
-
}
|
|
5
|
-
export declare function jsonBodyParser(options?: JsonBodyParserOptions): Thirdparty.connect.NextHandleFunction;
|
|
6
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ServerResponse } from 'http';
|
|
2
|
-
import { Common, SDK, Thirdparty } from '@rsdoctor/shared/types';
|
|
3
|
-
import { BaseAPI } from './apis/base.js';
|
|
4
|
-
interface RouterOptions {
|
|
5
|
-
apis: Common.Constructor<typeof BaseAPI>[];
|
|
6
|
-
sdk: SDK.RsdoctorBuilderSDKInstance;
|
|
7
|
-
server: SDK.RsdoctorServerInstance;
|
|
8
|
-
}
|
|
9
|
-
export declare class Router {
|
|
10
|
-
protected options: RouterOptions;
|
|
11
|
-
static routes: {
|
|
12
|
-
/**
|
|
13
|
-
* - `key` is the constructor of object which used to match the API class
|
|
14
|
-
*/
|
|
15
|
-
get: Map<new (sdk: SDK.RsdoctorSDKInstance, server: SDK.RsdoctorServerInstance) => BaseAPI, [apiKey: PropertyKey, pathname: string][]>;
|
|
16
|
-
post: Map<new (sdk: SDK.RsdoctorSDKInstance, server: SDK.RsdoctorServerInstance) => BaseAPI, [apiKey: PropertyKey, pathname: string][]>;
|
|
17
|
-
};
|
|
18
|
-
static get(pathname: string): MethodDecorator;
|
|
19
|
-
static post(pathname: string): MethodDecorator;
|
|
20
|
-
constructor(options: RouterOptions);
|
|
21
|
-
setup(): Promise<void>;
|
|
22
|
-
wrapAPIFunction<T extends BaseAPI>(api: T, key: PropertyKey): (req: Thirdparty.connect.IncomingMessage, res: ServerResponse) => Promise<unknown>;
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const DEFAULT_ALLOWED_CORS_ORIGINS: RegExp;
|
|
2
|
-
export declare function isAllowedRequestOrigin(origin: string | string[] | undefined): boolean;
|
|
3
|
-
export declare function isAllowedRequestHost(host: string | string[] | undefined): boolean;
|
|
4
|
-
export declare function isAllowedCorsRequest(origin: string | string[] | undefined, host: string | string[] | undefined): boolean;
|
|
5
|
-
export declare function isAllowedOpenInEditorToken(token: string | null, expectedToken: string): boolean;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Data } from '@rsdoctor/shared/common-browser';
|
|
2
|
-
import { Manifest, SDK } from '@rsdoctor/shared/types';
|
|
3
|
-
interface SocketAPILoaderOptions {
|
|
4
|
-
sdk: SDK.RsdoctorBuilderSDKInstance;
|
|
5
|
-
}
|
|
6
|
-
export declare class SocketAPILoader implements Manifest.ManifestDataLoader {
|
|
7
|
-
protected options: SocketAPILoaderOptions;
|
|
8
|
-
protected dataLoader: Data.APIDataLoader;
|
|
9
|
-
constructor(options: SocketAPILoaderOptions);
|
|
10
|
-
loadManifest(): Promise<Manifest.RsdoctorManifestWithShardingFiles>;
|
|
11
|
-
loadData<T extends Manifest.RsdoctorManifestMappingKeys>(key: T): Promise<Manifest.InferManifestDataValue<T>>;
|
|
12
|
-
loadData(key: string): Promise<void>;
|
|
13
|
-
get loadAPIData(): <T extends SDK.ServerAPI.API | SDK.ServerAPI.APIExtends>(api: T, body: SDK.ServerAPI.InferRequestBodyType<T>) => Promise<SDK.ServerAPI.InferResponseType<T>>;
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Common, SDK } from '@rsdoctor/shared/types';
|
|
2
|
-
import type { Server } from 'http';
|
|
3
|
-
import WebSocket, { WebSocketServer } from 'ws';
|
|
4
|
-
import { SocketAPILoader } from './api.js';
|
|
5
|
-
interface SocketOptions {
|
|
6
|
-
sdk: SDK.RsdoctorBuilderSDKInstance;
|
|
7
|
-
server: Server;
|
|
8
|
-
port: number;
|
|
9
|
-
token: string;
|
|
10
|
-
}
|
|
11
|
-
type Subscription = {
|
|
12
|
-
api: SDK.ServerAPI.API;
|
|
13
|
-
body: Common.PlainObject | null;
|
|
14
|
-
};
|
|
15
|
-
type SubscriptionRecord = Subscription & {
|
|
16
|
-
count: number;
|
|
17
|
-
};
|
|
18
|
-
type ClientMessage = {
|
|
19
|
-
type?: string;
|
|
20
|
-
id?: string;
|
|
21
|
-
api?: SDK.ServerAPI.API;
|
|
22
|
-
body?: Common.PlainObject | null;
|
|
23
|
-
};
|
|
24
|
-
export declare class Socket {
|
|
25
|
-
protected options: SocketOptions;
|
|
26
|
-
protected server?: WebSocketServer;
|
|
27
|
-
protected clients: Set<WebSocket>;
|
|
28
|
-
protected loader: SocketAPILoader;
|
|
29
|
-
protected map: Map<string, SubscriptionRecord>;
|
|
30
|
-
protected clientSubscriptions: Map<WebSocket, Set<string>>;
|
|
31
|
-
constructor(options: SocketOptions);
|
|
32
|
-
bootstrap(): void;
|
|
33
|
-
attachClient(client: WebSocket): void;
|
|
34
|
-
handleClientMessage(raw: string, client?: WebSocket): Promise<void>;
|
|
35
|
-
protected handleAPIRequestMessage(message: ClientMessage, client?: WebSocket): Promise<void>;
|
|
36
|
-
getSubscriptions(): Subscription[];
|
|
37
|
-
protected saveRequestToMap<T extends SDK.ServerAPI.API>(api: T, body?: SDK.ServerAPI.InferRequestBodyType<T, null> | null, client?: WebSocket): void;
|
|
38
|
-
protected removeRequestFromMap<T extends SDK.ServerAPI.API>(api: T, body?: SDK.ServerAPI.InferRequestBodyType<T, null> | null, client?: WebSocket): void;
|
|
39
|
-
protected removeClientSubscriptions(client: WebSocket): void;
|
|
40
|
-
protected removeSubscriptionKey(key: string): void;
|
|
41
|
-
protected getSubscriptionKey(api: SDK.ServerAPI.API, body: Common.PlainObject | null): string;
|
|
42
|
-
protected getAPIResponse<T extends SDK.ServerAPI.API>(api: T, body: SDK.ServerAPI.InferRequestBodyType<T>): Promise<SDK.ServerAPI.SocketResponseType<SDK.ServerAPI.API>>;
|
|
43
|
-
protected timer: NodeJS.Immediate | undefined;
|
|
44
|
-
broadcast(): Promise<void>;
|
|
45
|
-
sendAPIData<T extends SDK.ServerAPI.API | SDK.ServerAPI.APIExtends>(api: T, payload: SDK.ServerAPI.SocketResponseType<T>): void;
|
|
46
|
-
dispose(): void;
|
|
47
|
-
}
|
|
48
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { SDK } from '@rsdoctor/shared/types';
|
|
2
|
-
export declare function getDataByPagination<T>(data: T[], pagination: SDK.ServerAPI.PaginationRequest): {
|
|
3
|
-
data: T[];
|
|
4
|
-
pagination: SDK.ServerAPI.PaginationResponse;
|
|
5
|
-
};
|
|
6
|
-
export declare function getLocalIpAddress(): string;
|
package/dist/sdk/utils/base.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function findRoot(startDir?: string): string | null;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const CLOUD_DIR: string;
|
package/dist/sdk/utils/date.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const formatLocalDate: (date: Date) => string;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const DEFAULT_MANIFEST_SHARD_SIZE: number;
|
|
2
|
-
interface WriteManifestShardsOptions {
|
|
3
|
-
index?: number;
|
|
4
|
-
shardSize?: number;
|
|
5
|
-
compressionLevel?: number;
|
|
6
|
-
}
|
|
7
|
-
export interface ManifestShardFile {
|
|
8
|
-
path: string;
|
|
9
|
-
basename: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Compress JSON fragments as one deflate stream, encode that stream as one
|
|
13
|
-
* continuous Base64 value, and write bounded physical shards.
|
|
14
|
-
*/
|
|
15
|
-
export declare function writeManifestShards(jsonFragments: string[], folder: string, options?: WriteManifestShardsOptions): Promise<ManifestShardFile[]>;
|
|
16
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function writeJsonAtomic(filePath: string, data: unknown): void;
|
package/dist/sdk.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './sdk/index.js';
|
package/dist/types/index.d.ts
DELETED
package/dist/types/loader.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Loader } from '@rsdoctor/shared/common-browser';
|
|
2
|
-
export interface ProxyLoaderInternalOptions {
|
|
3
|
-
/**
|
|
4
|
-
* A session marker registered as a loader build dependency so persistent
|
|
5
|
-
* caches are invalidated when a new Rsdoctor session starts.
|
|
6
|
-
*/
|
|
7
|
-
cacheMarkerPath?: string;
|
|
8
|
-
cwd: string;
|
|
9
|
-
/**
|
|
10
|
-
* the url host of http server(which used to collect data).
|
|
11
|
-
*/
|
|
12
|
-
host: string;
|
|
13
|
-
/**
|
|
14
|
-
* correct loader path.
|
|
15
|
-
*/
|
|
16
|
-
loader: string;
|
|
17
|
-
/** include the loader option */
|
|
18
|
-
hasOptions: boolean;
|
|
19
|
-
skipLoaders: string[];
|
|
20
|
-
}
|
|
21
|
-
export interface ProxyLoaderOptions {
|
|
22
|
-
[key: string]: any;
|
|
23
|
-
[Loader.LoaderInternalPropertyName]: ProxyLoaderInternalOptions;
|
|
24
|
-
}
|
package/dist/types/plugin.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Linter, Linter as LinterType, Plugin, SDK } from '@rsdoctor/shared/types';
|
|
2
|
-
export interface BasePluginInstance<T extends Plugin.BaseCompiler> {
|
|
3
|
-
apply: (compiler: T) => void;
|
|
4
|
-
[k: string]: any;
|
|
5
|
-
}
|
|
6
|
-
export interface InternalPlugin<T extends Plugin.BaseCompiler, Rules extends LinterType.ExtendRuleData[] = []> extends BasePluginInstance<T> {
|
|
7
|
-
readonly name: string;
|
|
8
|
-
readonly scheduler: RsdoctorPluginInstance<T, Rules>;
|
|
9
|
-
}
|
|
10
|
-
export interface RsdoctorPluginInstance<T extends Plugin.BaseCompiler, Rules extends LinterType.ExtendRuleData[] = []> extends BasePluginInstance<T> {
|
|
11
|
-
readonly name: string;
|
|
12
|
-
readonly options: Plugin.RsdoctorPluginOptionsNormalized<Rules>;
|
|
13
|
-
readonly sdk: SDK.RsdoctorBuilderSDKInstance;
|
|
14
|
-
readonly isRsdoctorPlugin: boolean;
|
|
15
|
-
_modulesGraphApplied?: boolean;
|
|
16
|
-
chunkGraph?: SDK.ChunkGraphInstance;
|
|
17
|
-
modulesGraph: SDK.ModuleGraphInstance;
|
|
18
|
-
ensureModulesChunksGraphApplied(compiler: T): void;
|
|
19
|
-
}
|
|
20
|
-
export type RsdoctorRspackPluginInstance<Rules extends LinterType.ExtendRuleData[] = []> = RsdoctorPluginInstance<Plugin.BaseCompilerType<'rspack'>, Rules>;
|
|
21
|
-
export type RsdoctorRspackPluginOptions<Rules extends LinterType.ExtendRuleData[]> = Plugin.RsdoctorRspackPluginOptions<Rules>;
|
|
22
|
-
export type RsdoctorRspackPluginOptionsNormalized<Rules extends Linter.ExtendRuleData[]> = Plugin.RsdoctorPluginOptionsNormalized<Rules>;
|