rsbuild-plugin-dts 0.13.3 → 0.15.0
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/dts.js +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -1
- package/package.json +4 -4
package/dist/dts.js
CHANGED
|
@@ -55,7 +55,8 @@ async function generateDts(data) {
|
|
|
55
55
|
const { bundle, dtsEntry, dtsEmitPath, tsconfigPath, tsConfigResult, name, cwd, build, isWatch, dtsExtension = '.d.ts', autoExternal = true, alias = {}, userExternals, apiExtractorOptions, banner, footer, redirect = {
|
|
56
56
|
path: true,
|
|
57
57
|
extension: false
|
|
58
|
-
}, tsgo } = data;
|
|
58
|
+
}, tsgo, loggerLevel } = data;
|
|
59
|
+
logger.level = loggerLevel;
|
|
59
60
|
if (!isWatch) logger.start(`generating declaration files... ${picocolors.dim(`(${name})`)}`);
|
|
60
61
|
const paths = mergeAliasWithTsConfigPaths(tsConfigResult.options.paths, alias);
|
|
61
62
|
if (Object.keys(paths).length > 0) tsConfigResult.options.paths = paths;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RsbuildConfig, type RsbuildPlugin } from '@rsbuild/core';
|
|
1
|
+
import { type LogLevel, type RsbuildConfig, type RsbuildPlugin } from '@rsbuild/core';
|
|
2
2
|
import type { ParsedCommandLine } from 'typescript';
|
|
3
3
|
export type DtsRedirect = {
|
|
4
4
|
path?: boolean;
|
|
@@ -41,6 +41,7 @@ export type DtsGenOptions = Omit<PluginDtsOptions, 'bundle'> & {
|
|
|
41
41
|
tsConfigResult: ParsedCommandLine;
|
|
42
42
|
userExternals?: NonNullable<RsbuildConfig['output']>['externals'];
|
|
43
43
|
apiExtractorOptions?: ApiExtractorOptions;
|
|
44
|
+
loggerLevel: LogLevel;
|
|
44
45
|
};
|
|
45
46
|
export declare const PLUGIN_DTS_NAME = "rsbuild:dts";
|
|
46
47
|
export declare const pluginDts: (options?: PluginDtsOptions) => RsbuildPlugin;
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,8 @@ const PLUGIN_DTS_NAME = 'rsbuild:dts';
|
|
|
10
10
|
const pluginDts = (options = {})=>({
|
|
11
11
|
name: PLUGIN_DTS_NAME,
|
|
12
12
|
setup (api) {
|
|
13
|
+
const loggerLevel = api.logger.level;
|
|
14
|
+
logger.level = loggerLevel;
|
|
13
15
|
let apiExtractorOptions = {};
|
|
14
16
|
if (options.bundle && 'object' == typeof options.bundle) apiExtractorOptions = {
|
|
15
17
|
...options.bundle
|
|
@@ -61,7 +63,8 @@ const pluginDts = (options = {})=>({
|
|
|
61
63
|
tsConfigResult,
|
|
62
64
|
name: environment.name,
|
|
63
65
|
cwd,
|
|
64
|
-
isWatch
|
|
66
|
+
isWatch,
|
|
67
|
+
loggerLevel: loggerLevel
|
|
65
68
|
};
|
|
66
69
|
childProcess.send(dtsGenOptions);
|
|
67
70
|
dtsPromises.push(new Promise((resolve)=>{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rsbuild-plugin-dts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Rsbuild plugin that supports emitting declaration files for TypeScript.",
|
|
5
5
|
"homepage": "https://rslib.rs",
|
|
6
6
|
"bugs": {
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@microsoft/api-extractor": "^7.52.13",
|
|
33
|
-
"@rsbuild/core": "~1.5.
|
|
34
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
33
|
+
"@rsbuild/core": "~1.5.13",
|
|
34
|
+
"@typescript/native-preview": "7.0.0-dev.20250928.1",
|
|
35
35
|
"magic-string": "^0.30.19",
|
|
36
36
|
"picocolors": "1.1.1",
|
|
37
37
|
"prebundle": "1.4.2",
|
|
38
38
|
"rsbuild-plugin-publint": "^0.3.3",
|
|
39
|
-
"rslib": "npm:@rslib/core@0.
|
|
39
|
+
"rslib": "npm:@rslib/core@0.14.0",
|
|
40
40
|
"tinyglobby": "0.2.14",
|
|
41
41
|
"tsconfig-paths": "^4.2.0",
|
|
42
42
|
"typescript": "^5.9.2",
|