@nocobase/build 1.9.25 → 1.9.26

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.
@@ -336,7 +336,11 @@ async function buildProPluginServer(cwd, userConfig, sourcemap, log) {
336
336
  };
337
337
  if (!cwd.includes(import_constant.PLUGIN_COMMERCIAL)) {
338
338
  externalOptions.external = [/^[./]/];
339
- externalOptions.noExternal = [entryFile, /@nocobase\/plugin-commercial\/server/, /dist\/server\/index\.js/];
339
+ externalOptions.noExternal = [
340
+ entryFile,
341
+ /@nocobase\/plugin-commercial\/server/,
342
+ /dist\/server\/index\.js/
343
+ ];
340
344
  externalOptions.onSuccess = async () => {
341
345
  const serverFiles2 = [import_path.default.join(cwd, target_dir, "server", "index.js")];
342
346
  serverFiles2.forEach((file) => {
@@ -345,6 +349,9 @@ async function buildProPluginServer(cwd, userConfig, sourcemap, log) {
345
349
  };
346
350
  externalOptions.esbuildPlugins = [import_pluginEsbuildCommercialInject.default];
347
351
  }
352
+ if (cwd.includes(import_constant.PLUGIN_COMMERCIAL)) {
353
+ externalOptions.noExternal = [/@nocobase\/plugin-license/, /dist\/server\/index\.js/];
354
+ }
348
355
  await (0, import_tsup.build)(
349
356
  userConfig.modifyTsupConfig({
350
357
  entry: [entryFile],
package/lib/constant.js CHANGED
@@ -36,6 +36,7 @@ __export(constant_exports, {
36
36
  PACKAGES_PATH: () => PACKAGES_PATH,
37
37
  PLUGINS_DIR: () => PLUGINS_DIR,
38
38
  PLUGIN_COMMERCIAL: () => PLUGIN_COMMERCIAL,
39
+ PLUGIN_LICENSE: () => PLUGIN_LICENSE,
39
40
  PRESETS_DIR: () => PRESETS_DIR,
40
41
  ROOT_PATH: () => ROOT_PATH,
41
42
  TAR_OUTPUT_DIR: () => TAR_OUTPUT_DIR,
@@ -78,8 +79,13 @@ const PACKAGES_PATH = import_path.default.join(ROOT_PATH, "packages");
78
79
  const PLUGINS_DIR = ["plugins", "samples", "pro-plugins"].concat((process.env.PLUGINS_DIRS || "").split(",")).filter(Boolean).map((name) => import_path.default.join(PACKAGES_PATH, name));
79
80
  const PRESETS_DIR = import_path.default.join(PACKAGES_PATH, "presets");
80
81
  const PLUGIN_COMMERCIAL = "@nocobase/plugin-commercial";
82
+ const PLUGIN_LICENSE = "@nocobase/plugin-license";
81
83
  const getPluginPackages = (packages) => packages.filter((item) => PLUGINS_DIR.some((pluginDir) => item.location.startsWith(pluginDir))).sort((a, b) => {
82
- return a.name === PLUGIN_COMMERCIAL ? -1 : 1;
84
+ const priority = {
85
+ [PLUGIN_LICENSE]: 0,
86
+ [PLUGIN_COMMERCIAL]: 1
87
+ };
88
+ return (priority[a.name] ?? 99) - (priority[b.name] ?? 99);
83
89
  });
84
90
  const getPresetsPackages = (packages) => packages.filter((item) => item.location.startsWith(PRESETS_DIR));
85
91
  const CORE_APP = import_path.default.join(PACKAGES_PATH, "core/app");
@@ -104,6 +110,7 @@ const TAR_OUTPUT_DIR = process.env.TAR_PATH ? process.env.TAR_PATH : import_path
104
110
  PACKAGES_PATH,
105
111
  PLUGINS_DIR,
106
112
  PLUGIN_COMMERCIAL,
113
+ PLUGIN_LICENSE,
107
114
  PRESETS_DIR,
108
115
  ROOT_PATH,
109
116
  TAR_OUTPUT_DIR,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/build",
3
- "version": "1.9.25",
3
+ "version": "1.9.26",
4
4
  "description": "Library build tool based on rollup.",
5
5
  "main": "lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -54,5 +54,5 @@
54
54
  "build": "tsup",
55
55
  "build:watch": "tsup --watch"
56
56
  },
57
- "gitHead": "263145e2a39b6c3a636168c0bb574c9f44af8398"
57
+ "gitHead": "794e25d4aca20fbc68769ad7b1266860bd45ac5c"
58
58
  }