@nocobase/devtools 2.1.0-beta.34 → 2.1.0-beta.35
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/common.js +11 -1
- package/package.json +6 -6
- package/rsbuildConfig.d.ts +1 -0
- package/rsbuildConfig.js +16 -0
package/common.js
CHANGED
|
@@ -131,6 +131,10 @@ export default function devDynamicImport(packageName: string): Promise<any> {
|
|
|
131
131
|
absolute: true,
|
|
132
132
|
});
|
|
133
133
|
|
|
134
|
+
if (process.env.NOCOBASE_DEV_LOCAL_PLUGINS_ONLY === 'true') {
|
|
135
|
+
return this.getPluginContent(pluginFolders);
|
|
136
|
+
}
|
|
137
|
+
|
|
134
138
|
const storagePluginFolders = glob.sync(['*/package.json', '*/*/package.json'], {
|
|
135
139
|
cwd: resolvePluginStoragePath(),
|
|
136
140
|
onlyFiles: true,
|
|
@@ -141,7 +145,13 @@ export default function devDynamicImport(packageName: string): Promise<any> {
|
|
|
141
145
|
.sync(['plugin-*/package.json'], { cwd: this.nocobaseDir, onlyFiles: true, absolute: true })
|
|
142
146
|
.map((item) => realpathSync(item));
|
|
143
147
|
|
|
144
|
-
return
|
|
148
|
+
return this.getPluginContent(
|
|
149
|
+
Array.from(new Set([...pluginFolders, ...storagePluginFolders, ...nocobasePluginFolders])),
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
getPluginContent(pluginPackageJsonPaths) {
|
|
154
|
+
return pluginPackageJsonPaths
|
|
145
155
|
.filter((item) => {
|
|
146
156
|
const pluginDir = dirname(item);
|
|
147
157
|
const clientJs = join(pluginDir, this.options.clientRootFile);
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/devtools",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.35",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./src/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@nocobase/build": "2.1.0-beta.
|
|
9
|
-
"@nocobase/client": "2.1.0-beta.
|
|
10
|
-
"@nocobase/test": "2.1.0-beta.
|
|
11
|
-
"@nocobase/utils": "2.1.0-beta.
|
|
8
|
+
"@nocobase/build": "2.1.0-beta.35",
|
|
9
|
+
"@nocobase/client": "2.1.0-beta.35",
|
|
10
|
+
"@nocobase/test": "2.1.0-beta.35",
|
|
11
|
+
"@nocobase/utils": "2.1.0-beta.35",
|
|
12
12
|
"@rsbuild/core": "1.7.3",
|
|
13
13
|
"@rsbuild/plugin-less": "^1.6.2",
|
|
14
14
|
"@rsbuild/plugin-node-polyfill": "1.4.4",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
58
58
|
"directory": "packages/core/devtools"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "74310d8b9e9581fcde14b5a93d12b41ddb5bb325"
|
|
61
61
|
}
|
package/rsbuildConfig.d.ts
CHANGED
package/rsbuildConfig.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import common from './common.js';
|
|
2
|
+
import path from 'node:path';
|
|
2
3
|
|
|
3
4
|
const { getPackagePaths, generateV2Plugins, generatePlugins } = common;
|
|
4
5
|
|
|
@@ -9,4 +10,19 @@ export function getRsbuildAlias() {
|
|
|
9
10
|
}, {});
|
|
10
11
|
}
|
|
11
12
|
|
|
13
|
+
function addPackageModuleAlias(alias, packageName, subpath, targetFile) {
|
|
14
|
+
if (alias[subpath]) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
alias[`${subpath}$`] = path.resolve(process.cwd(), 'node_modules', packageName, targetFile);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function getRsbuildBrowserAlias() {
|
|
21
|
+
const alias = getRsbuildAlias();
|
|
22
|
+
addPackageModuleAlias(alias, '@nocobase/client', '@nocobase/client', 'es/index.mjs');
|
|
23
|
+
addPackageModuleAlias(alias, '@nocobase/client-v2', '@nocobase/client-v2', 'es/index.mjs');
|
|
24
|
+
addPackageModuleAlias(alias, '@nocobase/client-v2', '@nocobase/client-v2/flow-compat', 'es/flow-compat/index.mjs');
|
|
25
|
+
return alias;
|
|
26
|
+
}
|
|
27
|
+
|
|
12
28
|
export { generateV2Plugins, generatePlugins };
|