@rsdoctor/core 1.6.1 → 2.0.0-alpha.1
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/build-utils/build/chunks/assetsModules.d.ts +1 -1
- package/dist/build-utils/build/chunks/assetsModules.js +1 -1
- package/dist/build-utils/build/chunks/index.d.ts +0 -1
- package/dist/build-utils/build/chunks/index.js +0 -1
- package/dist/build-utils/build/chunks/rspack/transform.d.ts +1 -1
- package/dist/build-utils/build/chunks/rspack/transform.js +1 -1
- package/dist/build-utils/build/envinfo.d.ts +13 -0
- package/dist/build-utils/build/envinfo.js +60 -0
- package/dist/build-utils/build/file/cache.d.ts +5 -0
- package/dist/build-utils/build/file/cache.js +24 -0
- package/dist/build-utils/build/file/index.d.ts +3 -0
- package/dist/build-utils/build/file/index.js +5 -0
- package/dist/build-utils/build/file/sharding.d.ts +21 -0
- package/dist/build-utils/build/file/sharding.js +38 -0
- package/dist/build-utils/build/index.d.ts +5 -0
- package/dist/build-utils/build/index.js +11 -6
- package/dist/build-utils/build/json.d.ts +3 -0
- package/dist/build-utils/build/json.js +67 -0
- package/dist/build-utils/build/loader/probeLoader.d.ts +2 -2
- package/dist/build-utils/build/loader/probeLoader.js +4 -4
- package/dist/build-utils/build/loader/probeLoaderPlugin.d.ts +1 -1
- package/dist/build-utils/build/loader/probeLoaderPlugin.js +1 -1
- package/dist/build-utils/build/module-graph/index.d.ts +0 -3
- package/dist/build-utils/build/module-graph/index.js +0 -3
- package/dist/build-utils/build/module-graph/parser.d.ts +1 -1
- package/dist/build-utils/build/module-graph/parser.js +1 -1
- package/dist/build-utils/build/module-graph/rspack/transform.d.ts +1 -1
- package/dist/build-utils/build/module-graph/rspack/transform.js +7 -5
- package/dist/build-utils/build/module-graph/utils.d.ts +1 -1
- package/dist/build-utils/build/module-graph/utils.js +5 -4
- package/dist/build-utils/build/process.d.ts +2 -0
- package/dist/build-utils/build/process.js +18 -0
- package/dist/build-utils/build/server.d.ts +15 -0
- package/dist/build-utils/build/server.js +107 -0
- package/dist/build-utils/build/utils/loader.d.ts +2 -2
- package/dist/build-utils/build/utils/loader.js +10 -19
- package/dist/build-utils/build/utils/parseBundle.d.ts +1 -1
- package/dist/build-utils/build/utils/parseBundle.js +6 -8
- package/dist/build-utils/build/utils/plugin.d.ts +1 -1
- package/dist/build-utils/build/utils/plugin.js +1 -2
- package/dist/build-utils/index.d.ts +10 -0
- package/dist/build-utils/index.js +12 -2
- package/dist/collection.d.ts +1 -0
- package/dist/collection.js +2 -0
- package/dist/common/file.d.ts +2 -0
- package/dist/common/file.js +8 -0
- package/dist/common/global-config.d.ts +21 -0
- package/dist/common/global-config.js +33 -0
- package/dist/common/index.d.ts +4 -0
- package/dist/common/index.js +6 -0
- package/dist/common-browser.d.ts +1 -0
- package/dist/common-browser.js +2 -0
- package/dist/error/error.d.ts +35 -0
- package/dist/error/error.js +143 -0
- package/dist/error/index.d.ts +2 -0
- package/dist/error/index.js +3 -0
- package/dist/error/transform.d.ts +3 -0
- package/dist/error/transform.js +138 -0
- package/dist/error/utils.d.ts +4 -0
- package/dist/error/utils.js +23 -0
- package/dist/graph/index.d.ts +1 -0
- package/dist/graph/index.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -2
- package/dist/inner-plugins/constants.d.ts +1 -1
- package/dist/inner-plugins/constants.js +1 -1
- package/dist/inner-plugins/loaders/proxy.d.ts +4 -4
- package/dist/inner-plugins/plugins/base.d.ts +1 -1
- package/dist/inner-plugins/plugins/bundle.d.ts +1 -1
- package/dist/inner-plugins/plugins/bundle.js +4 -20
- package/dist/inner-plugins/plugins/ensureModulesChunkGraph.d.ts +6 -8
- package/dist/inner-plugins/plugins/ensureModulesChunkGraph.js +12 -77
- package/dist/inner-plugins/plugins/errors.d.ts +3 -3
- package/dist/inner-plugins/plugins/errors.js +6 -6
- package/dist/inner-plugins/plugins/index.d.ts +0 -1
- package/dist/inner-plugins/plugins/index.js +0 -1
- package/dist/inner-plugins/plugins/loader.d.ts +1 -1
- package/dist/inner-plugins/plugins/loader.js +8 -20
- package/dist/inner-plugins/plugins/plugins.d.ts +1 -1
- package/dist/inner-plugins/plugins/plugins.js +3 -3
- package/dist/inner-plugins/plugins/progress.d.ts +3 -3
- package/dist/inner-plugins/plugins/progress.js +16 -18
- package/dist/inner-plugins/plugins/resolver.d.ts +2 -3
- package/dist/inner-plugins/plugins/resolver.js +2 -2
- package/dist/inner-plugins/plugins/rspack.d.ts +8 -3
- package/dist/inner-plugins/plugins/rspack.js +18 -4
- package/dist/inner-plugins/plugins/rules.d.ts +1 -1
- package/dist/inner-plugins/plugins/rules.js +6 -6
- package/dist/inner-plugins/plugins/sourcemapTool.d.ts +2 -2
- package/dist/inner-plugins/plugins/sourcemapTool.js +2 -2
- package/dist/inner-plugins/plugins/summary.d.ts +1 -1
- package/dist/inner-plugins/plugins/summary.js +3 -3
- package/dist/inner-plugins/utils/config.d.ts +3 -4
- package/dist/inner-plugins/utils/config.js +4 -17
- package/dist/inner-plugins/utils/loader.d.ts +4 -7
- package/dist/inner-plugins/utils/loader.js +10 -36
- package/dist/inner-plugins/utils/normalize-config.d.ts +4 -7
- package/dist/inner-plugins/utils/openBrowser.d.ts +1 -0
- package/dist/inner-plugins/utils/openBrowser.js +55 -0
- package/dist/inner-plugins/utils/plugin-common.js +4 -4
- package/dist/inner-plugins/utils/plugin.d.ts +1 -1
- package/dist/inner-plugins/utils/plugin.js +1 -1
- package/dist/inner-plugins/utils/sdk.d.ts +2 -3
- package/dist/inner-plugins/utils/sdk.js +2 -2
- package/dist/logger.d.ts +9 -0
- package/dist/logger.js +51 -0
- package/dist/{inner-plugins/constants.d.cts → rspack-plugin/constants.d.ts} +4 -1
- package/dist/rspack-plugin/constants.js +23 -0
- package/dist/rspack-plugin/index.d.ts +2 -0
- package/dist/rspack-plugin/index.js +3 -0
- package/dist/rspack-plugin/multiple.d.ts +8 -0
- package/dist/rspack-plugin/multiple.js +39 -0
- package/dist/rspack-plugin/plugin.d.ts +25 -0
- package/dist/rspack-plugin/plugin.js +133 -0
- package/dist/rule-utils/document/document.d.ts +16 -0
- package/dist/rule-utils/document/document.js +46 -0
- package/dist/rule-utils/document/index.d.ts +3 -0
- package/dist/rule-utils/document/index.js +4 -0
- package/dist/rule-utils/document/server.d.ts +4 -0
- package/dist/rule-utils/document/server.js +13 -0
- package/dist/rule-utils/document/types.d.ts +31 -0
- package/dist/rule-utils/index.d.ts +2 -0
- package/dist/rule-utils/index.js +3 -0
- package/dist/rule-utils/parser/asserts.d.ts +81 -0
- package/dist/rule-utils/parser/asserts.js +105 -0
- package/dist/rule-utils/parser/index.d.ts +4 -0
- package/dist/rule-utils/parser/index.js +5 -0
- package/dist/rule-utils/parser/parser.d.ts +118 -0
- package/dist/rule-utils/parser/parser.js +24 -0
- package/dist/rule-utils/parser/types.d.ts +30 -0
- package/dist/rule-utils/parser/types.js +8 -0
- package/dist/rule-utils/parser/utils.d.ts +30 -0
- package/dist/rule-utils/parser/utils.js +106 -0
- package/dist/rules/linter.d.ts +1 -1
- package/dist/rules/linter.js +1 -1
- package/dist/rules/rule.d.ts +2 -2
- package/dist/rules/rule.js +2 -2
- package/dist/rules/rules/cjs-require/index.d.ts +1 -1
- package/dist/rules/rules/cjs-require/index.js +3 -3
- package/dist/rules/rules/cross-chunks-package/index.d.ts +1 -1
- package/dist/rules/rules/cross-chunks-package/index.js +2 -2
- package/dist/rules/rules/default-import-check/index.d.ts +1 -1
- package/dist/rules/rules/default-import-check/index.js +2 -2
- package/dist/rules/rules/default-import-check/utils.d.ts +2 -2
- package/dist/rules/rules/default-import-check/utils.js +2 -2
- package/dist/rules/rules/duplicate-package/index.d.ts +3 -3
- package/dist/rules/rules/duplicate-package/index.js +3 -3
- package/dist/rules/rules/duplicate-package/utils.d.ts +1 -1
- package/dist/rules/rules/ecma-version-check/index.d.ts +3 -2
- package/dist/rules/rules/ecma-version-check/index.js +1 -1
- package/dist/rules/rules/ecma-version-check/types.d.ts +1 -2
- package/dist/rules/rules/ecma-version-check/utils.d.ts +1 -1
- package/dist/rules/rules/esm-resolved-to-cjs/index.d.ts +1 -1
- package/dist/rules/rules/esm-resolved-to-cjs/index.js +3 -18
- package/dist/rules/rules/index.d.ts +1 -1
- package/dist/rules/rules/loader-performance-optimization/index.d.ts +1 -1
- package/dist/rules/rules/loader-performance-optimization/index.js +3 -3
- package/dist/rules/rules/loader-performance-optimization/types.d.ts +1 -1
- package/dist/rules/rules/module-mixed-chunks/index.d.ts +1 -1
- package/dist/rules/rules/module-mixed-chunks/index.js +2 -2
- package/dist/rules/rules/side-effects-only-imports/index.d.ts +1 -1
- package/dist/rules/rules/side-effects-only-imports/index.js +2 -2
- package/dist/rules/utils.d.ts +1 -1
- package/dist/rules/utils.js +1 -1
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.js +3 -0
- package/dist/sdk/multiple/controller.d.ts +12 -0
- package/dist/sdk/multiple/controller.js +42 -0
- package/dist/sdk/multiple/index.d.ts +2 -0
- package/dist/sdk/multiple/index.js +3 -0
- package/dist/sdk/multiple/primary.d.ts +32 -0
- package/dist/sdk/multiple/primary.js +64 -0
- package/dist/sdk/multiple/server.d.ts +7 -0
- package/dist/sdk/multiple/server.js +14 -0
- package/dist/sdk/sdk/core.d.ts +33 -0
- package/dist/sdk/sdk/core.js +163 -0
- package/dist/sdk/sdk/index.d.ts +52 -0
- package/dist/sdk/sdk/index.js +435 -0
- package/dist/sdk/sdk/types.d.ts +26 -0
- package/dist/sdk/sdk/types.js +1 -0
- package/dist/sdk/server/apis/alerts.d.ts +5 -0
- package/dist/sdk/server/apis/alerts.js +30 -0
- package/dist/sdk/server/apis/base.d.ts +11 -0
- package/dist/sdk/server/apis/base.js +22 -0
- package/dist/sdk/server/apis/bundle-diff.d.ts +6 -0
- package/dist/sdk/server/apis/bundle-diff.js +51 -0
- package/dist/sdk/server/apis/data.d.ts +6 -0
- package/dist/sdk/server/apis/data.js +44 -0
- package/dist/sdk/server/apis/fs.d.ts +5 -0
- package/dist/sdk/server/apis/fs.js +28 -0
- package/dist/sdk/server/apis/graph.d.ts +12 -0
- package/dist/sdk/server/apis/graph.js +116 -0
- package/dist/sdk/server/apis/index.d.ts +10 -0
- package/dist/sdk/server/apis/index.js +11 -0
- package/dist/sdk/server/apis/loader.d.ts +15 -0
- package/dist/sdk/server/apis/loader.js +120 -0
- package/dist/sdk/server/apis/plugin.d.ts +6 -0
- package/dist/sdk/server/apis/plugin.js +39 -0
- package/dist/sdk/server/apis/project.d.ts +8 -0
- package/dist/sdk/server/apis/project.js +59 -0
- package/dist/sdk/server/apis/renderer.d.ts +6 -0
- package/dist/sdk/server/apis/renderer.js +33 -0
- package/dist/sdk/server/apis/resolver.d.ts +6 -0
- package/dist/sdk/server/apis/resolver.js +38 -0
- package/dist/sdk/server/client.d.ts +3 -0
- package/dist/sdk/server/client.js +8 -0
- package/dist/sdk/server/fakeServer.d.ts +9 -0
- package/dist/sdk/server/fakeServer.js +12 -0
- package/dist/sdk/server/index.d.ts +44 -0
- package/dist/sdk/server/index.js +292 -0
- package/dist/sdk/server/json-body.d.ts +6 -0
- package/dist/sdk/server/json-body.js +150 -0
- package/dist/sdk/server/router.d.ts +24 -0
- package/dist/sdk/server/router.js +83 -0
- package/dist/sdk/server/security.d.ts +5 -0
- package/dist/sdk/server/security.js +47 -0
- package/dist/sdk/server/socket/api.d.ts +15 -0
- package/dist/sdk/server/socket/api.js +22 -0
- package/dist/sdk/server/socket/index.d.ts +48 -0
- package/dist/sdk/server/socket/index.js +166 -0
- package/dist/sdk/server/utils.d.ts +6 -0
- package/dist/sdk/server/utils.js +19 -0
- package/dist/sdk/utils/base.d.ts +1 -0
- package/dist/sdk/utils/base.js +22 -0
- package/dist/sdk/utils/constant.d.ts +1 -0
- package/dist/sdk/utils/constant.js +4 -0
- package/dist/sdk/utils/index.d.ts +3 -0
- package/dist/sdk/utils/index.js +4 -0
- package/dist/sdk/utils/openBrowser.d.ts +4 -0
- package/dist/sdk/utils/openBrowser.js +53 -0
- package/dist/sdk/utils/upload.d.ts +2 -0
- package/dist/sdk/utils/upload.js +6 -0
- package/dist/sdk.d.ts +1 -0
- package/dist/sdk.js +2 -0
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.js +0 -1
- package/dist/types/loader.d.ts +1 -1
- package/dist/types/plugin.d.ts +7 -28
- package/dist/types/rules.d.ts +4 -4
- package/package.json +123 -55
- package/static/openChrome.applescript +95 -0
- package/dist/build-utils/build/chunks/assetsModules.cjs +0 -46
- package/dist/build-utils/build/chunks/assetsModules.d.cts +0 -17
- package/dist/build-utils/build/chunks/chunkTransform.cjs +0 -43
- package/dist/build-utils/build/chunks/chunkTransform.d.cts +0 -4
- package/dist/build-utils/build/chunks/chunkTransform.d.ts +0 -4
- package/dist/build-utils/build/chunks/chunkTransform.js +0 -6
- package/dist/build-utils/build/chunks/index.cjs +0 -76
- package/dist/build-utils/build/chunks/index.d.cts +0 -3
- package/dist/build-utils/build/chunks/rspack/transform.cjs +0 -84
- package/dist/build-utils/build/chunks/rspack/transform.d.cts +0 -13
- package/dist/build-utils/build/index.cjs +0 -56
- package/dist/build-utils/build/index.d.cts +0 -5
- package/dist/build-utils/build/loader/index.cjs +0 -69
- package/dist/build-utils/build/loader/index.d.cts +0 -2
- package/dist/build-utils/build/loader/probeLoader.cjs +0 -93
- package/dist/build-utils/build/loader/probeLoader.d.cts +0 -4
- package/dist/build-utils/build/loader/probeLoaderPlugin.cjs +0 -69
- package/dist/build-utils/build/loader/probeLoaderPlugin.d.cts +0 -5
- package/dist/build-utils/build/module-graph/index.cjs +0 -83
- package/dist/build-utils/build/module-graph/index.d.cts +0 -4
- package/dist/build-utils/build/module-graph/parser.cjs +0 -50
- package/dist/build-utils/build/module-graph/parser.d.cts +0 -2
- package/dist/build-utils/build/module-graph/rspack/transform.cjs +0 -155
- package/dist/build-utils/build/module-graph/rspack/transform.d.cts +0 -26
- package/dist/build-utils/build/module-graph/transform.cjs +0 -44
- package/dist/build-utils/build/module-graph/transform.d.cts +0 -4
- package/dist/build-utils/build/module-graph/transform.d.ts +0 -4
- package/dist/build-utils/build/module-graph/transform.js +0 -7
- package/dist/build-utils/build/module-graph/treeShaking.cjs +0 -110
- package/dist/build-utils/build/module-graph/treeShaking.d.cts +0 -2
- package/dist/build-utils/build/module-graph/treeShaking.d.ts +0 -2
- package/dist/build-utils/build/module-graph/treeShaking.js +0 -73
- package/dist/build-utils/build/module-graph/utils.cjs +0 -99
- package/dist/build-utils/build/module-graph/utils.d.cts +0 -3
- package/dist/build-utils/build/module-graph/webpack/transform.cjs +0 -174
- package/dist/build-utils/build/module-graph/webpack/transform.d.cts +0 -16
- package/dist/build-utils/build/module-graph/webpack/transform.d.ts +0 -16
- package/dist/build-utils/build/module-graph/webpack/transform.js +0 -124
- package/dist/build-utils/build/utils/index.cjs +0 -76
- package/dist/build-utils/build/utils/index.d.cts +0 -3
- package/dist/build-utils/build/utils/loader.cjs +0 -358
- package/dist/build-utils/build/utils/loader.d.cts +0 -20
- package/dist/build-utils/build/utils/parseBundle.cjs +0 -287
- package/dist/build-utils/build/utils/parseBundle.d.cts +0 -12
- package/dist/build-utils/build/utils/plugin.cjs +0 -65
- package/dist/build-utils/build/utils/plugin.d.cts +0 -5
- package/dist/build-utils/index.cjs +0 -40
- package/dist/build-utils/index.d.cts +0 -1
- package/dist/index.cjs +0 -85
- package/dist/index.d.cts +0 -3
- package/dist/inner-plugins/constants.cjs +0 -68
- package/dist/inner-plugins/index.cjs +0 -69
- package/dist/inner-plugins/index.d.cts +0 -2
- package/dist/inner-plugins/loaders/proxy.cjs +0 -108
- package/dist/inner-plugins/loaders/proxy.d.cts +0 -7
- package/dist/inner-plugins/plugins/base.cjs +0 -57
- package/dist/inner-plugins/plugins/base.d.cts +0 -12
- package/dist/inner-plugins/plugins/bundle.cjs +0 -116
- package/dist/inner-plugins/plugins/bundle.d.cts +0 -15
- package/dist/inner-plugins/plugins/bundleTagPlugin.cjs +0 -88
- package/dist/inner-plugins/plugins/bundleTagPlugin.d.cts +0 -6
- package/dist/inner-plugins/plugins/bundleTagPlugin.d.ts +0 -6
- package/dist/inner-plugins/plugins/bundleTagPlugin.js +0 -51
- package/dist/inner-plugins/plugins/ensureModulesChunkGraph.cjs +0 -182
- package/dist/inner-plugins/plugins/ensureModulesChunkGraph.d.cts +0 -36
- package/dist/inner-plugins/plugins/errors.cjs +0 -102
- package/dist/inner-plugins/plugins/errors.d.cts +0 -11
- package/dist/inner-plugins/plugins/index.cjs +0 -132
- package/dist/inner-plugins/plugins/index.d.cts +0 -11
- package/dist/inner-plugins/plugins/loader.cjs +0 -169
- package/dist/inner-plugins/plugins/loader.d.cts +0 -10
- package/dist/inner-plugins/plugins/plugins.cjs +0 -77
- package/dist/inner-plugins/plugins/plugins.d.cts +0 -8
- package/dist/inner-plugins/plugins/progress.cjs +0 -74
- package/dist/inner-plugins/plugins/progress.d.cts +0 -8
- package/dist/inner-plugins/plugins/resolver.cjs +0 -94
- package/dist/inner-plugins/plugins/resolver.d.cts +0 -13
- package/dist/inner-plugins/plugins/rspack.cjs +0 -122
- package/dist/inner-plugins/plugins/rspack.d.cts +0 -4
- package/dist/inner-plugins/plugins/rules.cjs +0 -101
- package/dist/inner-plugins/plugins/rules.d.cts +0 -8
- package/dist/inner-plugins/plugins/sourcemapTool.cjs +0 -279
- package/dist/inner-plugins/plugins/sourcemapTool.d.cts +0 -52
- package/dist/inner-plugins/plugins/summary.cjs +0 -129
- package/dist/inner-plugins/plugins/summary.d.cts +0 -14
- package/dist/inner-plugins/utils/circleDetect.cjs +0 -53
- package/dist/inner-plugins/utils/circleDetect.d.cts +0 -4
- package/dist/inner-plugins/utils/config.cjs +0 -207
- package/dist/inner-plugins/utils/config.d.cts +0 -5
- package/dist/inner-plugins/utils/index.cjs +0 -110
- package/dist/inner-plugins/utils/index.d.cts +0 -9
- package/dist/inner-plugins/utils/loader.cjs +0 -222
- package/dist/inner-plugins/utils/loader.d.cts +0 -13
- package/dist/inner-plugins/utils/normalize-config.cjs +0 -126
- package/dist/inner-plugins/utils/normalize-config.d.cts +0 -40
- package/dist/inner-plugins/utils/plugin-common.cjs +0 -147
- package/dist/inner-plugins/utils/plugin-common.d.cts +0 -11
- package/dist/inner-plugins/utils/plugin.cjs +0 -110
- package/dist/inner-plugins/utils/plugin.d.cts +0 -4
- package/dist/inner-plugins/utils/sdk.cjs +0 -59
- package/dist/inner-plugins/utils/sdk.d.cts +0 -8
- package/dist/rslib-runtime.js +0 -19
- package/dist/rules/index.cjs +0 -85
- package/dist/rules/index.d.cts +0 -3
- package/dist/rules/linter.cjs +0 -76
- package/dist/rules/linter.d.cts +0 -9
- package/dist/rules/rule.cjs +0 -141
- package/dist/rules/rule.d.cts +0 -27
- package/dist/rules/rules/cjs-require/index.cjs +0 -87
- package/dist/rules/rules/cjs-require/index.d.cts +0 -4
- package/dist/rules/rules/cjs-require/types.cjs +0 -18
- package/dist/rules/rules/cjs-require/types.d.cts +0 -7
- package/dist/rules/rules/cross-chunks-package/index.cjs +0 -78
- package/dist/rules/rules/cross-chunks-package/index.d.cts +0 -4
- package/dist/rules/rules/cross-chunks-package/types.cjs +0 -18
- package/dist/rules/rules/cross-chunks-package/types.d.cts +0 -3
- package/dist/rules/rules/cross-chunks-package/utils.cjs +0 -44
- package/dist/rules/rules/cross-chunks-package/utils.d.cts +0 -1
- package/dist/rules/rules/default-import-check/index.cjs +0 -120
- package/dist/rules/rules/default-import-check/index.d.cts +0 -4
- package/dist/rules/rules/default-import-check/types.cjs +0 -18
- package/dist/rules/rules/default-import-check/types.d.cts +0 -4
- package/dist/rules/rules/default-import-check/utils.cjs +0 -101
- package/dist/rules/rules/default-import-check/utils.d.cts +0 -10
- package/dist/rules/rules/duplicate-package/index.cjs +0 -76
- package/dist/rules/rules/duplicate-package/index.d.cts +0 -4
- package/dist/rules/rules/duplicate-package/types.cjs +0 -64
- package/dist/rules/rules/duplicate-package/types.d.cts +0 -24
- package/dist/rules/rules/duplicate-package/utils.cjs +0 -88
- package/dist/rules/rules/duplicate-package/utils.d.cts +0 -3
- package/dist/rules/rules/ecma-version-check/index.cjs +0 -100
- package/dist/rules/rules/ecma-version-check/index.d.cts +0 -4
- package/dist/rules/rules/ecma-version-check/types.cjs +0 -18
- package/dist/rules/rules/ecma-version-check/types.d.cts +0 -3
- package/dist/rules/rules/ecma-version-check/utils.cjs +0 -43
- package/dist/rules/rules/ecma-version-check/utils.d.cts +0 -2
- package/dist/rules/rules/esm-resolved-to-cjs/index.cjs +0 -256
- package/dist/rules/rules/esm-resolved-to-cjs/index.d.cts +0 -4
- package/dist/rules/rules/esm-resolved-to-cjs/types.cjs +0 -18
- package/dist/rules/rules/esm-resolved-to-cjs/types.d.cts +0 -8
- package/dist/rules/rules/index.cjs +0 -59
- package/dist/rules/rules/index.d.cts +0 -2
- package/dist/rules/rules/loader-performance-optimization/index.cjs +0 -123
- package/dist/rules/rules/loader-performance-optimization/index.d.cts +0 -4
- package/dist/rules/rules/loader-performance-optimization/types.cjs +0 -18
- package/dist/rules/rules/loader-performance-optimization/types.d.cts +0 -22
- package/dist/rules/rules/loader-performance-optimization/utils.cjs +0 -47
- package/dist/rules/rules/loader-performance-optimization/utils.d.cts +0 -1
- package/dist/rules/rules/module-mixed-chunks/index.cjs +0 -89
- package/dist/rules/rules/module-mixed-chunks/index.d.cts +0 -4
- package/dist/rules/rules/module-mixed-chunks/types.cjs +0 -18
- package/dist/rules/rules/module-mixed-chunks/types.d.cts +0 -3
- package/dist/rules/rules/side-effects-only-imports/index.cjs +0 -118
- package/dist/rules/rules/side-effects-only-imports/index.d.cts +0 -4
- package/dist/rules/rules/side-effects-only-imports/types.cjs +0 -18
- package/dist/rules/rules/side-effects-only-imports/types.d.cts +0 -9
- package/dist/rules/utils.cjs +0 -50
- package/dist/rules/utils.d.cts +0 -3
- package/dist/types/chunks.cjs +0 -18
- package/dist/types/chunks.d.cts +0 -6
- package/dist/types/chunks.d.ts +0 -6
- package/dist/types/index.cjs +0 -83
- package/dist/types/index.d.cts +0 -4
- package/dist/types/loader.cjs +0 -18
- package/dist/types/loader.d.cts +0 -19
- package/dist/types/plugin.cjs +0 -18
- package/dist/types/plugin.d.cts +0 -51
- package/dist/types/rules.cjs +0 -18
- package/dist/types/rules.d.cts +0 -7
- /package/dist/{types/chunks.js → rule-utils/document/types.js} +0 -0
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.n = (module)=>{
|
|
5
|
-
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
-
__webpack_require__.d(getter, {
|
|
7
|
-
a: getter
|
|
8
|
-
});
|
|
9
|
-
return getter;
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.d = (exports1, getters, values)=>{
|
|
14
|
-
var define = (defs, kind)=>{
|
|
15
|
-
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
[kind]: defs[key]
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
define(getters, "get");
|
|
21
|
-
define(values, "value");
|
|
22
|
-
};
|
|
23
|
-
})();
|
|
24
|
-
(()=>{
|
|
25
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
26
|
-
})();
|
|
27
|
-
(()=>{
|
|
28
|
-
__webpack_require__.r = (exports1)=>{
|
|
29
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
30
|
-
value: 'Module'
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
33
|
-
value: true
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
})();
|
|
37
|
-
var __webpack_exports__ = {};
|
|
38
|
-
__webpack_require__.r(__webpack_exports__);
|
|
39
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
40
|
-
parseBundle: ()=>parseBundle
|
|
41
|
-
});
|
|
42
|
-
const external_fs_namespaceObject = require("fs");
|
|
43
|
-
var external_fs_default = /*#__PURE__*/ __webpack_require__.n(external_fs_namespaceObject);
|
|
44
|
-
const compat_namespaceObject = require("es-toolkit/compat");
|
|
45
|
-
const external_filesize_namespaceObject = require("filesize");
|
|
46
|
-
const ruleUtils_namespaceObject = require("@rsdoctor/utils/ruleUtils");
|
|
47
|
-
const external_path_namespaceObject = require("path");
|
|
48
|
-
const types_namespaceObject = require("@rsdoctor/types");
|
|
49
|
-
const logger_namespaceObject = require("@rsdoctor/utils/logger");
|
|
50
|
-
const parseBundle = (bundlePath, modulesData)=>{
|
|
51
|
-
if (bundlePath.indexOf('.worker.') > 0) return {};
|
|
52
|
-
const ext = (0, external_path_namespaceObject.extname)(bundlePath);
|
|
53
|
-
if (!types_namespaceObject.Constants.JSExtensions.includes(ext)) return {};
|
|
54
|
-
let content = external_fs_default().readFileSync(bundlePath, 'utf8');
|
|
55
|
-
const tagCache = new Map();
|
|
56
|
-
const sourceMapRegex = /\/\/# sourceMappingURL=[^\n]*$/m;
|
|
57
|
-
content = content.replace(sourceMapRegex, '');
|
|
58
|
-
let hasBannerPlugin = content.indexOf('RSDOCTOR_START::') > 0;
|
|
59
|
-
if (hasBannerPlugin && !tagCache.get(bundlePath)) {
|
|
60
|
-
const tagMatchResult = getStringBetween(content, 0, /([a-z|A-Z|_]+\.[a-z]+)\(\SRSDOCTOR_START::(.*?)[;,]/, /([a-z|A-Z|_]+\.[a-z]+)\(\SRSDOCTOR_END::(.*?)\)/);
|
|
61
|
-
content = tagMatchResult.result?.trim() || content;
|
|
62
|
-
tagCache.set(bundlePath, tagMatchResult.loc);
|
|
63
|
-
hasBannerPlugin = true;
|
|
64
|
-
} else if (hasBannerPlugin && !tagCache.get(bundlePath)) {
|
|
65
|
-
const loc = tagCache.get(bundlePath);
|
|
66
|
-
content = content.slice(loc.start, loc.end);
|
|
67
|
-
hasBannerPlugin = true;
|
|
68
|
-
}
|
|
69
|
-
const ast = ruleUtils_namespaceObject.parser.internal.parse(content, {
|
|
70
|
-
sourceType: "script",
|
|
71
|
-
ecmaVersion: 'latest'
|
|
72
|
-
});
|
|
73
|
-
const walkState = {
|
|
74
|
-
locations: null,
|
|
75
|
-
expressionStatementDepth: 0
|
|
76
|
-
};
|
|
77
|
-
ruleUtils_namespaceObject.parser.walk.recursive(ast, walkState, {
|
|
78
|
-
ExpressionStatement (node, state, c) {
|
|
79
|
-
if (state.locations) return;
|
|
80
|
-
state.expressionStatementDepth++;
|
|
81
|
-
try {
|
|
82
|
-
if (1 === state.expressionStatementDepth && isIIFE(node)) {
|
|
83
|
-
const fn = getIIFECallExpression(node);
|
|
84
|
-
if (0 === fn.arguments.length && 0 === fn.callee.params.length) {
|
|
85
|
-
const firstVariableDeclaration = fn.callee.body.body.find((node)=>'VariableDeclaration' === node.type);
|
|
86
|
-
if (firstVariableDeclaration) {
|
|
87
|
-
for (const declaration of firstVariableDeclaration.declarations)if (declaration.init) {
|
|
88
|
-
state.locations = getModulesLocations(declaration.init);
|
|
89
|
-
if (state.locations) break;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
if (!state.locations) c(node.expression, state);
|
|
95
|
-
} catch (e) {
|
|
96
|
-
logger_namespaceObject.logger.debug(e);
|
|
97
|
-
}
|
|
98
|
-
state.expressionStatementDepth--;
|
|
99
|
-
},
|
|
100
|
-
Program (node, state, _c) {
|
|
101
|
-
if (state.locations) return;
|
|
102
|
-
try {
|
|
103
|
-
if (hasBannerPlugin) {
|
|
104
|
-
const firstVariableDeclaration = node.body.find((node)=>'VariableDeclaration' === node.type && node.declarations?.[0]?.init?.type === 'ObjectExpression' && node.declarations?.[0]?.init?.properties?.length);
|
|
105
|
-
if (firstVariableDeclaration) {
|
|
106
|
-
for (const declaration of firstVariableDeclaration.declarations)if (declaration.init) {
|
|
107
|
-
state.locations = getModulesLocations(declaration.init);
|
|
108
|
-
if (state.locations) break;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
if (!state.locations) node.body.forEach((n)=>_c(n, state));
|
|
113
|
-
} catch (e) {
|
|
114
|
-
logger_namespaceObject.logger.debug(e);
|
|
115
|
-
}
|
|
116
|
-
state.expressionStatementDepth--;
|
|
117
|
-
},
|
|
118
|
-
AssignmentExpression (node, state) {
|
|
119
|
-
if (state.locations) return;
|
|
120
|
-
const { left, right } = node;
|
|
121
|
-
if (left?.object && 'exports' === left.object.name && left.property && 'modules' === left.property.name && isModulesHash(right)) state.locations = getModulesLocations(right);
|
|
122
|
-
},
|
|
123
|
-
CallExpression (node, state, c) {
|
|
124
|
-
if (state.locations) return;
|
|
125
|
-
const args = node.arguments;
|
|
126
|
-
if ('FunctionExpression' === node.callee.type && !node.callee.id && 1 === args.length && isSimpleModulesList(args[0])) {
|
|
127
|
-
state.locations = getModulesLocations(args[0]);
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
if ('Identifier' === node.callee.type && mayBeAsyncChunkArguments(args) && isModulesList(args[1])) {
|
|
131
|
-
state.locations = getModulesLocations(args[1]);
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
if (isAsyncChunkPushExpression(node)) {
|
|
135
|
-
state.locations = getModulesLocations(args[0].elements[1]);
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
if (isAsyncWebWorkerChunkExpression(node)) {
|
|
139
|
-
state.locations = getModulesLocations(args[1]);
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
args.forEach((arg)=>c(arg, state));
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
let modules;
|
|
146
|
-
modules = walkState.locations ? (0, compat_namespaceObject.mapValues)(walkState.locations, (loc)=>content.slice(loc.start, loc.end)) : {};
|
|
147
|
-
const modulesObj = {};
|
|
148
|
-
for(const module in modules){
|
|
149
|
-
if (!module) return {};
|
|
150
|
-
const moduleContent = modules[module];
|
|
151
|
-
const size = moduleContent && Buffer.byteLength(moduleContent);
|
|
152
|
-
const identifier = (0, compat_namespaceObject.find)(modulesData, {
|
|
153
|
-
renderId: module
|
|
154
|
-
})?.webpackId || '';
|
|
155
|
-
modulesObj[identifier] = {
|
|
156
|
-
size,
|
|
157
|
-
sizeConvert: (0, external_filesize_namespaceObject.filesize)(size || 0),
|
|
158
|
-
content: moduleContent
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
return {
|
|
162
|
-
modules: modulesObj,
|
|
163
|
-
src: content,
|
|
164
|
-
runtimeSrc: getBundleRuntime(content, walkState.locations)
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
function getBundleRuntime(content, modulesLocations) {
|
|
168
|
-
const sortedLocations = Object.values(modulesLocations || {}).sort((a, b)=>a.start - b.start);
|
|
169
|
-
let result = '';
|
|
170
|
-
let lastIndex = 0;
|
|
171
|
-
for (const { start, end } of sortedLocations){
|
|
172
|
-
result += content.slice(lastIndex, start);
|
|
173
|
-
lastIndex = end;
|
|
174
|
-
}
|
|
175
|
-
return result + content.slice(lastIndex, content.length);
|
|
176
|
-
}
|
|
177
|
-
function isIIFE(node) {
|
|
178
|
-
return 'ExpressionStatement' === node.type && ('CallExpression' === node.expression.type || 'UnaryExpression' === node.expression.type && 'CallExpression' === node.expression.argument.type);
|
|
179
|
-
}
|
|
180
|
-
function getIIFECallExpression(node) {
|
|
181
|
-
if ('UnaryExpression' === node.expression.type) return node.expression.argument;
|
|
182
|
-
return node.expression;
|
|
183
|
-
}
|
|
184
|
-
function isModulesList(node) {
|
|
185
|
-
return isSimpleModulesList(node) || isOptimizedModulesArray(node);
|
|
186
|
-
}
|
|
187
|
-
function isSimpleModulesList(node) {
|
|
188
|
-
return isModulesHash(node) || isModulesArray(node);
|
|
189
|
-
}
|
|
190
|
-
function isModulesHash(node) {
|
|
191
|
-
return 'ObjectExpression' === node.type && node.properties.map((node)=>node.value).every(isModuleWrapper);
|
|
192
|
-
}
|
|
193
|
-
function isModulesArray(node) {
|
|
194
|
-
return 'ArrayExpression' === node.type && node.elements.every((elem)=>!elem || isModuleWrapper(elem));
|
|
195
|
-
}
|
|
196
|
-
function isOptimizedModulesArray(node) {
|
|
197
|
-
return 'CallExpression' === node.type && 'MemberExpression' === node.callee.type && 'CallExpression' === node.callee.object.type && 'Identifier' === node.callee.object.callee.type && 'Array' === node.callee.object.callee.name && 1 === node.callee.object.arguments.length && isNumericId(node.callee.object.arguments[0]) && 'Identifier' === node.callee.property.type && 'concat' === node.callee.property.name && 1 === node.arguments.length && isModulesArray(node.arguments[0]);
|
|
198
|
-
}
|
|
199
|
-
function isModuleWrapper(node) {
|
|
200
|
-
return ('FunctionExpression' === node.type || 'ArrowFunctionExpression' === node.type) && !node.id || isModuleId(node) || 'ArrayExpression' === node.type && node.elements.length > 1 && isModuleId(node.elements[0]);
|
|
201
|
-
}
|
|
202
|
-
function isModuleId(node) {
|
|
203
|
-
return 'Literal' === node.type && (isNumericId(node) || 'string' == typeof node.value);
|
|
204
|
-
}
|
|
205
|
-
function isNumericId(node) {
|
|
206
|
-
return 'Literal' === node.type && Number.isInteger(node.value) && node.value >= 0;
|
|
207
|
-
}
|
|
208
|
-
function isChunkIds(node) {
|
|
209
|
-
return 'ArrayExpression' === node.type && node.elements.every(isModuleId);
|
|
210
|
-
}
|
|
211
|
-
function isAsyncChunkPushExpression(node) {
|
|
212
|
-
const { callee, arguments: args } = node;
|
|
213
|
-
return 'MemberExpression' === callee.type && 'push' === callee.property.name && 'AssignmentExpression' === callee.object.type && 1 === args.length && 'ArrayExpression' === args[0].type && mayBeAsyncChunkArguments(args[0].elements) && isModulesList(args[0].elements[1]);
|
|
214
|
-
}
|
|
215
|
-
function mayBeAsyncChunkArguments(args) {
|
|
216
|
-
return args.length >= 2 && isChunkIds(args[0]);
|
|
217
|
-
}
|
|
218
|
-
function isAsyncWebWorkerChunkExpression(node) {
|
|
219
|
-
const { callee, type, arguments: args } = node;
|
|
220
|
-
return 'CallExpression' === type && 'MemberExpression' === callee.type && 2 === args.length && isChunkIds(args[0]) && isModulesList(args[1]);
|
|
221
|
-
}
|
|
222
|
-
function getModulesLocations(node) {
|
|
223
|
-
if ('ObjectExpression' === node.type) {
|
|
224
|
-
const modulesNodes = node.properties;
|
|
225
|
-
return modulesNodes.reduce((result, moduleNode)=>{
|
|
226
|
-
const moduleId = moduleNode.key.name || moduleNode.key.value;
|
|
227
|
-
result[moduleId] = getModuleLocation(moduleNode.value);
|
|
228
|
-
return result;
|
|
229
|
-
}, {});
|
|
230
|
-
}
|
|
231
|
-
const isOptimizedArray = 'CallExpression' === node.type;
|
|
232
|
-
if ('ArrayExpression' === node.type || isOptimizedArray) {
|
|
233
|
-
const minId = isOptimizedArray ? node.callee.object.arguments[0].value : 0;
|
|
234
|
-
const modulesNodes = isOptimizedArray ? node.arguments[0].elements : node.elements;
|
|
235
|
-
return modulesNodes.reduce((result, moduleNode, i)=>{
|
|
236
|
-
if (moduleNode) result[i + minId] = getModuleLocation(moduleNode);
|
|
237
|
-
return result;
|
|
238
|
-
}, {});
|
|
239
|
-
}
|
|
240
|
-
return {};
|
|
241
|
-
}
|
|
242
|
-
function getModuleLocation(node) {
|
|
243
|
-
return {
|
|
244
|
-
start: node.start,
|
|
245
|
-
end: node.end
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
function getStringBetween(raw, position, start, end) {
|
|
249
|
-
try {
|
|
250
|
-
const matchStart = raw.match(start);
|
|
251
|
-
const startFlagIndex = matchStart?.length ? raw.indexOf(matchStart[0], position) : -1;
|
|
252
|
-
if (-1 === startFlagIndex || !matchStart?.length) return {
|
|
253
|
-
result: null,
|
|
254
|
-
remain: position
|
|
255
|
-
};
|
|
256
|
-
const startTagLength = matchStart[0].length;
|
|
257
|
-
const matchEnd = raw.match(end);
|
|
258
|
-
const endFlagIndex = matchEnd?.length ? raw.indexOf(matchEnd[0], startFlagIndex + startTagLength) : -1;
|
|
259
|
-
if (-1 === endFlagIndex || !matchEnd?.length) return {
|
|
260
|
-
result: null,
|
|
261
|
-
remain: position
|
|
262
|
-
};
|
|
263
|
-
let innerContent = raw.slice(startFlagIndex + startTagLength, endFlagIndex).trim();
|
|
264
|
-
if (innerContent.endsWith(',')) innerContent = innerContent.slice(0, -1);
|
|
265
|
-
return {
|
|
266
|
-
result: innerContent,
|
|
267
|
-
remain: matchEnd?.length ? endFlagIndex + matchEnd[0].length : endFlagIndex,
|
|
268
|
-
loc: {
|
|
269
|
-
start: startFlagIndex + startTagLength,
|
|
270
|
-
end: endFlagIndex
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
|
-
} catch (e) {
|
|
274
|
-
logger_namespaceObject.logger.debug(()=>e);
|
|
275
|
-
return {
|
|
276
|
-
result: null,
|
|
277
|
-
remain: position
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
exports.parseBundle = __webpack_exports__.parseBundle;
|
|
282
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
283
|
-
"parseBundle"
|
|
284
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
285
|
-
Object.defineProperty(exports, '__esModule', {
|
|
286
|
-
value: true
|
|
287
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ParseBundle } from '@rsdoctor/graph';
|
|
2
|
-
/**
|
|
3
|
-
* The following code is based on
|
|
4
|
-
* https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/44bd8d0f9aa3b098e271af220096ea70cc44bc9e/src/parseUtils.js#L10
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* MIT Licensed
|
|
8
|
-
* Author th0r
|
|
9
|
-
* Copyright JS Foundation and other contributors.
|
|
10
|
-
* https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/44bd8d0f9aa3b098e271af220096ea70cc44bc9e/LICENSE
|
|
11
|
-
*/
|
|
12
|
-
export declare const parseBundle: ParseBundle;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
-
var define = (defs, kind)=>{
|
|
6
|
-
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
[kind]: defs[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
define(getters, "get");
|
|
12
|
-
define(values, "value");
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
-
})();
|
|
18
|
-
(()=>{
|
|
19
|
-
__webpack_require__.r = (exports1)=>{
|
|
20
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
-
value: 'Module'
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
-
value: true
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
})();
|
|
28
|
-
var __webpack_exports__ = {};
|
|
29
|
-
__webpack_require__.r(__webpack_exports__);
|
|
30
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
-
interceptCompilationHooks: ()=>interceptCompilationHooks,
|
|
32
|
-
interceptCompilerHooks: ()=>interceptCompilerHooks,
|
|
33
|
-
shouldInterceptPluginHook: ()=>shouldInterceptPluginHook
|
|
34
|
-
});
|
|
35
|
-
const graph_namespaceObject = require("@rsdoctor/graph");
|
|
36
|
-
function shouldInterceptPluginHook(hook) {
|
|
37
|
-
if (hook && hook._fakeHook) return false;
|
|
38
|
-
if (hook?.isUsed && 'function' == typeof hook.isUsed) return hook.isUsed();
|
|
39
|
-
if (hook?._map && 0 === hook._map.size) return false;
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
function interceptCompilerHooks(compiler, interceptor) {
|
|
43
|
-
Object.keys(compiler.hooks).forEach((hook)=>{
|
|
44
|
-
const v = compiler.hooks[hook];
|
|
45
|
-
if (shouldInterceptPluginHook(v)) interceptor(hook, v, 'compiler');
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
function interceptCompilationHooks(compilation, interceptor) {
|
|
49
|
-
Object.keys(compilation.hooks).forEach((hook)=>{
|
|
50
|
-
if ('normalModuleLoader' === hook && graph_namespaceObject.ModuleGraphTrans.isWebpack5orRspack(compilation)) return;
|
|
51
|
-
const v = compilation.hooks[hook];
|
|
52
|
-
if (shouldInterceptPluginHook(v)) interceptor(hook, v, 'compilation');
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
exports.interceptCompilationHooks = __webpack_exports__.interceptCompilationHooks;
|
|
56
|
-
exports.interceptCompilerHooks = __webpack_exports__.interceptCompilerHooks;
|
|
57
|
-
exports.shouldInterceptPluginHook = __webpack_exports__.shouldInterceptPluginHook;
|
|
58
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
59
|
-
"interceptCompilationHooks",
|
|
60
|
-
"interceptCompilerHooks",
|
|
61
|
-
"shouldInterceptPluginHook"
|
|
62
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
63
|
-
Object.defineProperty(exports, '__esModule', {
|
|
64
|
-
value: true
|
|
65
|
-
});
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Plugin } from '@rsdoctor/types';
|
|
2
|
-
export type IHook = Plugin.BaseCompiler['hooks'][keyof Plugin.BaseCompiler['hooks']];
|
|
3
|
-
export declare function shouldInterceptPluginHook<T extends IHook>(hook: T): boolean;
|
|
4
|
-
export declare function interceptCompilerHooks(compiler: Plugin.BaseCompiler, interceptor: (name: string, hook: IHook, scope: 'compiler') => void): void;
|
|
5
|
-
export declare function interceptCompilationHooks(compilation: Plugin.BaseCompilation, interceptor: (name: string, hook: IHook, scope: 'compilation') => void): void;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
-
var define = (defs, kind)=>{
|
|
6
|
-
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
[kind]: defs[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
define(getters, "get");
|
|
12
|
-
define(values, "value");
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
-
})();
|
|
18
|
-
(()=>{
|
|
19
|
-
__webpack_require__.r = (exports1)=>{
|
|
20
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
-
value: 'Module'
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
-
value: true
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
})();
|
|
28
|
-
var __webpack_exports__ = {};
|
|
29
|
-
__webpack_require__.r(__webpack_exports__);
|
|
30
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
-
Build: ()=>index_cjs_namespaceObject
|
|
32
|
-
});
|
|
33
|
-
const index_cjs_namespaceObject = require("./build/index.cjs");
|
|
34
|
-
exports.Build = __webpack_exports__.Build;
|
|
35
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
36
|
-
"Build"
|
|
37
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
38
|
-
Object.defineProperty(exports, '__esModule', {
|
|
39
|
-
value: true
|
|
40
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * as Build from './build';
|
package/dist/index.cjs
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_modules__ = {
|
|
3
|
-
"./build-utils" (module) {
|
|
4
|
-
module.exports = require("./build-utils/index.cjs");
|
|
5
|
-
},
|
|
6
|
-
"./inner-plugins" (module) {
|
|
7
|
-
module.exports = require("./inner-plugins/index.cjs");
|
|
8
|
-
},
|
|
9
|
-
"./types" (module) {
|
|
10
|
-
module.exports = require("./types/index.cjs");
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
var __webpack_module_cache__ = {};
|
|
14
|
-
function __webpack_require__(moduleId) {
|
|
15
|
-
var cachedModule = __webpack_module_cache__[moduleId];
|
|
16
|
-
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
17
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
18
|
-
exports: {}
|
|
19
|
-
};
|
|
20
|
-
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
21
|
-
return module.exports;
|
|
22
|
-
}
|
|
23
|
-
(()=>{
|
|
24
|
-
__webpack_require__.n = (module)=>{
|
|
25
|
-
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
26
|
-
__webpack_require__.d(getter, {
|
|
27
|
-
a: getter
|
|
28
|
-
});
|
|
29
|
-
return getter;
|
|
30
|
-
};
|
|
31
|
-
})();
|
|
32
|
-
(()=>{
|
|
33
|
-
__webpack_require__.d = (exports1, getters, values)=>{
|
|
34
|
-
var define = (defs, kind)=>{
|
|
35
|
-
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
36
|
-
enumerable: true,
|
|
37
|
-
[kind]: defs[key]
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
define(getters, "get");
|
|
41
|
-
define(values, "value");
|
|
42
|
-
};
|
|
43
|
-
})();
|
|
44
|
-
(()=>{
|
|
45
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
46
|
-
})();
|
|
47
|
-
(()=>{
|
|
48
|
-
__webpack_require__.r = (exports1)=>{
|
|
49
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
50
|
-
value: 'Module'
|
|
51
|
-
});
|
|
52
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
53
|
-
value: true
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
})();
|
|
57
|
-
var __webpack_exports__ = {};
|
|
58
|
-
(()=>{
|
|
59
|
-
__webpack_require__.r(__webpack_exports__);
|
|
60
|
-
var _build_utils__rspack_import_0 = __webpack_require__("./build-utils");
|
|
61
|
-
var __rspack_reexport = {};
|
|
62
|
-
for(const __rspack_import_key in _build_utils__rspack_import_0)if ([
|
|
63
|
-
"default",
|
|
64
|
-
"InnerPlugins"
|
|
65
|
-
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_build_utils__rspack_import_0[__rspack_import_key];
|
|
66
|
-
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
67
|
-
var _inner_plugins__rspack_import_1 = __webpack_require__("./inner-plugins");
|
|
68
|
-
var _types__rspack_import_2 = __webpack_require__("./types");
|
|
69
|
-
var __rspack_reexport = {};
|
|
70
|
-
for(const __rspack_import_key in _types__rspack_import_2)if ([
|
|
71
|
-
"default",
|
|
72
|
-
"InnerPlugins"
|
|
73
|
-
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_types__rspack_import_2[__rspack_import_key];
|
|
74
|
-
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
75
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
76
|
-
InnerPlugins: ()=>_inner_plugins__rspack_import_1
|
|
77
|
-
});
|
|
78
|
-
})();
|
|
79
|
-
exports.InnerPlugins = __webpack_exports__.InnerPlugins;
|
|
80
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
81
|
-
"InnerPlugins"
|
|
82
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
83
|
-
Object.defineProperty(exports, '__esModule', {
|
|
84
|
-
value: true
|
|
85
|
-
});
|
package/dist/index.d.cts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
-
var define = (defs, kind)=>{
|
|
6
|
-
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
[kind]: defs[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
define(getters, "get");
|
|
12
|
-
define(values, "value");
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
-
})();
|
|
18
|
-
(()=>{
|
|
19
|
-
__webpack_require__.r = (exports1)=>{
|
|
20
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
-
value: 'Module'
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
-
value: true
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
})();
|
|
28
|
-
var __webpack_exports__ = {};
|
|
29
|
-
__webpack_require__.r(__webpack_exports__);
|
|
30
|
-
const pluginTapName = 'RsdoctorWebpackPlugin';
|
|
31
|
-
const pluginTapPostOptions = {
|
|
32
|
-
name: pluginTapName,
|
|
33
|
-
stage: 999
|
|
34
|
-
};
|
|
35
|
-
const pluginTapPreOptions = {
|
|
36
|
-
name: pluginTapName,
|
|
37
|
-
stage: -999
|
|
38
|
-
};
|
|
39
|
-
const internalPluginTapPreOptions = (namespace)=>({
|
|
40
|
-
name: `${pluginTapName}:${namespace}`,
|
|
41
|
-
stage: -998
|
|
42
|
-
});
|
|
43
|
-
const internalPluginTapPostOptions = (namespace)=>({
|
|
44
|
-
name: `${pluginTapName}:${namespace}`,
|
|
45
|
-
stage: 1000
|
|
46
|
-
});
|
|
47
|
-
__webpack_require__.d(__webpack_exports__, {}, {
|
|
48
|
-
internalPluginTapPostOptions: internalPluginTapPostOptions,
|
|
49
|
-
internalPluginTapPreOptions: internalPluginTapPreOptions,
|
|
50
|
-
pluginTapName: pluginTapName,
|
|
51
|
-
pluginTapPostOptions: pluginTapPostOptions,
|
|
52
|
-
pluginTapPreOptions: pluginTapPreOptions
|
|
53
|
-
});
|
|
54
|
-
exports.internalPluginTapPostOptions = __webpack_exports__.internalPluginTapPostOptions;
|
|
55
|
-
exports.internalPluginTapPreOptions = __webpack_exports__.internalPluginTapPreOptions;
|
|
56
|
-
exports.pluginTapName = __webpack_exports__.pluginTapName;
|
|
57
|
-
exports.pluginTapPostOptions = __webpack_exports__.pluginTapPostOptions;
|
|
58
|
-
exports.pluginTapPreOptions = __webpack_exports__.pluginTapPreOptions;
|
|
59
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
60
|
-
"internalPluginTapPostOptions",
|
|
61
|
-
"internalPluginTapPreOptions",
|
|
62
|
-
"pluginTapName",
|
|
63
|
-
"pluginTapPostOptions",
|
|
64
|
-
"pluginTapPreOptions"
|
|
65
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
66
|
-
Object.defineProperty(exports, '__esModule', {
|
|
67
|
-
value: true
|
|
68
|
-
});
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_modules__ = {
|
|
3
|
-
"./plugins?8626" (module) {
|
|
4
|
-
module.exports = require("./plugins/index.cjs");
|
|
5
|
-
},
|
|
6
|
-
"./utils" (module) {
|
|
7
|
-
module.exports = require("./utils/index.cjs");
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
var __webpack_module_cache__ = {};
|
|
11
|
-
function __webpack_require__(moduleId) {
|
|
12
|
-
var cachedModule = __webpack_module_cache__[moduleId];
|
|
13
|
-
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
14
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
15
|
-
exports: {}
|
|
16
|
-
};
|
|
17
|
-
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
18
|
-
return module.exports;
|
|
19
|
-
}
|
|
20
|
-
(()=>{
|
|
21
|
-
__webpack_require__.n = (module)=>{
|
|
22
|
-
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
23
|
-
__webpack_require__.d(getter, {
|
|
24
|
-
a: getter
|
|
25
|
-
});
|
|
26
|
-
return getter;
|
|
27
|
-
};
|
|
28
|
-
})();
|
|
29
|
-
(()=>{
|
|
30
|
-
__webpack_require__.d = (exports1, getters, values)=>{
|
|
31
|
-
var define = (defs, kind)=>{
|
|
32
|
-
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
[kind]: defs[key]
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
define(getters, "get");
|
|
38
|
-
define(values, "value");
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
|
-
(()=>{
|
|
42
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
43
|
-
})();
|
|
44
|
-
(()=>{
|
|
45
|
-
__webpack_require__.r = (exports1)=>{
|
|
46
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
47
|
-
value: 'Module'
|
|
48
|
-
});
|
|
49
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
50
|
-
value: true
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
})();
|
|
54
|
-
var __webpack_exports__ = {};
|
|
55
|
-
(()=>{
|
|
56
|
-
__webpack_require__.r(__webpack_exports__);
|
|
57
|
-
var _plugins__rspack_import_0 = __webpack_require__("./plugins?8626");
|
|
58
|
-
var __rspack_reexport = {};
|
|
59
|
-
for(const __rspack_import_key in _plugins__rspack_import_0)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_plugins__rspack_import_0[__rspack_import_key];
|
|
60
|
-
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
61
|
-
var _utils__rspack_import_1 = __webpack_require__("./utils");
|
|
62
|
-
var __rspack_reexport = {};
|
|
63
|
-
for(const __rspack_import_key in _utils__rspack_import_1)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_utils__rspack_import_1[__rspack_import_key];
|
|
64
|
-
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
65
|
-
})();
|
|
66
|
-
for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
67
|
-
Object.defineProperty(exports, '__esModule', {
|
|
68
|
-
value: true
|
|
69
|
-
});
|