rsbuild-plugin-dts 0.0.5 → 0.0.6
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 +2 -2
- package/dist/apiExtractor.js +5 -5
- package/dist/dts.js +8 -29
- package/dist/index.js +4 -4
- package/dist/tsc.js +4 -4
- package/dist/utils.js +9 -9
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
Rslib is a library build tool powered by [Rsbuild](https://rsbuild.dev). It allows library developers to leverage the knowledge and ecosystem of webpack and Rspack.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Documentation
|
|
10
10
|
|
|
11
|
-
https://
|
|
11
|
+
https://lib.rsbuild.dev/
|
|
12
12
|
|
|
13
13
|
## Contributing
|
|
14
14
|
|
package/dist/apiExtractor.js
CHANGED
|
@@ -3,11 +3,11 @@ import * as __WEBPACK_EXTERNAL_MODULE__microsoft_api_extractor__ from "@microsof
|
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE__rsbuild_core__ from "@rsbuild/core";
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_picocolors__ from "picocolors";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE__utils_js__ from "./utils.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_MODULE_node_path__;
|
|
7
|
+
const api_extractor_namespaceObject = __WEBPACK_EXTERNAL_MODULE__microsoft_api_extractor__;
|
|
8
|
+
const core_namespaceObject = __WEBPACK_EXTERNAL_MODULE__rsbuild_core__;
|
|
9
|
+
const external_picocolors_namespaceObject = __WEBPACK_EXTERNAL_MODULE_picocolors__;
|
|
10
|
+
const external_utils_js_namespaceObject = __WEBPACK_EXTERNAL_MODULE__utils_js__;
|
|
11
11
|
async function bundleDts(options) {
|
|
12
12
|
const { name, cwd, outDir, dtsExtension, banner, footer, dtsEntry = {
|
|
13
13
|
name: 'index',
|
package/dist/dts.js
CHANGED
|
@@ -5,34 +5,13 @@ import * as __WEBPACK_EXTERNAL_MODULE_picocolors__ from "picocolors";
|
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE_typescript__ from "typescript";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE__tsc_js__ from "./tsc.js";
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE__utils_js__ from "./utils.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// The require function
|
|
16
|
-
function __webpack_require__(moduleId) {
|
|
17
|
-
// Check if module is in cache
|
|
18
|
-
var cachedModule = __webpack_module_cache__[moduleId];
|
|
19
|
-
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
20
|
-
// Create a new module (and put it into the cache)
|
|
21
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
22
|
-
exports: {}
|
|
23
|
-
};
|
|
24
|
-
// Execute the module function
|
|
25
|
-
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
26
|
-
// Return the exports of the module
|
|
27
|
-
return module.exports;
|
|
28
|
-
} /************************************************************************/
|
|
29
|
-
var external_node_fs_namespaceObject = __WEBPACK_EXTERNAL_MODULE_node_fs__;
|
|
30
|
-
var external_node_path_namespaceObject = __WEBPACK_EXTERNAL_MODULE_node_path__;
|
|
31
|
-
var core_namespaceObject = __WEBPACK_EXTERNAL_MODULE__rsbuild_core__;
|
|
32
|
-
var external_picocolors_namespaceObject = __WEBPACK_EXTERNAL_MODULE_picocolors__;
|
|
33
|
-
var external_typescript_namespaceObject = __WEBPACK_EXTERNAL_MODULE_typescript__;
|
|
34
|
-
var external_tsc_js_namespaceObject = __WEBPACK_EXTERNAL_MODULE__tsc_js__;
|
|
35
|
-
var external_utils_js_namespaceObject = __WEBPACK_EXTERNAL_MODULE__utils_js__;
|
|
8
|
+
const external_node_fs_namespaceObject = __WEBPACK_EXTERNAL_MODULE_node_fs__;
|
|
9
|
+
const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_MODULE_node_path__;
|
|
10
|
+
const core_namespaceObject = __WEBPACK_EXTERNAL_MODULE__rsbuild_core__;
|
|
11
|
+
const external_picocolors_namespaceObject = __WEBPACK_EXTERNAL_MODULE_picocolors__;
|
|
12
|
+
const external_typescript_namespaceObject = __WEBPACK_EXTERNAL_MODULE_typescript__;
|
|
13
|
+
const external_tsc_js_namespaceObject = __WEBPACK_EXTERNAL_MODULE__tsc_js__;
|
|
14
|
+
const external_utils_js_namespaceObject = __WEBPACK_EXTERNAL_MODULE__utils_js__;
|
|
36
15
|
const isObject = (obj)=>'[object Object]' === Object.prototype.toString.call(obj);
|
|
37
16
|
// use !externals
|
|
38
17
|
const calcBundledPackages = (options)=>{
|
|
@@ -107,7 +86,7 @@ async function generateDts(data) {
|
|
|
107
86
|
}
|
|
108
87
|
const bundleDtsIfNeeded = async ()=>{
|
|
109
88
|
if (true === bundle) {
|
|
110
|
-
const { bundleDts } = await
|
|
89
|
+
const { bundleDts } = await import("./apiExtractor.js");
|
|
111
90
|
await bundleDts({
|
|
112
91
|
name,
|
|
113
92
|
cwd,
|
package/dist/index.js
CHANGED
|
@@ -4,10 +4,10 @@ import * as __WEBPACK_EXTERNAL_MODULE_node_child_process__ from "node:child_proc
|
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_node_path__ from "node:path";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE__rsbuild_core__ from "@rsbuild/core";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE__utils_js__ from "./utils.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_MODULE_node_child_process__;
|
|
8
|
+
const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_MODULE_node_path__;
|
|
9
|
+
const core_namespaceObject = __WEBPACK_EXTERNAL_MODULE__rsbuild_core__;
|
|
10
|
+
const external_utils_js_namespaceObject = __WEBPACK_EXTERNAL_MODULE__utils_js__;
|
|
11
11
|
var src_filename = __webpack_fileURLToPath__(import.meta.url);
|
|
12
12
|
var src_dirname = __webpack_dirname__(__webpack_fileURLToPath__(import.meta.url));
|
|
13
13
|
const PLUGIN_DTS_NAME = 'rsbuild:dts';
|
package/dist/tsc.js
CHANGED
|
@@ -2,10 +2,10 @@ import * as __WEBPACK_EXTERNAL_MODULE__rsbuild_core__ from "@rsbuild/core";
|
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE_picocolors__ from "picocolors";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_typescript__ from "typescript";
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE__utils_js__ from "./utils.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const core_namespaceObject = __WEBPACK_EXTERNAL_MODULE__rsbuild_core__;
|
|
6
|
+
const external_picocolors_namespaceObject = __WEBPACK_EXTERNAL_MODULE_picocolors__;
|
|
7
|
+
const external_typescript_namespaceObject = __WEBPACK_EXTERNAL_MODULE_typescript__;
|
|
8
|
+
const external_utils_js_namespaceObject = __WEBPACK_EXTERNAL_MODULE__utils_js__;
|
|
9
9
|
async function emitDts(options, onComplete, bundle = false, isWatch = false) {
|
|
10
10
|
const start = Date.now();
|
|
11
11
|
const { configPath, declarationDir, name, dtsExtension, banner, footer } = options;
|
package/dist/utils.js
CHANGED
|
@@ -7,15 +7,15 @@ import * as __WEBPACK_EXTERNAL_MODULE_fast_glob__ from "fast-glob";
|
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE_magic_string__ from "magic-string";
|
|
8
8
|
import * as __WEBPACK_EXTERNAL_MODULE_picocolors__ from "picocolors";
|
|
9
9
|
import * as __WEBPACK_EXTERNAL_MODULE_typescript__ from "typescript";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
const external_node_fs_namespaceObject = __WEBPACK_EXTERNAL_MODULE_node_fs__;
|
|
11
|
+
const promises_namespaceObject = __WEBPACK_EXTERNAL_MODULE_node_fs_promises__;
|
|
12
|
+
const external_node_os_namespaceObject = __WEBPACK_EXTERNAL_MODULE_node_os__;
|
|
13
|
+
const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_MODULE_node_path__;
|
|
14
|
+
const core_namespaceObject = __WEBPACK_EXTERNAL_MODULE__rsbuild_core__;
|
|
15
|
+
const external_fast_glob_namespaceObject = __WEBPACK_EXTERNAL_MODULE_fast_glob__;
|
|
16
|
+
const external_magic_string_namespaceObject = __WEBPACK_EXTERNAL_MODULE_magic_string__;
|
|
17
|
+
const external_picocolors_namespaceObject = __WEBPACK_EXTERNAL_MODULE_picocolors__;
|
|
18
|
+
const external_typescript_namespaceObject = __WEBPACK_EXTERNAL_MODULE_typescript__;
|
|
19
19
|
const { convertPathToPattern } = external_fast_glob_namespaceObject["default"];
|
|
20
20
|
function loadTsconfig(tsconfigPath) {
|
|
21
21
|
const configFile = external_typescript_namespaceObject["default"].readConfigFile(tsconfigPath, external_typescript_namespaceObject["default"].sys.readFile);
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rsbuild-plugin-dts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Dts plugin for Rsbuild",
|
|
5
|
-
"homepage": "https://
|
|
5
|
+
"homepage": "https://lib.rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/web-infra-dev/rslib/issues"
|
|
8
8
|
},
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"picocolors": "1.1.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@microsoft/api-extractor": "^7.47.
|
|
34
|
-
"@rsbuild/core": "1.0.
|
|
35
|
-
"rslib": "npm:@rslib/core@0.0.
|
|
36
|
-
"typescript": "^5.
|
|
33
|
+
"@microsoft/api-extractor": "^7.47.8",
|
|
34
|
+
"@rsbuild/core": "1.0.3",
|
|
35
|
+
"rslib": "npm:@rslib/core@0.0.5",
|
|
36
|
+
"typescript": "^5.6.2",
|
|
37
37
|
"@rslib/tsconfig": "0.0.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|