@vtj/local 0.13.25 → 0.13.27

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/index.cjs CHANGED
@@ -2037,6 +2037,11 @@ function createDevTools(options = {}) {
2037
2037
  materialDirs: [],
2038
2038
  hm: "42f2469b4aa27c3f8978f634c0c19d24",
2039
2039
  enhance: false,
2040
+ devtools: {
2041
+ path: "__devtools__",
2042
+ dir: "./node_modules/@vtj/pro/dist/__devtools__"
2043
+ },
2044
+ copyDevtools: true,
2040
2045
  ...options
2041
2046
  };
2042
2047
  const plugins = [aliasPlugin(opts)];
@@ -2046,8 +2051,8 @@ function createDevTools(options = {}) {
2046
2051
  const materialDirs = opts.materialDirs.map((n) => {
2047
2052
  return `${opts.pluginNodeModulesDir}/${n}/dist`;
2048
2053
  });
2054
+ const copyOptions = [];
2049
2055
  if (opts.copy) {
2050
- const copyOptions = [];
2051
2056
  if (node.pathExistsSync(materialsPath1)) {
2052
2057
  copyOptions.push({
2053
2058
  from: materialsPath1,
@@ -2079,13 +2084,27 @@ function createDevTools(options = {}) {
2079
2084
  emptyDir: true
2080
2085
  });
2081
2086
  }
2082
- if (copyOptions.length > 0) {
2083
- plugins.push(cli.copyPlugin(copyOptions));
2084
- }
2087
+ }
2088
+ if (opts.copyDevtools && opts.devtools && node.pathExistsSync(opts.devtools.dir)) {
2089
+ copyOptions.push({
2090
+ from: opts.devtools.dir,
2091
+ to: "__devtools__",
2092
+ emptyDir: true
2093
+ });
2094
+ }
2095
+ if (copyOptions.length > 0) {
2096
+ plugins.push(cli.copyPlugin(copyOptions));
2085
2097
  }
2086
2098
  if (opts.server) {
2087
2099
  plugins.push(apiServerPlugin(opts));
2088
2100
  const staticOptions = [];
2101
+ if (opts.devtools) {
2102
+ staticOptions.push(
2103
+ Object.assign({}, opts.devtools, {
2104
+ path: `${opts.staticBase}${opts.devtools.path}`
2105
+ })
2106
+ );
2107
+ }
2089
2108
  if (node.pathExistsSync(proPath)) {
2090
2109
  staticOptions.push({
2091
2110
  path: `${opts.staticBase}${CLIENT_DIR}`,
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Plugin } from 'vite';
2
- import { CopyPluginOption, StaticPluginOption } from '@vtj/cli';
2
+ import { StaticPluginOption, CopyPluginOption } from '@vtj/cli';
3
3
 
4
4
  interface DevToolsOptions {
5
5
  baseURL: string;
@@ -23,6 +23,8 @@ interface DevToolsOptions {
23
23
  materialDirs: string[];
24
24
  hm?: string;
25
25
  enhance?: boolean | EnhanceOptions;
26
+ devtools?: StaticPluginOption;
27
+ copyDevtools?: boolean;
26
28
  }
27
29
  interface EnhanceOptions {
28
30
  entry?: string;
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Plugin } from 'vite';
2
- import { CopyPluginOption, StaticPluginOption } from '@vtj/cli';
2
+ import { StaticPluginOption, CopyPluginOption } from '@vtj/cli';
3
3
 
4
4
  interface DevToolsOptions {
5
5
  baseURL: string;
@@ -23,6 +23,8 @@ interface DevToolsOptions {
23
23
  materialDirs: string[];
24
24
  hm?: string;
25
25
  enhance?: boolean | EnhanceOptions;
26
+ devtools?: StaticPluginOption;
27
+ copyDevtools?: boolean;
26
28
  }
27
29
  interface EnhanceOptions {
28
30
  entry?: string;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Plugin } from 'vite';
2
- import { CopyPluginOption, StaticPluginOption } from '@vtj/cli';
2
+ import { StaticPluginOption, CopyPluginOption } from '@vtj/cli';
3
3
 
4
4
  interface DevToolsOptions {
5
5
  baseURL: string;
@@ -23,6 +23,8 @@ interface DevToolsOptions {
23
23
  materialDirs: string[];
24
24
  hm?: string;
25
25
  enhance?: boolean | EnhanceOptions;
26
+ devtools?: StaticPluginOption;
27
+ copyDevtools?: boolean;
26
28
  }
27
29
  interface EnhanceOptions {
28
30
  entry?: string;
package/dist/index.mjs CHANGED
@@ -2030,6 +2030,11 @@ function createDevTools(options = {}) {
2030
2030
  materialDirs: [],
2031
2031
  hm: "42f2469b4aa27c3f8978f634c0c19d24",
2032
2032
  enhance: false,
2033
+ devtools: {
2034
+ path: "__devtools__",
2035
+ dir: "./node_modules/@vtj/pro/dist/__devtools__"
2036
+ },
2037
+ copyDevtools: true,
2033
2038
  ...options
2034
2039
  };
2035
2040
  const plugins = [aliasPlugin(opts)];
@@ -2039,8 +2044,8 @@ function createDevTools(options = {}) {
2039
2044
  const materialDirs = opts.materialDirs.map((n) => {
2040
2045
  return `${opts.pluginNodeModulesDir}/${n}/dist`;
2041
2046
  });
2047
+ const copyOptions = [];
2042
2048
  if (opts.copy) {
2043
- const copyOptions = [];
2044
2049
  if (pathExistsSync(materialsPath1)) {
2045
2050
  copyOptions.push({
2046
2051
  from: materialsPath1,
@@ -2072,13 +2077,27 @@ function createDevTools(options = {}) {
2072
2077
  emptyDir: true
2073
2078
  });
2074
2079
  }
2075
- if (copyOptions.length > 0) {
2076
- plugins.push(copyPlugin(copyOptions));
2077
- }
2080
+ }
2081
+ if (opts.copyDevtools && opts.devtools && pathExistsSync(opts.devtools.dir)) {
2082
+ copyOptions.push({
2083
+ from: opts.devtools.dir,
2084
+ to: "__devtools__",
2085
+ emptyDir: true
2086
+ });
2087
+ }
2088
+ if (copyOptions.length > 0) {
2089
+ plugins.push(copyPlugin(copyOptions));
2078
2090
  }
2079
2091
  if (opts.server) {
2080
2092
  plugins.push(apiServerPlugin(opts));
2081
2093
  const staticOptions = [];
2094
+ if (opts.devtools) {
2095
+ staticOptions.push(
2096
+ Object.assign({}, opts.devtools, {
2097
+ path: `${opts.staticBase}${opts.devtools.path}`
2098
+ })
2099
+ );
2100
+ }
2082
2101
  if (pathExistsSync(proPath)) {
2083
2102
  staticOptions.push({
2084
2103
  path: `${opts.staticBase}${CLIENT_DIR}`,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vtj/local",
3
3
  "private": false,
4
- "version": "0.13.25",
4
+ "version": "0.13.27",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "低代码引擎",
@@ -22,16 +22,16 @@
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
24
  "formidable": "~3.5.1",
25
- "@vtj/coder": "~0.13.25",
26
- "@vtj/parser": "~0.13.25",
27
- "@vtj/node": "~0.12.5",
28
- "@vtj/core": "~0.13.25"
25
+ "@vtj/coder": "~0.13.27",
26
+ "@vtj/core": "~0.13.27",
27
+ "@vtj/parser": "~0.13.27",
28
+ "@vtj/node": "~0.12.5"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/formidable": "~3.4.5",
32
32
  "unbuild": "~2.0.0",
33
33
  "vite": "~6.3.0",
34
- "@vtj/cli": "~0.12.12"
34
+ "@vtj/cli": "~0.12.13"
35
35
  },
36
36
  "exports": {
37
37
  ".": {