diff --git a/.eslintignore b/.eslintignore index 471fd56b6..4e5924fea 100755 --- a/.eslintignore +++ b/.eslintignore @@ -26,3 +26,4 @@ packages/core/database/src/sql-parser/index.js packages/core/cli/templates/plugin/src/client/*.tpl packages/app/client/src/.plugins docker +storage diff --git a/.gitignore b/.gitignore index f60938b18..8f543e584 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,8 @@ storage/duplicator/* **/.dumi/tmp-test **/.dumi/tmp-production packages/core/client/docs/contributing.md -packages/core/app/client/src/.plugins \ No newline at end of file +packages/core/app/client/src/.plugins +storage/plugins +storage/tar +storage/tmp +storage/app.watch.ts diff --git a/.prettierignore b/.prettierignore index bda3aaf9a..f764678d9 100644 --- a/.prettierignore +++ b/.prettierignore @@ -16,3 +16,4 @@ packages/core/client/src/locale/* packages/core/cli/templates/plugin/src/client/*.tpl packages/app/client/src/.plugins packages/**/locale/** +storage diff --git a/Dockerfile b/Dockerfile index f9c04f42b..fb9b904c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN cd /tmp && \ NEWVERSION="$(cat lerna.json | jq '.version' | tr -d '"').$(date +'%Y%m%d%H%M%S')" \ && tmp=$(mktemp) \ && jq ".version = \"${NEWVERSION}\"" lerna.json > "$tmp" && mv "$tmp" lerna.json -RUN yarn install && yarn build +RUN yarn install && yarn build --no-dts RUN git checkout -b release \ && yarn version:alpha -y \ diff --git a/README.md b/README.md index b731a6b2c..e72eb3c59 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ NocoBase is in early stage of development and is subject to frequent changes, pl ## Recent major updates +- [v0.14: New plugin manager, supports adding plugins through UI - 2023/09/11](https://docs.nocobase.com/welcome/release/v14-changelog) - [v0.13: New application status flow - 2023/08/24](https://docs.nocobase.com/welcome/release/v13-changelog) - [v0.12: New plugin build tool - 2023/08/01](https://docs.nocobase.com/welcome/release/v12-changelog) - [v0.11: New client application, plugin and router - 2023/07/08](http://docs.nocobase.com/welcome/release/v11-changelog) diff --git a/README.zh-CN.md b/README.zh-CN.md index a595adb22..95a0be796 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -8,6 +8,7 @@ NocoBase 正处在早期开发阶段,可能变动频繁,请谨慎用于生 ## 最近重要更新 +- [v0.14:全新的插件管理器,支持通过界面添加插件 - 2023/09/11](https://docs-cn.nocobase.com/welcome/release/v14-changelog) - [v0.13: 全新的应用状态流转 - 2023/08/24](https://docs-cn.nocobase.com/welcome/release/v13-changelog) - [v0.12: 全新的插件构建工具 - 2023/08/01](https://docs-cn.nocobase.com/welcome/release/v12-changelog) - [v0.11: 全新的客户端 Application、Plugin 和 Router - 2023/07/08](https://docs-cn.nocobase.com/welcome/release/v11-changelog) diff --git a/docker/nocobase/nocobase.conf b/docker/nocobase/nocobase.conf index 695dce29e..ab89fa3be 100644 --- a/docker/nocobase/nocobase.conf +++ b/docker/nocobase/nocobase.conf @@ -66,6 +66,19 @@ server { send_timeout 600; } + location ^~ /static/plugins/ { + proxy_pass http://127.0.0.1:13000/static/plugins/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + proxy_connect_timeout 600; + proxy_send_timeout 600; + proxy_read_timeout 600; + send_timeout 600; + } + location /ws { proxy_pass http://127.0.0.1:13000/ws; proxy_http_version 1.1; diff --git a/docs/config.ts b/docs/config.ts index fde014e6b..40ebb642e 100644 --- a/docs/config.ts +++ b/docs/config.ts @@ -84,6 +84,7 @@ const sidebar = { }, // '/welcome/release/index', // '/welcome/release/v08-changelog', + '/welcome/release/v14-changelog', '/welcome/release/v13-changelog', '/welcome/release/v12-changelog', '/welcome/release/v11-changelog', diff --git a/docs/en-US/development/your-fisrt-plugin.md b/docs/en-US/development/your-fisrt-plugin.md index 61d9755e5..d09e939e0 100644 --- a/docs/en-US/development/your-fisrt-plugin.md +++ b/docs/en-US/development/your-fisrt-plugin.md @@ -12,10 +12,10 @@ Once NocoBase is installed, we can start our plugin development journey. First, you can quickly create an empty plugin via the CLI with the following command. ```bash -yarn pm create hello +yarn pm create @my-project/plugin-hello ``` -The directory where the plugin is located ``packages/plugins/hello`` and the plugin directory structure is +The directory where the plugin located is `packages/plugins/@my-project/plugin-hello` and the plugin directory structure is ```bash |- /hello @@ -27,34 +27,26 @@ The directory where the plugin is located ``packages/plugins/hello`` and the plu |- package.json # plugin package information |- server.d.ts |- server.js -package.json - -package.json information - -```json -{ - "name": "@nocobase/plugin-hello", - "version": "0.1.0", - "main": "lib/server/index.js", - "devDependencies": { - "@nocobase/client": "0.8.0-alpha.1", - "@nocobase/test": "0.8.0-alpha.1" - } -} ``` -A NocoBase plugin is also an NPM package, the correspondence rule between plugin name and NPM package name is `${PLUGIN_PACKAGE_PREFIX}-${pluginName}`. +Visit the Plugin Manager to view the plugin you just added, the default address is http://localhost:13000/admin/pm/list/local/ -`PLUGIN_PACKAGE_PREFIX` is the plugin package prefix, which can be customized in .env, [click here for PLUGIN_PACKAGE_PREFIX description](/api/env#plugin_package_prefix). + + +If the plugin is not shown in the plugin manager, you can add it manually with the `pm add` command. + +```bash +yarn pm add @my-project/plugin-hello +``` ## Code the plugin -Look at the `packages/plugins/hello/src/server/plugin.ts` file and modify it to +Look at the `packages/plugins/@my-project/plugin-hello/src/server/plugin.ts` file and modify it to ```ts import { InstallOptions, Plugin } from '@nocobase/server'; -export class HelloPlugin extends Plugin { +export class PluginHelloServer extends Plugin { afterAdd() {} beforeLoad() {} @@ -62,9 +54,7 @@ export class HelloPlugin extends Plugin { async load() { this.db.collection({ name: 'hello', - fields: [ - { type: 'string', name: 'name' } - ], + fields: [{ type: 'string', name: 'name' }], }); this.app.acl.allow('hello', '*'); } @@ -78,24 +68,29 @@ export class HelloPlugin extends Plugin { async remove() {} } -export default HelloPlugin; -``` - -## Register the plugin - -```bash -yarn pm add hello +export default PluginHelloServer; ``` ## Activate the plugin -When the plugin is activated, the hello table that you just configured is automatically created. +**Operated by command** ```bash -yarn pm enable hello +yarn pm enable @my-project/plugin-hello ``` -## Start the application +**Operated by UI** + +Visit the Plugin Manager to view the plugin you just added and click enable. +The Plugin Manager page defaults to http://localhost:13000/admin/pm/list/local/ + + + +Node: When the plugin is activated, the hello collection that you just configured is automatically created. + +## Debug the Plugin + +If the app is not started, you need to start the app first ```bash # for development @@ -106,9 +101,7 @@ yarn build yarn start ``` -## Experience the plugin - -Insert data into the hello table of the plugin +Insert data into the hello collection of the plugin ```bash curl --location --request POST 'http://localhost:13000/api/hello:create' \ @@ -123,3 +116,21 @@ View the data ```bash curl --location --request GET 'http://localhost:13000/api/hello:list' ``` + +## Build the plugin + +```bash +yarn build plugins/@my-project/plugin-hello --tar + +# step-by-step +yarn build plugins/@my-project/plugin-hello +yarn nocobase tar plugins/@my-project/plugin-hello +``` + +The default saved path for the plugin tar is `storage/tar/@my-project/plugin-hello.tar.gz` + +## Upload to other NocoBase applications + +Only supported in v0.14 and above + + diff --git a/docs/en-US/welcome/release/v14-changelog.md b/docs/en-US/welcome/release/v14-changelog.md new file mode 100644 index 000000000..7adb8017d --- /dev/null +++ b/docs/en-US/welcome/release/v14-changelog.md @@ -0,0 +1,59 @@ +# v0.14: New plugin manager, supports adding plugins through UI + +This release enables plug-and-play plugins in production environments. You can now add plugins directly through the UI, and support downloading from the npm registry (which can be private), local uploads, and URL downloads. + +## New features + +### New plugin manager interface + + + +### Uploaded plugins are located in the storage/plugins directory. + +The storage/plugins directory is used to upload plugins, and is organized as npm packages. + +```bash +|- /storage/ + |- /plugins/ + |- /@nocobase/ + |- /plugin-hello1/ + |- /plugin-hello2/ + |- /@foo/ + |- /bar/ + |- /my-nocobase-plugin-hello/ +``` + +### Plugin updates + +Currently, only plugins under storage/plugins can be updated, as shown here: + + + +Note: In order to facilitate maintenance and upgrading, and to avoid unavailability of the storage plugins due to upgrading, you can put the new plugin directly into storage/plugins and then perform the upgrade operation. + +## Incompatible changes + +### Changes to plugin names + +- PLUGIN_PACKAGE_PREFIX environment variable is no longer provided. +- Plugin names and package names are unified, old plugin names can still exist as aliases. + +### Improvements to pm.add + +```bash +# Use packageName instead of pluginName, lookup locally, error if not found +pm add packageName + +# Download from remote only if registry is provided, can also specify version +pm add packageName --registry=xx --auth-token=yy --version=zz + +# You can also provide a local zip, add multiple times and replace it with the last one +pm add /a/plugin.zip + +# Remote zip, replace it with the same name +pm add http://url/plugin.zip +``` + +## Plugin development guide + +[Develop the first plugin](/development/your-fisrt-plugin) diff --git a/docs/zh-CN/development/your-fisrt-plugin.md b/docs/zh-CN/development/your-fisrt-plugin.md index dd52ac407..5227c9d8d 100644 --- a/docs/zh-CN/development/your-fisrt-plugin.md +++ b/docs/zh-CN/development/your-fisrt-plugin.md @@ -9,16 +9,16 @@ ## 创建插件 -首先,你可以通过 CLI 快速的创建一个空插件,命令如下: +通过 CLI 快速地创建一个空插件,命令如下: ```bash -yarn pm create hello +yarn pm create @my-project/plugin-hello ``` -插件所在目录 `packages/plugins/hello`,插件目录结构为: +插件所在目录 `packages/plugins/@my-project/plugin-hello`,插件目录结构为: ```bash -|- /hello +|- /packages/plugins/@my-project/plugin-hello |- /src |- /client # 插件客户端代码 |- /server # 插件服务端代码 @@ -29,32 +29,24 @@ yarn pm create hello |- server.js ``` -package.json 信息 +访问插件管理器界面,查看刚添加的插件,默认地址为 http://localhost:13000/admin/pm/list/local/ -```json -{ - "name": "@nocobase/plugin-hello", - "version": "0.1.0", - "main": "lib/server/index.js", - "devDependencies": { - "@nocobase/client": "0.8.0-alpha.1", - "@nocobase/test": "0.8.0-alpha.1" - } -} + + +如果创建的插件未在插件管理器里显示,可以通过 `pm add` 命令手动添加 + +```bash +yarn pm add @my-project/plugin-hello ``` -NocoBase 插件也是 NPM 包,插件名和 NPM 包名的对应规则为 `${PLUGIN_PACKAGE_PREFIX}-${pluginName}`。 - -`PLUGIN_PACKAGE_PREFIX` 为插件包前缀,可以在 .env 里自定义,[点此查看 PLUGIN_PACKAGE_PREFIX 说明](/api/env#plugin_package_prefix)。 - ## 编写插件 -查看 `packages/plugins/hello/src/server/plugin.ts` 文件,并修改为: +查看 `packages/plugins/@my-project/plugin-hello/src/server/plugin.ts` 文件,并修改为: ```ts import { InstallOptions, Plugin } from '@nocobase/server'; -export class HelloPlugin extends Plugin { +export class PluginHelloServer extends Plugin { afterAdd() {} beforeLoad() {} @@ -62,9 +54,7 @@ export class HelloPlugin extends Plugin { async load() { this.db.collection({ name: 'hello', - fields: [ - { type: 'string', name: 'name' } - ], + fields: [{ type: 'string', name: 'name' }], }); this.app.acl.allow('hello', '*'); } @@ -78,24 +68,29 @@ export class HelloPlugin extends Plugin { async remove() {} } -export default HelloPlugin; -``` - -## 注册插件 - -```bash -yarn pm add hello +export default PluginHelloServer; ``` ## 激活插件 -插件激活时,会自动创建刚才编辑插件配置的 hello 表。 +**通过命令操作** ```bash -yarn pm enable hello +yarn pm enable @my-project/plugin-hello ``` -## 启动应用 +**通过界面操作** + +访问插件管理器界面,查看刚添加的插件,点击激活。 +插件管理器页面默认为 http://localhost:13000/admin/pm/list/local/ + + + +备注:插件激活时,会自动创建刚才编辑插件配置的 hello 表。 + +## 调试插件 + +如果应用未启动,需要先启动应用 ```bash # for development @@ -106,8 +101,6 @@ yarn build yarn start ``` -## 体验插件功能 - 向插件的 hello 表里插入数据 ```bash @@ -123,3 +116,21 @@ curl --location --request POST 'http://localhost:13000/api/hello:create' \ ```bash curl --location --request GET 'http://localhost:13000/api/hello:list' ``` + +## 构建并打包插件 + +```bash +yarn build plugins/@my-project/plugin-hello --tar + +# 分步骤 +yarn build plugins/@my-project/plugin-hello +yarn nocobase tar plugins/@my-project/plugin-hello +``` + +打包的插件默认保存路径为 `storage/tar/@my-project/plugin-hello.tar.gz` + +## 上传至其他 NocoBase 应用 + +仅 v0.14 及以上版本支持 + + diff --git a/docs/zh-CN/welcome/release/v14-changelog.md b/docs/zh-CN/welcome/release/v14-changelog.md new file mode 100644 index 000000000..6f130780c --- /dev/null +++ b/docs/zh-CN/welcome/release/v14-changelog.md @@ -0,0 +1,101 @@ +# v0.14:全新的插件管理器,支持通过界面添加插件 + +v0.14 实现了生产环境下插件的即插即用,可以直接通过界面添加插件,支持从 npm registry(可以是私有的)下载、本地上传、URL 下载。 + +## 新特性 + +### 全新的插件管理器界面 + + + +### 上传的插件位于 storage/plugins 目录 + +提供 storage/plugins 目录用于上传即插即用的插件,目录以 npm packages 的方式组织 + +```bash +|- /storage/ + |- /plugins/ + |- /@nocobase/ + |- /plugin-hello1/ + |- /plugin-hello2/ + |- /my-nocobase-plugin-hello1/ + |- /my-nocobase-plugin-hello2/ +``` + +### 插件的更新 + +目前仅 storage/plugins 下的插件才有更新操作,如图: + + + +备注:为了便于维护和升级,避免因为升级导致 storage 插件不可用,也可以直接将新插件放到 storage/plugins 目录下,再执行升级操作 + +## 不兼容的变化 + +### 插件目录变更 + +开发中的插件统一都放到 packages/plugins 目录下,以 npm packages 的方式组织 + +```diff +|- /packages/ +- |- /plugins/acl/ ++ |- /plugins/@nocobase/plugin-acl/ +- |- /samples/hello/ ++ |- /plugins/@nocobase/plugin-sample-hello/ +``` + +全新的目录结构为 + +```bash +# 开发中的插件 +|- /packages/ + |- /plugins/ + |- /@nocobase/ + |- /plugin-hello1/ + |- /plugin-hello2/ + |- /my-nocobase-plugin-hello1/ + |- /my-nocobase-plugin-hello2/ + +# 通过界面添加的插件 +|- /storage/ + |- /plugins/ + |- /@nocobase/ + |- /plugin-hello1/ + |- /plugin-hello2/ + |- /my-nocobase-plugin-hello1/ + |- /my-nocobase-plugin-hello2/ +``` + +### 插件名的变化 + +- 不再提供 PLUGIN_PACKAGE_PREFIX 环境变量 +- 插件名和包名统一,旧的插件名仍然可以以别名的形式存在 + +### pm add 的改进 + +变更情况 + +```diff +- pm add sample-hello ++ pm add @nocobase/plugin-sample-hello +``` + +pm add 参数说明 + +```bash +# 用 packageName 代替 pluginName,从本地查找,找不到报错 +pm add packageName + +# 只有提供了 registry 时,才从远程下载,也可以指定版本 +pm add packageName --registry=xx --auth-token=yy --version=zz + +# 也可以提供本地压缩包,多次 add 用最后的替换 +pm add /a/plugin.zip + +# 远程压缩包,同名直接替换 +pm add http://url/plugin.zip +``` + +## 插件开发指南 + +[编写第一个插件](/development/your-fisrt-plugin) diff --git a/jest.config.js b/jest.config.js index c3dcc996a..c22ea87d2 100644 --- a/jest.config.js +++ b/jest.config.js @@ -34,5 +34,6 @@ module.exports = { 'package.json', '/demo/', 'package-lock.json', + '/storage/', ], }; diff --git a/package.json b/package.json index bfe620b3d..e578592a8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,8 @@ "name": "nocobase", "private": true, "workspaces": [ - "packages/*/*" + "packages/*/*", + "packages/*/*/*" ], "license": "Apache-2.0", "engines": { @@ -21,6 +22,7 @@ "dev-server": "nocobase dev --server", "start": "nocobase start", "build": "nocobase build", + "tar": "nocobase tar", "test": "nocobase test", "test:client": "vitest", "tc": "yarn test:client", diff --git a/packages/core/build/package.json b/packages/core/build/package.json index eda477e93..675183934 100755 --- a/packages/core/build/package.json +++ b/packages/core/build/package.json @@ -18,17 +18,17 @@ "@types/lerna__project": "5.1.0", "@vercel/ncc": "0.36.1", "chalk": "2.4.2", - "fast-glob": "3.3.0", - "glob": "^7.1.4", + "fast-glob": "^3.3.1", "gulp": "4.0.2", "gulp-typescript": "6.0.0-alpha.1", - "pkg-up": "3.1.0", "tsup": "7.2.0", "typescript": "5.1.3", "update-notifier": "3.0.0", "vite-plugin-css-injected-by-js": "^3.2.1", "vite-plugin-lib-inject-css": "1.2.0", - "yargs-parser": "13.1.2" + "yargs-parser": "13.1.2", + "tar": "^6.2.0", + "@types/tar": "^6.1.5" }, "license": "Apache-2.0", "scripts": { diff --git a/packages/core/build/src/build.ts b/packages/core/build/src/build.ts index 2fbab6618..18c9463a7 100755 --- a/packages/core/build/src/build.ts +++ b/packages/core/build/src/build.ts @@ -17,8 +17,11 @@ import { buildDeclaration } from './buildDeclaration'; import { PkgLog, getPkgLog, toUnixPath, getPackageJson } from './utils'; import { getPackages } from './utils/getPackages'; import { Package } from '@lerna/package'; +import { tarPlugin } from './tarPlugin' export async function build(pkgs: string[]) { + process.env.NODE_ENV = 'production'; + const packages = getPackages(pkgs); const pluginPackages = getPluginPackages(packages); const cjsPackages = getCjsPackages(packages); @@ -63,8 +66,17 @@ export async function buildPackage( ) { const sourcemap = process.argv.includes('--sourcemap'); const noDeclaration = process.argv.includes('--no-dts'); + const hasTar = process.argv.includes('--tar'); + const onlyTar = process.argv.includes('--only-tar'); + const log = getPkgLog(pkg.name); const packageJson = getPackageJson(pkg.location); + + if (onlyTar) { + await tarPlugin(pkg.location, log); + return; + } + log(`${chalk.bold(toUnixPath(pkg.location.replace(PACKAGES_PATH, '').slice(1)))} build start`); // prebuild @@ -88,6 +100,11 @@ export async function buildPackage( log('postbuild'); await runScript(['postbuild'], pkg.location); } + + // tar + if (hasTar) { + await tarPlugin(pkg.location, log); + } } function runScript(args: string[], cwd: string, envs: Record = {}) { diff --git a/packages/core/build/src/buildPlugin.ts b/packages/core/build/src/buildPlugin.ts index 5f1a49c00..a5888b902 100644 --- a/packages/core/build/src/buildPlugin.ts +++ b/packages/core/build/src/buildPlugin.ts @@ -18,7 +18,7 @@ import { getPackagesFromFiles, getSourcePackages, } from './utils/buildPluginUtils'; -import { getDepsConfig } from './utils/getDepsConfig'; +import { getDepPkgPath, getDepsConfig } from './utils/getDepsConfig'; import { EsbuildSupportExts, globExcludeFiles } from './constant'; import { PkgLog, getPackageJson } from './utils'; @@ -26,6 +26,8 @@ const serverGlobalFiles: string[] = ['src/**', '!src/client/**', ...globExcludeF const clientGlobalFiles: string[] = ['src/**', '!src/server/**', ...globExcludeFiles]; const dynamicImportRegexp = /import\((["'])(.*?)\1\)/g; +const sourceGlobalFiles: string[] = ['src/**/*.{ts,js,tsx,jsx}', '!src/**/__tests__']; + const external = [ // nocobase '@nocobase/acl', @@ -138,6 +140,21 @@ export function deleteJsFiles(cwd: string, log: PkgLog) { }); } +export function writeExternalPackageVersion(cwd: string, log: PkgLog) { + log('write external version'); + const sourceFiles = fg.globSync(sourceGlobalFiles, { cwd, absolute: true }).map((item) => fs.readFileSync(item, 'utf-8')); + const sourcePackages = getSourcePackages(sourceFiles); + const excludePackages = getExcludePackages(sourcePackages, external, pluginPrefix); + const data = excludePackages.reduce>((prev, packageName) => { + const depPkgPath = getDepPkgPath(packageName, cwd); + const depPkg = require(depPkgPath); + prev[packageName] = depPkg.version; + return prev; + }, {}); + const externalVersionPath = path.join(cwd, target_dir, 'externalVersion.js'); + fs.writeFileSync(externalVersionPath, `module.exports = ${JSON.stringify(data, null, 2)};`); +} + export async function buildServerDeps(cwd: string, serverFiles: string[], log: PkgLog) { log('build plugin server dependencies'); const outDir = path.join(cwd, target_dir, 'node_modules'); @@ -382,4 +399,5 @@ export async function buildPlugin(cwd: string, sourcemap: boolean, log: PkgLog) console.error(error); } } + writeExternalPackageVersion(cwd, log); } diff --git a/packages/core/build/src/constant.ts b/packages/core/build/src/constant.ts index 5b5deeb0e..965bbbe7b 100644 --- a/packages/core/build/src/constant.ts +++ b/packages/core/build/src/constant.ts @@ -44,3 +44,7 @@ export const getCjsPackages = (packages: Package[]) => .filter((item) => !PLUGINS_DIR.some((dir) => item.location.startsWith(dir))) .filter((item) => !item.location.startsWith(PRESETS_DIR)) .filter((item) => !CJS_EXCLUDE_PACKAGES.includes(item.location)); + +// tar +export const tarIncludesFiles = ['package.json', 'README.md', 'LICENSE', 'dist', '!node_modules', '!src']; +export const TAR_OUTPUT_DIR = process.env.TAR_PATH ? process.env.TAR_PATH : path.join(ROOT_PATH, 'storage', 'tar'); diff --git a/packages/core/build/src/tarPlugin.ts b/packages/core/build/src/tarPlugin.ts new file mode 100644 index 000000000..bc869593b --- /dev/null +++ b/packages/core/build/src/tarPlugin.ts @@ -0,0 +1,29 @@ +import path from 'path'; +import tar from 'tar'; +import fg from 'fast-glob'; +import fs from 'fs-extra'; + +import { PkgLog } from "./utils"; +import { TAR_OUTPUT_DIR, tarIncludesFiles } from './constant' + +export function tarPlugin(cwd: string, log: PkgLog) { + log('tar package'); + const pkg = require(path.join(cwd, 'package.json')); + const npmIgnore = path.join(cwd, '.npmignore'); + let files = pkg.files || []; + if (fs.existsSync(npmIgnore)) { + files = fs.readFileSync(npmIgnore, 'utf-8').split('\n').filter((item) => item.trim()).map(item => `!${item}`); + files.push('**/*'); + } + + // 必须包含的文件 + files.push(...tarIncludesFiles); + + files = files.map((item: string) => item !== '**/*' && fs.existsSync(path.join(cwd, item.replace('!', ''))) && fs.statSync(path.join(cwd, item.replace('!', ''))).isDirectory() ? `${item}/**/*` : item); + + const tarball = path.join(TAR_OUTPUT_DIR, `${pkg.name}-${pkg.version}.tgz`); + const tarFiles = fg.sync(files, { cwd }); + + fs.mkdirpSync(path.dirname(tarball)); + return tar.c({ gzip: true, file: tarball, cwd }, tarFiles); +} diff --git a/packages/core/build/src/utils/getDepsConfig.ts b/packages/core/build/src/utils/getDepsConfig.ts index 1c9a37fa3..af5daedf2 100644 --- a/packages/core/build/src/utils/getDepsConfig.ts +++ b/packages/core/build/src/utils/getDepsConfig.ts @@ -1,5 +1,4 @@ import path from 'path'; -import pkgUp from 'pkg-up'; export function winPath(path: string) { const isExtendedLengthPath = /^\\\\\?\\/.test(path); @@ -40,9 +39,9 @@ export function getDepPkgPath(dep: string, cwd: string) { try { return require.resolve(`${dep}/package.json`, { paths: [cwd] }); } catch { - return pkgUp.sync({ - cwd: require.resolve(dep, { paths: [cwd] }), - })!; + const mainFile = require.resolve(`${dep}`, { paths: cwd ? [cwd] : undefined }); + const packageDir = mainFile.slice(0, mainFile.indexOf(dep.replace('/', path.sep)) + dep.length); + return path.join(packageDir, 'package.json'); } } diff --git a/packages/core/build/src/utils/getPackages.ts b/packages/core/build/src/utils/getPackages.ts index 4330c2d31..d74ac22e6 100644 --- a/packages/core/build/src/utils/getPackages.ts +++ b/packages/core/build/src/utils/getPackages.ts @@ -1,5 +1,6 @@ import Topo from '@hapi/topo'; import fg from 'fast-glob'; +import path from 'path'; import { PACKAGES_PATH, ROOT_PATH } from '../constant'; import { getPackagesSync } from '@lerna/project'; import { Package } from '@lerna/package'; @@ -13,7 +14,13 @@ import { toUnixPath } from './utils'; */ function getPackagesPath(pkgs: string[]) { if (pkgs.length === 0) { - pkgs = ['*/*']; + return fg + .sync(['*/*/package.json', '*/*/*/package.json'], { + cwd: PACKAGES_PATH, + absolute: true, + onlyFiles: true, + }) + .map(toUnixPath).map(item => path.dirname(item)) } return fg .sync(pkgs, { @@ -36,7 +43,7 @@ export function getPackages(pkgs: string[]) { export function sortPackages(packages: Package[]): Package[] { const sorter = new Topo.Sorter(); for (const pkg of packages) { - const pkgJson = require(`${pkg.name}/package.json`); + const pkgJson = require(`${pkg.location}/package.json`,); const after = Object.keys({ ...pkgJson.dependencies, ...pkgJson.devDependencies, ...pkgJson.peerDependencies }); sorter.add(pkg, { after, group: pkg.name }); } diff --git a/packages/core/cli/bin/index.js b/packages/core/cli/bin/index.js index 144b9dc52..b8a3a8e9b 100755 --- a/packages/core/cli/bin/index.js +++ b/packages/core/cli/bin/index.js @@ -15,7 +15,9 @@ const env = { DB_TIMEZONE: '+00:00', DEFAULT_STORAGE_TYPE: 'local', LOCAL_STORAGE_DEST: 'storage/uploads', + PLUGIN_STORAGE_PATH: resolve(process.cwd(), 'storage/plugins'), MFSU_AD: 'none', + NODE_MODULES_PATH: resolve(process.cwd(), 'node_modules'), PM2_HOME: resolve(process.cwd(), './storage/.pm2'), PLUGIN_PACKAGE_PREFIX: '@nocobase/plugin-,@nocobase/plugin-sample-,@nocobase/preset-', }; diff --git a/packages/core/cli/package.json b/packages/core/cli/package.json index 8a54d447e..ae29b9adb 100644 --- a/packages/core/cli/package.json +++ b/packages/core/cli/package.json @@ -15,7 +15,7 @@ "commander": "^9.2.0", "dotenv": "^10.0.0", "execa": "^5.1.1", - "fast-glob": "^3.2.12", + "fast-glob": "^3.3.1", "fs-extra": "^11.1.1", "pm2": "^5.2.0", "portfinder": "^1.0.28", diff --git a/packages/core/cli/src/commands/dev.js b/packages/core/cli/src/commands/dev.js index 693e1da6f..e37a757f7 100644 --- a/packages/core/cli/src/commands/dev.js +++ b/packages/core/cli/src/commands/dev.js @@ -18,6 +18,7 @@ module.exports = (cli) => { .allowUnknownOption() .action(async (opts) => { promptForTs(); + process.env.IS_DEV_CMD = true; if (process.argv.includes('-h') || process.argv.includes('--help')) { run('ts-node', [ @@ -59,6 +60,7 @@ module.exports = (cli) => { const argv = [ 'watch', + '--ignore=./storage/plugins/**', '--tsconfig', './tsconfig.server.json', '-r', diff --git a/packages/core/cli/src/commands/index.js b/packages/core/cli/src/commands/index.js index 9f4e0052f..6fe96ea70 100644 --- a/packages/core/cli/src/commands/index.js +++ b/packages/core/cli/src/commands/index.js @@ -9,6 +9,7 @@ module.exports = (cli) => { generateAppDir(); require('./global')(cli); require('./build')(cli); + require('./tar')(cli); require('./dev')(cli); require('./start')(cli); require('./test')(cli); diff --git a/packages/core/cli/src/commands/postinstall.js b/packages/core/cli/src/commands/postinstall.js index 804004c3a..c2c8f0eb2 100644 --- a/packages/core/cli/src/commands/postinstall.js +++ b/packages/core/cli/src/commands/postinstall.js @@ -3,6 +3,7 @@ const { run, isDev, isPackageValid } = require('../util'); const { resolve } = require('path'); const { existsSync } = require('fs'); const { readFile, writeFile } = require('fs').promises; +const { createStoragePluginsSymlink } = require('@nocobase/utils/plugin-symlink'); /** * @param {Command} cli @@ -13,6 +14,7 @@ module.exports = (cli) => { .command('postinstall') .allowUnknownOption() .action(async () => { + await createStoragePluginsSymlink(); if (!isDev()) { return; } diff --git a/packages/core/cli/src/commands/tar.js b/packages/core/cli/src/commands/tar.js new file mode 100644 index 000000000..096748a63 --- /dev/null +++ b/packages/core/cli/src/commands/tar.js @@ -0,0 +1,27 @@ +const { resolve } = require('path'); +const { Command } = require('commander'); +const { run, nodeCheck, isPackageValid } = require('../util'); + +/** + * + * @param {Command} cli + */ +module.exports = (cli) => { + cli + .command('tar') + .allowUnknownOption() + .argument('[packages...]') + .option('-v, --version', 'print version') + .option('-c, --compile', 'compile the @nocobase/build package') + .option('-w, --watch', 'watch compile the @nocobase/build package') + .action(async (pkgs, options) => { + nodeCheck(); + if (options.compile || options.watch || isPackageValid('@nocobase/build/src/index.ts')) { + await run('yarn', ['build', options.watch ? '--watch' : ''], { + cwd: resolve(process.cwd(), 'packages/core/build'), + }); + if (options.watch) return; + } + await run('nocobase-build', [...pkgs, '--only-tar', options.version ? '--version' : '']); + }); +}; diff --git a/packages/core/cli/src/plugin-generator.js b/packages/core/cli/src/plugin-generator.js index b47baaba5..b8f6bbc76 100644 --- a/packages/core/cli/src/plugin-generator.js +++ b/packages/core/cli/src/plugin-generator.js @@ -2,7 +2,9 @@ const chalk = require('chalk'); const { existsSync } = require('fs'); const { join, resolve } = require('path'); const { Generator } = require('@umijs/utils'); -const { readFile } = require('fs').promises; +const { readFile, writeFile } = require('fs').promises; + +const execa = require('execa'); function camelize(str) { return str.trim().replace(/[-_\s]+(.)?/g, (match, c) => c.toUpperCase()); @@ -33,18 +35,27 @@ class PluginGenerator extends Generator { async getContext() { const { name } = this.context; - const packageName = await getProjectName(); const nocobaseVersion = require('@nocobase/server/package.json').version; const packageVersion = await getProjectVersion(); return { ...this.context, - packageName: `@${packageName}/plugin-${name}`, + packageName: name, packageVersion, nocobaseVersion, - pascalCaseName: capitalize(camelize(name)), + pascalCaseName: capitalize(camelize(name.split('/').pop())), }; } + async addTsConfigPaths() { + const { name } = this.context; + if (name.startsWith('@') && name.split('/')[0] !== '@nocobase') { + const target = resolve(process.cwd(), 'tsconfig.json'); + const content = require(target); + content.compilerOptions.paths[name] = [`packages/plugins/${name}/src`]; + await writeFile(target, JSON.stringify(content, null, 2), 'utf-8'); + } + } + async writing() { const { name } = this.context; const target = resolve(process.cwd(), 'packages/plugins/', name); @@ -59,6 +70,9 @@ class PluginGenerator extends Generator { path: join(__dirname, '../templates/plugin'), }); console.log(''); + await this.addTsConfigPaths(); + execa.sync('yarn', ['install'], { shell: true, stdio: 'inherit' }); + // execa.sync('yarn', ['build', `plugins/${name}`], { shell: true, stdio: 'inherit' }); console.log(`The plugin folder is in ${chalk.green(`packages/plugins/${name}`)}`); } } diff --git a/packages/core/cli/templates/plugin/README.md.tpl b/packages/core/cli/templates/plugin/README.md.tpl new file mode 100644 index 000000000..b6b1af160 --- /dev/null +++ b/packages/core/cli/templates/plugin/README.md.tpl @@ -0,0 +1 @@ +# {{{packageName}}} diff --git a/packages/core/cli/templates/plugin/src/client/index.tsx.tpl b/packages/core/cli/templates/plugin/src/client/index.tsx.tpl index b73d4b98b..70314c292 100644 --- a/packages/core/cli/templates/plugin/src/client/index.tsx.tpl +++ b/packages/core/cli/templates/plugin/src/client/index.tsx.tpl @@ -1,6 +1,6 @@ import { Plugin } from '@nocobase/client'; -export class {{{pascalCaseName}}}Plugin extends Plugin { +export class {{{pascalCaseName}}}Client extends Plugin { async afterAdd() { // await this.app.pm.add() } @@ -18,4 +18,4 @@ export class {{{pascalCaseName}}}Plugin extends Plugin { } } -export default {{{pascalCaseName}}}Plugin; +export default {{{pascalCaseName}}}Client; diff --git a/packages/core/cli/templates/plugin/src/server/plugin.ts.tpl b/packages/core/cli/templates/plugin/src/server/plugin.ts.tpl index aaae501bc..5bcd24c01 100644 --- a/packages/core/cli/templates/plugin/src/server/plugin.ts.tpl +++ b/packages/core/cli/templates/plugin/src/server/plugin.ts.tpl @@ -1,6 +1,6 @@ import { InstallOptions, Plugin } from '@nocobase/server'; -export class {{{pascalCaseName}}}Plugin extends Plugin { +export class {{{pascalCaseName}}}Server extends Plugin { afterAdd() {} beforeLoad() {} @@ -16,4 +16,4 @@ export class {{{pascalCaseName}}}Plugin extends Plugin { async remove() {} } -export default {{{pascalCaseName}}}Plugin; +export default {{{pascalCaseName}}}Server; diff --git a/packages/core/client/src/application/PluginManager.ts b/packages/core/client/src/application/PluginManager.ts index 8bf052e18..4255a8cc0 100644 --- a/packages/core/client/src/application/PluginManager.ts +++ b/packages/core/client/src/application/PluginManager.ts @@ -40,7 +40,7 @@ export class PluginManager { private async initRemotePlugins() { try { - const res = await this.app.apiClient.request({ url: 'app:getPlugins' }); + const res = await this.app.apiClient.request({ url: 'pm:listEnabled' }); const pluginList: PluginData[] = res?.data?.data || []; const plugins = await getPlugins({ requirejs: this.app.requirejs, diff --git a/packages/core/client/src/application/__tests__/Application.test.tsx b/packages/core/client/src/application/__tests__/Application.test.tsx index 8f8c6592f..5b87ddbaa 100644 --- a/packages/core/client/src/application/__tests__/Application.test.tsx +++ b/packages/core/client/src/application/__tests__/Application.test.tsx @@ -10,7 +10,7 @@ import { Plugin } from '../Plugin'; describe('Application', () => { beforeAll(() => { const mock = new MockAdapter(axios); - mock.onGet('app:getPlugins').reply(200, { + mock.onGet('pm:listEnabled').reply(200, { data: [], }); }); diff --git a/packages/core/client/src/application/__tests__/Plugin.test.ts b/packages/core/client/src/application/__tests__/Plugin.test.ts index 5d8313fd9..6f33063d0 100644 --- a/packages/core/client/src/application/__tests__/Plugin.test.ts +++ b/packages/core/client/src/application/__tests__/Plugin.test.ts @@ -6,7 +6,7 @@ import { Plugin } from '../Plugin'; describe('Plugin', () => { beforeAll(() => { const mock = new MockAdapter(axios); - mock.onGet('app:getPlugins').reply(200, { + mock.onGet('pm:listEnabled').reply(200, { data: [], }); }); diff --git a/packages/core/client/src/application/__tests__/RouterManager.test.tsx b/packages/core/client/src/application/__tests__/RouterManager.test.tsx index d2fc62c60..cdda1ca3b 100644 --- a/packages/core/client/src/application/__tests__/RouterManager.test.tsx +++ b/packages/core/client/src/application/__tests__/RouterManager.test.tsx @@ -11,7 +11,7 @@ describe('Router', () => { let app: Application; beforeAll(() => { const mock = new MockAdapter(axios); - mock.onGet('app:getPlugins').reply(200, { + mock.onGet('pm:listEnabled').reply(200, { data: [], }); app = new Application(); diff --git a/packages/core/client/src/application/utils/remotePlugins.ts b/packages/core/client/src/application/utils/remotePlugins.ts index e797347b8..2b1f94b30 100644 --- a/packages/core/client/src/application/utils/remotePlugins.ts +++ b/packages/core/client/src/application/utils/remotePlugins.ts @@ -21,13 +21,11 @@ export function getRemotePlugins( baseURL = baseURL.slice(0, -4); } - // for dynamic import `import()` - (window as any).staticBaseUrl = `/api/plugins/client`; requirejs.requirejs.config({ waitSeconds: 120, paths: pluginData.reduce>((memo, item) => { - memo[item.packageName] = `${baseURL}${item.url}`; - memo[`${item.packageName}/client`] = `${baseURL}${item.url}.js?client`; + memo[item.packageName] = `${baseURL}${item.url}?noExt`; + memo[`${item.packageName}/client`] = `${baseURL}${item.url}?noExtAndIsClient`; return memo; }, {}), }); diff --git a/packages/core/client/src/locale/en_US.ts b/packages/core/client/src/locale/en_US.ts index 8dc088e7b..13b75e2b2 100644 --- a/packages/core/client/src/locale/en_US.ts +++ b/packages/core/client/src/locale/en_US.ts @@ -74,6 +74,8 @@ export default { "Value":"Value", "Disabled":"Disabled", "Enabled":"Enabled", + "Problematic": "Problematic", + "Setting": "Setting", 'On':'On', 'Off':'Off', "Empty":"Empty", @@ -653,6 +655,47 @@ export default { "Local": "Local", "Built-in": "Built-in", "Marketplace": "Marketplace", + "Add plugin": "Add plugin", + "Plugin source": "Plugin source", + "Upgrade": "Upgrade", + "Plugin dependencies check failed": "Plugin dependencies check failed", + "More details": "More details", + "Upload new version": "Upload new version", + "Version": "Version", + "Npm package": "Npm package", + "Npm package name": "Npm package name", + "Upload plugin": "Upload plugin", + "Official plugin": "Official plugin", + "Add type": "Add type", + "Changelog": "Changelog", + "Dependencies check": "Dependencies check", + "Update plugin": "Update plugin", + "Installing": "Installing", + "The deletion was successful.": "The deletion was successful.", + "Plugin Zip File": "Plugin Zip File", + "Compressed file url": "Compressed file url", + "Last updated": "Last updated", + "PackageName": "PackageName", + "DisplayName": "DisplayName", + "Readme": "Readme", + "Dependencies compatibility check": "Dependencies compatibility check", + "Plugin dependencies check failed, you should change the dependent version to meet the version requirements.": "Plugin dependencies check failed, you should change the dependent version to meet the version requirements.", + "Version range": "Version range", + "Plugin's version": "Plugin's version", + "Result": "Result", + "No CHANGELOG.md file": "No CHANGELOG.md file", + "No README.md file": "No README.md file", + "Homepage": "Homepage", + 'Drag and drop the file here or click to upload, file size should not exceed 30M': 'Drag and drop the file here or click to upload, file size should not exceed 30M', + "Dependencies check failed, can't enable.": "Dependencies check failed, can't enable.", + "Plugin starting...": "Plugin starting...", + "Plugin stopping...": "Plugin stopping...", + "Are you sure to delete this plugin?": "Are you sure to delete this plugin?", + "re-download file": "re-download file", + "Not enabled": "Not enabled", + "Search plugin": "Search plugin", + "Author": "Author", + "Plugin loading failed. Please check the server logs.": "Plugin loading failed. Please check the server logs.", "Coming soon...": "Coming soon...", "All plugin settings": "All plugin settings", "Bookmark": "Bookmark", diff --git a/packages/core/client/src/locale/es_ES.ts b/packages/core/client/src/locale/es_ES.ts index a71546584..5fd0deedf 100644 --- a/packages/core/client/src/locale/es_ES.ts +++ b/packages/core/client/src/locale/es_ES.ts @@ -652,6 +652,46 @@ export default { "Local": "Local", "Built-in": "Integrado", "Marketplace": "Mercado", + "New plugin": "Nuevo plugin", + "Upgrade": "Actualizar", + "Dependencies check failed": "Error en la comprobación de dependencias", + "More details": "Más detalles", + "Upload new version": "Subir nueva versión", + "Official plugin": "Plugin oficial", + "Version": "Versión", + "Npm package": "Paquete Npm", + "Upload plugin": "Subir plugin", + "Npm package name": "Nombre del paquete Npm", + "Add type": "Añadir tipo", + "Changelog": "Registro de cambios", + "Dependencies check": "Comprobación de dependencias", + "Update plugin": "Actualizar plugin", + "Installing": "Instalando", + "The deletion was successful.": "Eliminación correcta", + "Plugin Zip File": "Archivo Zip del plugin", + "Compressed file url": "URL del archivo comprimido", + "Last updated": "Última actualización", + "PackageName": "Nombre del paquete", + "DisplayName": "Nombre para mostrar", + "Readme": "Leerme", + "Dependencies compatibility check": "Comprobación de compatibilidad de dependencias", + "If the compatibility check fails, you should change the dependent version to meet the version requirements.": "Si la comprobación de compatibilidad falla, debe cambiar la versión dependiente para cumplir con los requisitos de versión.", + "Version range": "Rango de versión", + "Plugin's version": "Versión del plugin", + "Result": "Resultado", + "No CHANGELOG.md file": "No hay archivo CHANGELOG.md", + "No README.md file": "No hay archivo README.md", + "Homepage": "Página de inicio", + 'Drag and drop the file here or click to upload, file size should not exceed 30M': "Arrastra y suelta el archivo aquí o haz clic para subirlo, el tamaño del archivo no debe superar los 30M", + "Dependencies check failed, can't enable.": "Error en la comprobación de dependencias, no se puede habilitar.", + "Plugin starting...": "Plugin iniciando...", + "Plugin stopping...": "Plugin deteniendo...", + "Are you sure to delete this plugin?": "¿Estás seguro de eliminar este plugin?", + "re-download file": "volver a descargar el archivo", + "Not enabled": "No habilitado", + "Search plugin": "Buscar plugin", + "Author": "Autor", + "Plugin loading failed. Please check the server logs.": "Error al cargar el plugin. Compruebe los registros del servidor.", "Coming soon...": "Próximamente...", "All plugin settings": "Configuración de todos los plugins", "Bookmark": "Marcador", diff --git a/packages/core/client/src/locale/fr_FR.ts b/packages/core/client/src/locale/fr_FR.ts index 2fead3fa8..72423ef4b 100644 --- a/packages/core/client/src/locale/fr_FR.ts +++ b/packages/core/client/src/locale/fr_FR.ts @@ -649,6 +649,46 @@ export default { "Local": "Local", "Built-in": "Intégré", "Marketplace": "Place de marché", + "New plugin": "Nouveau plugin", + "Upgrade": "Mise à jour", + "Dependencies check failed": "Échec de la vérification des dépendances", + "More details": "Plus de détails", + "Upload new version": "Télécharger une nouvelle version", + "Official plugin": "Plugin officiel", + "Version": "Version", + "Npm package": "Paquet Npm", + "Upload plugin": "Télécharger un plugin", + "Npm package name": "Nom du paquet Npm", + "Add type": "Ajouter un type", + "Changelog": "Journal des modifications", + "Dependencies check": "Vérification des dépendances", + "Update plugin": "Mettre à jour le plugin", + "Installing": "Installation", + "The deletion was successful.": "La suppression a réussi.", + "Plugin Zip File": "Fichier Zip du plugin", + "Compressed file url": "URL du fichier compressé", + "Last updated": "Dernière mise à jour", + "PackageName": "Nom du paquet", + "DisplayName": "Nom d'affichage", + "Readme": "Lisez-moi", + "Dependencies compatibility check": "Vérification de la compatibilité des dépendances", + "If the compatibility check fails, you should change the dependent version to meet the version requirements.": "Si la vérification de la compatibilité échoue, vous devez modifier la version dépendante pour répondre aux exigences de version.", + "Version range": "Plage de version", + "Plugin's version": "Version du plugin", + "Result": "Résultat", + "No CHANGELOG.md file": "Aucun fichier CHANGELOG.md", + "No README.md file": "Aucun fichier README.md", + "Homepage": "Page d'accueil", + 'Drag and drop the file here or click to upload, file size should not exceed 30M': "Faites glisser et déposez le fichier ici ou cliquez pour télécharger, la taille du fichier ne doit pas dépasser 30M", + "Dependencies check failed, can't enable.": "Échec de la vérification des dépendances, impossible d'activer.", + "Plugin starting...": "Démarrage du plugin...", + "Plugin stopping...": "Arrêt du plugin...", + "Are you sure to delete this plugin?": "Êtes-vous sûr de vouloir supprimer ce plugin ?", + "re-download file": "re-télécharger le fichier", + "Not enabled": "Non activé", + "Search plugin": "Rechercher un plugin", + "Author": "Auteur", + "Plugin loading failed. Please check the server logs.": "Échec du chargement du plugin. Veuillez vérifier les journaux du serveur.", "Coming soon...": "Bientôt...", "All plugin settings": "Tous les paramètres de plugin", "Bookmark": "Signet", diff --git a/packages/core/client/src/locale/ja_JP.ts b/packages/core/client/src/locale/ja_JP.ts index 2a80965a7..7ee02626f 100644 --- a/packages/core/client/src/locale/ja_JP.ts +++ b/packages/core/client/src/locale/ja_JP.ts @@ -626,5 +626,45 @@ export default { "Tag color field":"ラベルの色フィールド", "Sync successfully":"同期成功", "Sync from form fields":"フォームフィールドの同期", - "Select all":"すべて選択" + "Select all": "すべて選択", + "New plugin": "新しいプラグイン", + "Upgrade": "アップグレード", + "Dependencies check failed": "依存関係のチェックに失敗しました", + "More details": "詳細", + "Upload new version": "新しいバージョンをアップロード", + "Version": "バージョン", + "Npm package": "Npmパッケージ", + "Npm package name": "Npmパッケージ名", + "Upload plugin": "プラグインをアップロード", + "Official plugin": "公式プラグイン", + "Add type": "タイプを追加", + "Changelog": "変更履歴", + "Dependencies check": "依存関係のチェック", + "Update plugin": "プラグインをアップグレード", + "Installing": "インストール中", + "The deletion was successful.": "削除に成功しました。", + "Plugin Zip File": "プラグインZipファイル", + "Compressed file url": "圧縮ファイルのURL", + "Last updated": "最終更新", + "PackageName": "パッケージ名", + "DisplayName": "表示名", + "Readme": "Readme", + "Dependencies compatibility check": "依存関係の互換性チェック", + "If the compatibility check fails, you should change the dependent version to meet the version requirements.": "互換性チェックに失敗した場合は、依存関係のバージョンを変更して、バージョン要件を満たす必要があります。", + "Version range": "バージョン範囲", + "Plugin's version": "プラグインのバージョン", + "Result": "結果", + "No CHANGELOG.md file": "CHANGELOG.mdファイルがありません", + "No README.md file": "README.mdファイルがありません", + "Homepage": "ホームページ", + "Drag and drop the file here or click to upload, file size should not exceed 30M": "ファイルをここにドラッグ&ドロップするか、クリックしてアップロードしてください。ファイルサイズは10Mを超えてはいけません", + "Dependencies check failed, can't enable.": "依存関係のチェックに失敗しました。有効にできません。", + "Plugin starting...": "プラグインを起動しています...", + "Plugin stopping...": "プラグインを停止しています...", + "Are you sure to delete this plugin?": "このプラグインを削除してもよろしいですか?", + "re-download file": "ファイルを再ダウンロード", + "Not enabled": "有効になっていません", + "Search plugin": "プラグインを検索", + "Author": "著者", + "Plugin loading failed. Please check the server logs.": "プラグインのロードに失敗しました。サーバーログを確認してください。", } diff --git a/packages/core/client/src/locale/pt_BR.ts b/packages/core/client/src/locale/pt_BR.ts index 5d436034b..0d665d472 100644 --- a/packages/core/client/src/locale/pt_BR.ts +++ b/packages/core/client/src/locale/pt_BR.ts @@ -615,6 +615,46 @@ export default { "Local": "Local", "Built-in": "Integrado", "Marketplace": "Loja de aplicativos", + "New plugin": "Novo plugin", + "Upgrade": "Atualizar", + "Dependencies check failed": "Falha na verificação de dependências", + "More details": "Mais detalhes", + "Upload new version": "Enviar nova versão", + "Official plugin": "Plugin oficial", + "Version": "Versão", + "Npm package": "Pacote Npm", + "Upload plugin": "Enviar plugin", + "Npm package name": "Nome do pacote Npm", + "Add type": "Adicionar tipo", + "Changelog": "Registro de alterações", + "Dependencies check": "Verificação de dependências", + "Update plugin": "Atualizar plugin", + "Installing": "Instalando", + "The deletion was successful.": "A exclusão foi bem sucedida.", + "Plugin Zip File": "Arquivo Zip do plugin", + "Compressed file url": "URL do arquivo compactado", + "Last updated": "Última atualização", + "PackageName": "Nome do pacote", + "DisplayName": "Nome de exibição", + "Readme": "Leia-me", + "Dependencies compatibility check": "Verificação de compatibilidade de dependências", + "If the compatibility check fails, you should change the dependent version to meet the version requirements.": "Se a verificação de compatibilidade falhar, você deve alterar a versão dependente para atender aos requisitos de versão.", + "Version range": "Intervalo de versão", + "Plugin's version": "Versão do plugin", + "Result": "Resultado", + "No CHANGELOG.md file": "Nenhum arquivo CHANGELOG.md", + "No README.md file": "Nenhum arquivo README.md", + "Homepage": "Página inicial", + "Drag and drop the file here or click to upload, file size should not exceed 30M": "Arraste e solte o arquivo aqui ou clique para enviar, o tamanho do arquivo não deve exceder 30M", + "Dependencies check failed, can't enable.": "Falha na verificação de dependências, não é possível habilitar.", + "Plugin starting...": "Plugin iniciando...", + "Plugin stopping...": "Plugin parando...", + "Are you sure to delete this plugin?": "Tem certeza de que deseja excluir este plugin?", + "re-download file": "re-fazer download do arquivo", + "Not enabled": "Não habilitado", + "Search plugin": "Pesquisar plugin", + "Author": "Autor", + "Plugin loading failed. Please check the server logs.": "Falha ao carregar o plugin. Verifique os logs do servidor.", "Coming soon...": "Em breve...", "All plugin settings": "Configurações de todos os plugins", "Bookmark": "Favoritar", diff --git a/packages/core/client/src/locale/ru_RU.ts b/packages/core/client/src/locale/ru_RU.ts index 228eb6d6e..ef1bc12c4 100644 --- a/packages/core/client/src/locale/ru_RU.ts +++ b/packages/core/client/src/locale/ru_RU.ts @@ -505,5 +505,46 @@ export default { 'Form data templates': "Шаблоны данных формы", "Data template": "Шаблон данных", "Not found":"Не найдено", - "Add":"Добавить" + "Add": "Добавить", + "Select all": "Выбрать все", + "New plugin": "Новый плагин", + "Upgrade": "Обновить", + "Dependencies check failed": "Проверка зависимостей не удалась", + "More details": "Подробнее", + "Upload new version": "Загрузить новую версию", + "Version": "Версия", + "Npm package": "Npm пакет", + "Npm package name": "Имя npm пакета", + "Upload plugin": "Загрузить плагин", + "Official plugin": "Официальный плагин", + "Add type": "Добавить тип", + "Changelog": "Изменения", + "Dependencies check": "Проверка зависимостей", + "Update plugin": "Обновить плагин", + "Installing": "Установка", + "The deletion was successful.": "Удаление прошло успешно.", + "Plugin Zip File": "Zip файл плагина", + "Compressed file url": "URL сжатого файла", + "Last updated": "Последнее обновление", + "PackageName": "Имя пакета", + "DisplayName": "Отображаемое имя", + "Readme": "Инструкция", + "Dependencies compatibility check": "Проверка совместимости зависимостей", + "Plugin dependencies check failed, you should change the dependent version to meet the version requirements.": "Если проверка совместимости зависимостей не удалась, вы должны изменить версию зависимости, чтобы соответствовать требованиям версии.", + "Version range": "Диапазон версий", + "Plugin's version": "Версия плагина", + "Result": "Результат", + "No CHANGELOG.md file": "Нет файла CHANGELOG.md", + "No README.md file": "Нет файла README.md", + "Homepage": "Домашняя страница", + "Drag and drop the file here or click to upload, file size should not exceed 30M": "Перетащите файл сюда или нажмите, чтобы загрузить, размер файла не должен превышать 30M", + "Dependencies check failed, can't enable.": "Проверка зависимостей не удалась, невозможно включить.", + "Plugin starting...": "Запуск плагина...", + "Plugin stopping...": "Остановка плагина...", + "Are you sure to delete this plugin?": "Вы уверены, что хотите удалить этот плагин?", + "re-download file": "повторно загрузить файл", + "Not enabled": "Не включено", + "Search plugin": "Поиск плагина", + "Author": "Автор", + "Plugin loading failed. Please check the server logs.": "Не удалось загрузить плагин. Пожалуйста, проверьте журналы сервера.", } diff --git a/packages/core/client/src/locale/tr_TR.ts b/packages/core/client/src/locale/tr_TR.ts index 6698b5651..a3bcc48b0 100644 --- a/packages/core/client/src/locale/tr_TR.ts +++ b/packages/core/client/src/locale/tr_TR.ts @@ -504,4 +504,44 @@ export default { 'Display data template selector': 'Veri şablonu seçicisini görüntüle', 'Form data templates': 'Form veri şablonları', "Data template": "Veri şablonu", + "New plugin": "Yeni eklenti", + "Upgrade": "Yükselt", + "Dependencies check failed": "Bağımlılıkların kontrolü başarısız oldu", + "More details": "Daha fazla detay", + "Upload new version": "Yeni sürüm yükle", + "Version": "Sürüm", + "Npm package": "Npm paketi", + "Npm package name": "Npm paket adı", + "Upload plugin": "Eklenti yükle", + "Official plugin": "Resmi eklenti", + "Add type": "Tür ekle", + "Changelog": "Değişiklik günlüğü", + "Dependencies check": "Bağımlılıkların kontrolü", + "Update plugin": "Eklentiyi yükselt", + "Installing": "Yükleniyor", + "The deletion was successful.": "Silme başarılı.", + "Plugin Zip File": "Eklenti Zip Dosyası", + "Compressed file url": "Sıkıştırılmış dosya bağlantısı", + "Last updated": "Son güncelleme", + "PackageName": "Paket Adı", + "DisplayName": "Görünen Ad", + "Readme": "Okuma Dosyası", + "Dependencies compatibility check": "Bağımlılık uyumluluğu kontrolü", + "If the compatibility check fails, you should change the dependent version to meet the version requirements.": "Uyumluluk kontrolü başarısız olursa, bağımlı olan sürümü değiştirmeniz gerekmektedir.", + "Version range": "Sürüm aralığı", + "Plugin's version": "Eklentinin sürümü", + "Result": "Sonuç", + "No CHANGELOG.md file": "CHANGELOG.md dosyası bulunmamaktadır", + "No README.md file": "README.md dosyası bulunmamaktadır", + "Homepage": "Anasayfa", + "Drag and drop the file here or click to upload, file size should not exceed 30M": "Dosyayı buraya sürükleyin veya yüklemek için tıklayın, dosya boyutu 30M'i geçmemelidir", + "Dependencies check failed, can't enable.": "Bağımlılık kontrolü başarısız oldu, etkinleştirilemiyor.", + "Plugin starting...": "Eklenti başlatılıyor...", + "Plugin stopping...": "Eklenti durduruluyor...", + "Are you sure to delete this plugin?": "Bu eklentiyi silmek istediğinizden emin misiniz?", + "re-download file": "dosyayı yeniden indir", + "Not enabled": "Etkin değil", + "Search plugin": "Eklenti ara", + "Author": "Yazar", + "Plugin loading failed. Please check the server logs.": "Eklenti yüklenemedi. Lütfen sunucu günlüklerini kontrol edin.", } diff --git a/packages/core/client/src/locale/uk_UA.ts b/packages/core/client/src/locale/uk_UA.ts index 4c7531b43..129e3ea14 100644 --- a/packages/core/client/src/locale/uk_UA.ts +++ b/packages/core/client/src/locale/uk_UA.ts @@ -669,6 +669,46 @@ export default { "Local": "Локальний", "Built-in": "Вбудований", "Marketplace": "Маркетплейс", + "New plugin": "Новий плагін", + "Upgrade": "Оновити", + "Dependencies check failed": "Перевірка залежностей не вдалася", + "More details": "Детальніше", + "Upload new version": "Завантажити нову версію", + "Official plugin": "Офіційний плагін", + "Version": "Версія", + "Npm package": "Npm пакет", + "Upload plugin": "Завантажити плагін", + "Npm package name": "Ім'я пакета npm", + "Add type": "Додати тип", + "Changelog": "Журнал змін", + "Dependencies check": "Перевірка залежностей", + "Update plugin": "Оновити плагін", + "Installing": "Встановлення", + "The deletion was successful.": "Видалення пройшло успішно.", + "Plugin Zip File": "Файл плагіна Zip", + "Compressed file url": "URL стислого файлу", + "Last updated": "Останнє оновлення", + "PackageName": "Назва пакунка", + "DisplayName": "Відображуване ім'я", + "Readme": "Інструкція", + "Dependencies compatibility check": "Перевірка сумісності залежностей", + "Plugin dependencies check failed, you should change the dependent version to meet the version requirements.": "Якщо перевірка сумісності не вдається, вам слід змінити залежну версію, щоб вона відповідала вимогам до версії.", + "Version range": "Діапазон версій", + "Plugin's version": "Версія плагіна", + "Result": "Результат", + "No CHANGELOG.md file": "Файл CHANGELOG.md відсутній", + "No README.md file": "Файл README.md відсутній", + "Homepage": "Домашня сторінка", + "Drag and drop the file here or click to upload, file size should not exceed 30M": "Перетягніть файл сюди або натисніть, щоб завантажити, розмір файлу не повинен перевищувати 10 Мб", + "Dependencies check failed, can't enable.": "Перевірка залежностей не вдалась, неможливо увімкнути.", + "Plugin starting...": "Запуск плагіна...", + "Plugin stopping...": "Зупинка плагіна...", + "Are you sure to delete this plugin?": "Ви впевнені, що хочете видалити цей плагін?", + "re-download file": "перезавантажити файл", + "Not enabled": "Не увімкнено", + "Search plugin": "Пошук плагіна", + "Author": "Автор", + "Plugin loading failed. Please check the server logs.": "Не вдалося завантажити плагін. Будь ласка, перевірте журнали сервера.", "Coming soon...": "Скоро буде...", "All plugin settings": "Всі налаштування плагінів", "Bookmark": "Закладка", diff --git a/packages/core/client/src/locale/zh_CN.ts b/packages/core/client/src/locale/zh_CN.ts index 6bdd78a1f..80178ddc9 100644 --- a/packages/core/client/src/locale/zh_CN.ts +++ b/packages/core/client/src/locale/zh_CN.ts @@ -80,6 +80,7 @@ export default { Value: '字段值', Disabled: '禁用', Enabled: '启用', + Problematic: '有问题', Empty: '赋空值', 'Linkage rule': '联动规则', 'Linkage rules': '联动规则', @@ -708,7 +709,50 @@ export default { 'Plugin manager': '插件管理器', Local: '本地', 'Built-in': '内置', - Marketplace: '插件市场', + 'Marketplace': '插件市场', + "Add plugin": "新增插件", + "Upgrade": "可供更新", + "Plugin dependencies check failed": "插件依赖检查失败", + "Remove": "移除", + "Docs": "文档", + "More details": "更多详情", + "Upload new version": "上传新版", + "Official plugin": "官方插件", + "Version": "版本", + "Npm package": "Npm 包", + "Upload plugin": "上传插件", + "Npm package name": "Npm 包名", + "Add type": "新增方式", + "Plugin source": "插件来源", + "Changelog": "更新日志", + "Dependencies check": "依赖检查", + "Update plugin": "更新插件", + "Installing": "安装中", + "The deletion was successful.": "删除成功", + "Plugin Zip File": "插件压缩包", + "Compressed file url": "压缩包地址", + "Last updated": "最后更新", + "PackageName": "包名", + "DisplayName": "显示名称", + "Readme": "说明文档", + "Dependencies compatibility check": "依赖兼容性检查", + "Plugin dependencies check failed, you should change the dependent version to meet the version requirements.": "插件兼容性检查失败,你应该修改依赖版本以满足版本要求。", + "Version range": "版本范围", + "Plugin's version": "插件的版本", + "Result": "结果", + "No CHANGELOG.md file": "没有 CHANGELOG.md 日志", + "No README.md file": "没有 README.md 文件", + "Homepage": "主页", + 'Drag and drop the file here or click to upload, file size should not exceed 30M': '将文件拖放到此处或单击上传,文件大小不应超过 30M', + "Dependencies check failed, can't enable.": "依赖检查失败,无法启用。", + "Plugin starting...": "插件启动中...", + "Plugin stopping...": "插件停止中...", + "Are you sure to delete this plugin?": "确定要删除此插件吗?", + "re-download file": "重新下载文件", + "Not enabled": "未启用", + "Search plugin": "搜索插件", + "Author": "作者", + "Plugin loading failed. Please check the server logs.": "插件加载失败,请检查服务器日志。", 'Coming soon...': '敬请期待...', 'All plugin settings': '所有插件配置', Bookmark: '书签', diff --git a/packages/core/client/src/nocobase-buildin-plugin/index.tsx b/packages/core/client/src/nocobase-buildin-plugin/index.tsx index 3ea6b00d9..c0f448a7f 100644 --- a/packages/core/client/src/nocobase-buildin-plugin/index.tsx +++ b/packages/core/client/src/nocobase-buildin-plugin/index.tsx @@ -132,12 +132,21 @@ const getProps = (app: Application) => { upgrade: { title: 'App upgrading', }, + 'pm.add': { + title: 'Adding plugin', + }, + 'pm.update': { + title: 'Updating plugin', + }, 'pm.enable': { title: 'Enabling plugin', }, 'pm.disable': { title: 'Disabling plugin', }, + 'pm.remove': { + title: 'Removing plugin', + }, }; return { ...props, ...commands[app.error?.command?.name] }; } diff --git a/packages/core/client/src/pm/Card.tsx b/packages/core/client/src/pm/Card.tsx deleted file mode 100644 index f8c907e73..000000000 --- a/packages/core/client/src/pm/Card.tsx +++ /dev/null @@ -1,359 +0,0 @@ -import { DeleteOutlined, SettingOutlined } from '@ant-design/icons'; -import { - App, - Avatar, - Card, - Modal, - Popconfirm, - Spin, - Switch, - Tabs, - TabsProps, - Tag, - Tooltip, - Typography, - message, -} from 'antd'; -import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { useTranslation } from 'react-i18next'; -import { useNavigate } from 'react-router-dom'; -import type { IPluginData } from '.'; -import { useAPIClient, useRequest } from '../api-client'; -import { useGlobalTheme } from '../global-theme'; -import { useStyles as useMarkdownStyles } from '../schema-component/antd/markdown/style'; -import { useParseMarkdown } from '../schema-component/antd/markdown/util'; -import { useStyles } from './style'; - -interface PluginDocumentProps { - path: string; - name: string; -} - -interface ICommonCard { - onClick: () => void; - name: string; - description: string; - title: string; - displayName: string; - actions?: JSX.Element[]; -} - -interface IPluginDetail { - plugin: any; - onCancel: () => void; - items: TabsProps['items']; -} - -/** - * get color by string - * TODO: real avatar - * @param str - */ -const stringToColor = function (str: string) { - let hash = 0; - for (let i = 0; i < str.length; i++) { - hash = str.charCodeAt(i) + ((hash << 5) - hash); - } - let color = '#'; - for (let i = 0; i < 3; i++) { - const value = (hash >> (i * 8)) & 0xff; - color += ('00' + value.toString(16)).substr(-2); - } - return color; -}; - -const PluginDocument: React.FC = (props) => { - const { styles } = useStyles(); - const { isDarkTheme } = useGlobalTheme(); - const { componentCls, hashId } = useMarkdownStyles({ isDarkTheme }); - const [docLang, setDocLang] = useState(''); - const { name, path } = props; - const { data, loading, error } = useRequest<{ - data: { - content: string; - }; - }>( - { - url: '/plugins:getTabInfo', - params: { - filterByTk: name, - path: path, - locale: docLang, - }, - }, - { - refreshDeps: [name, path, docLang], - }, - ); - const { html, loading: parseLoading } = useParseMarkdown(data?.data?.content); - - const htmlWithOutRelativeDirect = useMemo(() => { - if (html) { - const pattern = / match + `onclick="return false;"`); // prevent the default event of - } - }, [html]); - - const handleSwitchDocLang = useCallback((e: MouseEvent) => { - const lang = (e.target as HTMLDivElement).innerHTML; - if (lang.trim() === '中文') { - setDocLang('zh-CN'); - } else if (lang.trim() === 'English') { - setDocLang('en-US'); - } - }, []); - - useEffect(() => { - const md = document.getElementById('pm-md-preview'); - md.addEventListener('click', handleSwitchDocLang); - return () => { - removeEventListener('click', handleSwitchDocLang); - }; - }, [handleSwitchDocLang]); - - return ( -
- {loading || parseLoading ? ( - - ) : ( -
- )} -
- ); -}; - -function PluginDetail(props: IPluginDetail) { - const { plugin, onCancel, items } = props; - const { styles } = useStyles(); - - return ( - - {plugin?.displayName || plugin?.name} - v{plugin?.version} - - } - open={!!plugin} - onCancel={onCancel} - destroyOnClose - > - {plugin?.description &&
{plugin?.description}
} - -
- ); -} - -function CommonCard(props: ICommonCard) { - const { onClick, name, displayName, actions, description, title } = props; - const { styles } = useStyles(); - - return ( - Settings
, Remove, ]} - > - {name?.[0]}} - description={ - -
- {description || '-'} -
-
- } - title={ - - {displayName || name} - {title} - - } - /> - - ); -} - -export const PluginCard = (props: { data: IPluginData }) => { - const navigate = useNavigate(); - const { data } = props; - const api = useAPIClient(); - const { t } = useTranslation(); - const { enabled, name, displayName, id, description, version } = data; - const [plugin, setPlugin] = useState(null); - const { modal } = App.useApp(); - const { data: tabsData, run } = useRequest( - { - url: '/plugins:getTabs', - }, - { - manual: true, - }, - ); - const items = useMemo(() => { - return tabsData?.data?.tabs.map((item) => { - return { - label: item.title, - key: item.path, - children: React.createElement(PluginDocument, { - name: tabsData?.data.filterByTk, - path: item.path, - }), - }; - }); - }, [tabsData?.data]); - - const actions = useMemo( - () => - [ - enabled ? ( - { - e.stopPropagation(); - navigate(`/admin/settings/${name}`); - }} - /> - ) : null, - { - e.stopPropagation(); - await api.request({ - url: `pm:remove/${name}`, - }); - message.success(t('插件删除成功')); - // window.location.reload(); - }} - onCancel={(e) => e.stopPropagation()} - okText={t('Yes')} - cancelText={t('No')} - > - e.stopPropagation()} /> - , - { - e.stopPropagation(); - await api.request({ - url: `pm:${checked ? 'enable' : 'disable'}/${name}`, - }); - }} - checked={enabled} - >, - ].filter(Boolean), - [api, enabled, navigate, id, name, t], - ); - return ( - <> - setPlugin(null)} items={items} /> - { - setPlugin(data); - run({ - params: { - filterByTk: name, - }, - }); - }} - name={name} - description={description} - title={version} - actions={actions} - displayName={displayName} - /> - - ); -}; - -export const BuiltInPluginCard = (props: { data: IPluginData }) => { - const { - data: { description, name, version, displayName }, - data, - } = props; - const navigate = useNavigate(); - const [plugin, setPlugin] = useState(null); - const { data: tabsData, run } = useRequest<{ - data: { - tabs: { - title: string; - path: string; - }[]; - filterByTk: string; - }; - }>( - { - url: '/plugins:getTabs', - }, - { - manual: true, - }, - ); - const items = useMemo(() => { - return tabsData?.data?.tabs.map((item) => { - return { - label: item.title, - key: item.path, - children: React.createElement(PluginDocument, { - name: tabsData?.data.filterByTk, - path: item.path, - }), - }; - }); - }, [tabsData?.data]); - - return ( - <> - setPlugin(null)} items={items} /> - { - setPlugin(data); - run({ - params: { - filterByTk: name, - }, - }); - }} - name={name} - displayName={displayName} - description={description} - title={version} - actions={[ -
, - { - e.stopPropagation(); - navigate(`/admin/settings/${name}`); - }} - />, - ]} - /> - - ); -}; diff --git a/packages/core/client/src/pm/PluginCard.tsx b/packages/core/client/src/pm/PluginCard.tsx new file mode 100644 index 000000000..045532d0b --- /dev/null +++ b/packages/core/client/src/pm/PluginCard.tsx @@ -0,0 +1,219 @@ +import { App, Card, Divider, Popconfirm, Space, Switch, Typography, message } from 'antd'; +import classnames from 'classnames'; +import React, { FC, useState } from 'react'; +import { useTranslation } from 'react-i18next'; +import { useNavigate } from 'react-router-dom'; + +import { DeleteOutlined, ReadOutlined, ReloadOutlined, SettingOutlined } from '@ant-design/icons'; +import { css } from '@emotion/css'; +import { useAPIClient } from '../api-client'; +import { PluginDetail } from './PluginDetail'; +import { PluginUpgradeModal } from './PluginForm/modal/PluginUpgradeModal'; +import { useStyles } from './style'; +import type { IPluginData } from './types'; + +interface IPluginInfo extends IPluginCard { + onClick: () => void; +} + +function PluginInfo(props: IPluginInfo) { + const { data, onClick } = props; + const { name, displayName, isCompatible, packageName, updatable, builtIn, enabled, description, type, error } = data; + const { styles, theme } = useStyles(); + const navigate = useNavigate(); + const { t } = useTranslation(); + const api = useAPIClient(); + const { modal } = App.useApp(); + const [showUploadForm, setShowUploadForm] = useState(false); + const [enabledVal, setEnabledVal] = useState(enabled); + const reload = () => window.location.reload(); + + return ( + <> + {showUploadForm && ( + { + setShowUploadForm(false); + }} + /> + )} + { + !error && onClick(); + }} + headStyle={{ border: 'none', minHeight: 'inherit', paddingTop: 14 }} + bodyStyle={{ paddingTop: 10 }} + // style={{ marginBottom: theme.marginLG }} + title={
{displayName || name || packageName}
} + hoverable + className={css` + .ant-card-actions { + li .ant-space { + gap: 2px !important; + } + li a { + .anticon { + margin-right: 3px; + /* display: none; */ + } + } + li:last-child { + width: 20% !important; + } + li:first-child { + width: 80% !important; + border-inline-end: 0; + text-align: left; + padding-left: 16px; + } + } + `} + actions={[ + } key={'1'}> + + {t('Docs')} + + {updatable && ( + { + e.stopPropagation(); + setShowUploadForm(true); + }} + > + {t('Update')} + + )} + {enabled ? ( + { + e.stopPropagation(); + navigate(`/admin/settings/${name}`); + }} + > + {t('Setting')} + + ) : ( + { + e.stopPropagation(); + api.request({ + url: `pm:remove`, + params: { + filterByTk: name, + }, + }); + }} + onCancel={(e) => e.stopPropagation()} + okText={t('Yes')} + cancelText={t('No')} + > + { + e.stopPropagation(); + }} + className={classnames({ [styles.cardActionDisabled]: builtIn })} + > + {t('Remove')} + + + )} + , + { + e.stopPropagation(); + if (!isCompatible && checked) { + message.error(t("Dependencies check failed, can't enable.")); + return; + } + await api.request({ + url: `pm:${checked ? 'enable' : 'disable'}`, + params: { + filterByTk: name, + }, + }); + }} + checked={enabledVal} + >, + ].filter(Boolean)} + > + + {isCompatible ? description : t('Plugin dependencies check failed')} + + ) : ( + + {t('Plugin loading failed. Please check the server logs.')} + + ) + } + /> + {/* {!isCompatible && !error && ( + + )} */} + {/* + + + {type && ( + + )} + + {!error && ( + + )} + + */} +
+ + ); +} + +export interface IPluginCard { + data: IPluginData; +} + +export const PluginCard: FC = (props) => { + const { data } = props; + const [plugin, setPlugin] = useState(undefined); + + return ( + <> + {plugin && setPlugin(undefined)} />} + { + setPlugin(data); + }} + data={data} + /> + + ); +}; diff --git a/packages/core/client/src/pm/PluginDetail.tsx b/packages/core/client/src/pm/PluginDetail.tsx new file mode 100644 index 000000000..ef48cdb03 --- /dev/null +++ b/packages/core/client/src/pm/PluginDetail.tsx @@ -0,0 +1,265 @@ +import { Alert, Col, Modal, Row, Space, Spin, Table, Tabs, TabsProps, Tag, Typography } from 'antd'; +import dayjs from 'dayjs'; +import relativeTime from 'dayjs/plugin/relativeTime'; +import React, { FC, useMemo } from 'react'; +import { useTranslation } from 'react-i18next'; +import { useRequest } from '../api-client'; +import { PluginDocument } from './PluginDocument'; +import { useStyles } from './style'; +import { IPluginData } from './types'; + +dayjs.extend(relativeTime); + +type Author = + | string + | { + name: string; + email?: string; + url?: string; + }; + +interface PackageJSON { + name: string; + version: string; + description?: string; + repository?: string | { type: string; url: string }; + homepage?: string; + license?: string; + author?: Author; + devDependencies?: Record; + dependencies?: Record; +} + +interface DepCompatible { + name: string; + result: boolean; + versionRange: string; + packageVersion: string; +} + +interface IPluginDetailData { + packageJson: PackageJSON; + depsCompatible: DepCompatible[] | false; + lastUpdated: string; +} + +interface IPluginDetail { + plugin: IPluginData; + onCancel: () => void; +} + +export const PluginDetail: FC = ({ plugin, onCancel }) => { + const { t } = useTranslation(); + const dependenciesCompatibleTableColumns = useMemo( + () => [ + { + title: t('Name'), + dataIndex: 'name', + key: 'name', + }, + { + title: t('Version range'), + dataIndex: 'versionRange', + key: 'versionRange', + }, + { + title: t("Plugin's version"), + dataIndex: 'packageVersion', + key: 'packageVersion', + }, + { + title: t('Result'), + dataIndex: 'result', + key: 'result', + render: (result: boolean) => {result ? 'Yes' : 'No'}, + }, + ], + [t], + ); + const { data, loading } = useRequest<{ data: IPluginDetailData }>( + { + url: `pm:get`, + params: { + filterByTk: plugin.name, + }, + }, + { + refreshDeps: [plugin.name], + ready: !!plugin.name, + }, + ); + + const repository = useMemo(() => { + if (!data?.data?.packageJson?.repository) return null; + const repository = data?.data?.packageJson.repository; + const url = typeof repository === 'string' ? repository : repository.url; + return url.replace(/\.git$/, '').replace(/^git\+/, ''); + }, [data]); + + const author = useMemo(() => { + const author = data?.data?.packageJson.author; + if (!author) return null; + if (typeof author === 'string') return author; + return author.name; + }, [data]); + + const { styles, theme } = useStyles(); + + const tabItems: TabsProps['items'] = [ + { + key: 'readme', + label: t('Readme'), + children: ( + + + {plugin?.readmeUrl ? ( + + ) : ( + t('No README.md file') + )} + + + + {plugin.name && ( + +
+ {t('Name')} + {plugin.name} +
+ + )} + {plugin.displayName && ( + +
+ {t('DisplayName')} + {plugin.displayName} +
+ + )} + +
+ {t('PackageName')} + {plugin.packageName} +
+ + {repository && ( + +
+ {t('Repository')} + {repository} +
+ + )} + {data?.data?.packageJson.homepage && ( + +
+ {t('Homepage')} + {data?.data?.packageJson.homepage} +
+ + )} + {plugin.description && ( + +
+ {t('Description')} + {plugin.description} +
+ + )} + {data?.data?.packageJson.license && ( + +
+ {t('License')} + {data?.data?.packageJson.license} +
+ + )} + {author && ( + +
+ {t('Author')} + {author} +
+ + )} + +
+ {t('Last updated')} + {dayjs(data?.data?.lastUpdated).fromNow()} +
+ + +
+ {t('Version')} + {plugin?.version} +
+ +
+ +
+ ), + }, + { + key: 'dependencies', + label: t('Dependencies compatibility check'), + children: ( + <> + {data?.data?.depsCompatible === false ? ( + + {t('`dist/externalVersion.js` not found or failed to `require`. Please rebuild this plugin.')} + + ) : ( + <> + {!data?.data?.['isCompatible'] && ( + + )} + + + )} + + ), + }, + { + key: 'changelog', + label: t('Changelog'), + children: plugin?.changelogUrl ? : t('No CHANGELOG.md file'), + }, + ]; + + return ( + + {loading ? ( + + ) : ( + plugin && ( + <> + {plugin.packageName} +  • }> + {plugin.version} + + {t('Last updated')} {dayjs(data?.data?.lastUpdated).fromNow()} + + + + + ) + )} + + ); +}; diff --git a/packages/core/client/src/pm/PluginDocument.tsx b/packages/core/client/src/pm/PluginDocument.tsx new file mode 100644 index 000000000..85fb33213 --- /dev/null +++ b/packages/core/client/src/pm/PluginDocument.tsx @@ -0,0 +1,75 @@ +import { Spin } from 'antd'; +import React, { memo, useCallback, useEffect, useMemo, useState } from 'react'; + +import { useRequest } from '../api-client'; +import { useStyles as useMarkdownStyles } from '../schema-component/antd/markdown/style'; +import { useParseMarkdown } from '../schema-component/antd/markdown/util'; +import { useStyles } from './style'; +import { useGlobalTheme } from '../global-theme'; + +const PLUGIN_STATICS_PATH = '/static/plugins/'; + +interface PluginDocumentProps { + url: string; + packageName?: string; +} + +export const PluginDocument: React.FC = memo((props) => { + const { isDarkTheme } = useGlobalTheme(); + const { componentCls, hashId } = useMarkdownStyles({ isDarkTheme }); + const { styles } = useStyles(); + const { url, packageName } = props; + const [docUrl, setDocUrl] = useState(url); + const { data, loading, error } = useRequest( + { url: docUrl, baseURL: '/' }, + { + refreshDeps: [docUrl], + }, + ); + const { html, loading: parseLoading } = useParseMarkdown(data); + + const htmlWithOutRelativeDirect = useMemo(() => { + if (html) { + let res = html; + const pattern = / match + `onclick="return false;"`); // prevent the default event of + + // replace img src + res = res.replace(/src="(.*?)"/g, (match, src: string) => { + if (src.startsWith('http') || src.startsWith('//:')) return match; + return `src="${PLUGIN_STATICS_PATH}${packageName}/${src}"`; + }); + return res; + } + return ''; + }, [html, packageName]); + + const handleSwitchDocLang = useCallback((e: MouseEvent) => { + const url = (e.target as HTMLDivElement).getAttribute('href'); + if (!url) return; + const parsedUrl = new URL(docUrl, window.location.origin); + const combinedUrl = new URL(url, parsedUrl); + setDocUrl(combinedUrl.pathname); + }, []); + + useEffect(() => { + const md = document.getElementById('pm-md-preview'); + md.addEventListener('click', handleSwitchDocLang); + return () => { + removeEventListener('click', handleSwitchDocLang); + }; + }, [handleSwitchDocLang]); + + return ( +
+ {loading || parseLoading ? ( + + ) : ( +
+ )} +
+ ); +}); diff --git a/packages/core/client/src/pm/PluginForm/form/PluginNpmForm.tsx b/packages/core/client/src/pm/PluginForm/form/PluginNpmForm.tsx new file mode 100644 index 000000000..dd136887f --- /dev/null +++ b/packages/core/client/src/pm/PluginForm/form/PluginNpmForm.tsx @@ -0,0 +1,164 @@ +import { ISchema } from '@formily/json-schema'; +import { useForm } from '@formily/react'; +import { uid } from '@formily/shared'; +import { App } from 'antd'; +import React, { FC, useMemo } from 'react'; +import { useTranslation } from 'react-i18next'; + +import { pick } from 'lodash'; +import { useAPIClient, useRequest } from '../../../api-client'; +import { SchemaComponent } from '../../../schema-component'; +import { IPluginData } from '../../types'; + +interface IPluginNpmFormProps { + onClose: (refresh?: boolean) => void; + isUpgrade: boolean; + pluginData?: IPluginData; +} + +export const PluginNpmForm: FC = ({ onClose, isUpgrade, pluginData }) => { + const { message } = App.useApp(); + // const { data, loading } = useRequest<{ data: string[] }>( + // { + // url: `/pm:npmVersionList/${pluginData?.name}`, + // }, + // { + // refreshDeps: [pluginData?.name], + // ready: !!pluginData?.name, + // }, + // ); + + const versionList = []; + // useMemo(() => { + // return data?.data.map((item) => ({ label: item, value: item })) || []; + // }, [data?.data]); + + const useSaveValues = () => { + const api = useAPIClient(); + const { t } = useTranslation(); + const form = useForm(); + + return { + async run() { + await form.submit(); + api.request({ + url: isUpgrade ? 'pm:update' : 'pm:add', + method: 'post', + data: { + ...form.values, + }, + }); + onClose(true); + }, + }; + }; + + const useValuesFromProps = (options) => { + return useRequest( + () => + Promise.resolve({ + data: isUpgrade ? pick(pluginData, ['name', 'packageName', 'version']) : {}, + }), + options, + ); + }; + + const useCancel = () => { + return { + run() { + onClose(); + }, + }; + }; + const schema = useMemo(() => { + const id = uid(); + const schema = { + type: 'object', + properties: { + [id]: { + 'x-decorator': 'Form', + 'x-component': 'div', + type: 'void', + 'x-decorator-props': { + useValues: '{{ useValuesFromProps }}', + }, + properties: { + packageName: { + type: 'string', + title: "{{t('Npm package name')}}", + 'x-decorator': 'FormItem', + 'x-component': 'Input', + required: true, + 'x-component-props': { + disabled: true, + }, + }, + registry: { + type: 'string', + title: "{{t('Registry url')}}", + default: 'https://registry.npmjs.org/', + 'x-decorator': 'FormItem', + 'x-component': 'Input', + // required: true, + 'x-decorator-props': { + tooltip: 'Example: https://registry.npmjs.org/', + }, + }, + authToken: { + type: 'string', + title: "{{t('Npm authToken')}}", + 'x-decorator': 'FormItem', + 'x-component': 'Input', + }, + version: { + type: 'string', + title: "{{t('Version')}}", + 'x-decorator': 'FormItem', + 'x-component': 'Input', + // enum: '{{versionList}}', + }, + footer: { + type: 'void', + 'x-component': 'ActionBar', + 'x-component-props': { + layout: 'one-column', + style: { + justifyContent: 'right', + }, + }, + properties: { + cancel: { + title: 'Cancel', + 'x-component': 'Action', + 'x-component-props': { + useAction: '{{ useCancel }}', + }, + }, + submit: { + title: '{{t("Submit")}}', + 'x-component': 'Action', + 'x-component-props': { + type: 'primary', + htmlType: 'submit', + useAction: '{{ useSaveValues }}', + }, + }, + }, + }, + }, + }, + }, + }; + + schema.properties[id].properties.packageName['x-component-props'].disabled = isUpgrade; + if (!isUpgrade) { + delete schema.properties[id].properties['version']; + } + return schema; + }, [isUpgrade]); + // if (loading) { + // return ; + // } + return ; +}; +PluginNpmForm.displayName = 'PluginNpmForm'; diff --git a/packages/core/client/src/pm/PluginForm/form/PluginUploadForm.tsx b/packages/core/client/src/pm/PluginForm/form/PluginUploadForm.tsx new file mode 100644 index 000000000..75822eeb8 --- /dev/null +++ b/packages/core/client/src/pm/PluginForm/form/PluginUploadForm.tsx @@ -0,0 +1,123 @@ +import { ISchema } from '@formily/json-schema'; +import { useForm } from '@formily/react'; +import { uid } from '@formily/shared'; +import { App } from 'antd'; +import type { RcFile } from 'antd/es/upload'; +import React, { FC, useMemo } from 'react'; +import { useTranslation } from 'react-i18next'; + +import { useAPIClient } from '../../../api-client'; +import { SchemaComponent } from '../../../schema-component'; +import { IPluginData } from '../../types'; + +interface IPluginUploadFormProps { + onClose: (refresh?: boolean) => void; + isUpgrade: boolean; + pluginData?: IPluginData; +} + +export const PluginUploadForm: FC = ({ onClose, pluginData, isUpgrade }) => { + const { message } = App.useApp(); + const useSaveValues = () => { + const api = useAPIClient(); + const { t } = useTranslation(); + const form = useForm(); + + return { + async run() { + await form.submit(); + const formData = new FormData(); + formData.append('file', form.values.uploadFile?.[0]?.originFileObj); + if (pluginData?.packageName) { + formData.append('packageName', pluginData.packageName); + } + api.request({ + url: `pm:${isUpgrade ? 'update' : 'add'}`, + method: 'post', + data: formData, + }); + onClose(true); + }, + }; + }; + + const useCancel = () => { + return { + run() { + onClose(); + }, + }; + }; + + const schema = useMemo(() => { + return { + type: 'object', + properties: { + [uid()]: { + 'x-decorator': 'Form', + 'x-component': 'div', + type: 'void', + properties: { + uploadFile: { + type: 'string', + 'x-decorator': 'FormItem', + 'x-component': 'Upload.Dragger', + required: true, + 'x-component-props': { + action: '', + multiple: false, + maxCount: 1, + height: '150px', + tipContent: `{{t('Drag and drop the file here or click to upload, file size should not exceed 30M')}}`, + beforeUpload: (file: RcFile) => { + const compressedFileRegex = /\.(zip|rar|tar|gz|bz2|tgz)$/; + const isCompressedFile = compressedFileRegex.test(file.name); + if (!isCompressedFile) { + message.error('File only support zip, rar, tar, gz, bz2!'); + } + + const fileSizeLimit = file.size / 1024 / 1024 < 30; + if (!fileSizeLimit) { + message.error('File must smaller than 30MB!'); + } + return false; + return isCompressedFile && fileSizeLimit; + }, + }, + }, + footer: { + type: 'void', + 'x-component': 'ActionBar', + 'x-component-props': { + layout: 'one-column', + style: { + justifyContent: 'right', + }, + }, + properties: { + cancel: { + title: 'Cancel', + 'x-component': 'Action', + 'x-component-props': { + useAction: '{{ useCancel }}', + }, + }, + submit: { + title: '{{t("Submit")}}', + 'x-component': 'Action', + 'x-component-props': { + type: 'primary', + htmlType: 'submit', + useAction: '{{ useSaveValues }}', + }, + }, + }, + }, + }, + }, + }, + }; + }, [message]); + + return ; +}; diff --git a/packages/core/client/src/pm/PluginForm/form/PluginUrlForm.tsx b/packages/core/client/src/pm/PluginForm/form/PluginUrlForm.tsx new file mode 100644 index 000000000..5d1cd8c1c --- /dev/null +++ b/packages/core/client/src/pm/PluginForm/form/PluginUrlForm.tsx @@ -0,0 +1,117 @@ +import { ISchema } from '@formily/json-schema'; +import { useForm } from '@formily/react'; +import { uid } from '@formily/shared'; +import { App } from 'antd'; +import React, { FC, useMemo } from 'react'; +import { useTranslation } from 'react-i18next'; + +import { useAPIClient, useRequest } from '../../../api-client'; +import { SchemaComponent } from '../../../schema-component'; +import { IPluginData } from '../../types'; + +interface IPluginUrlFormProps { + onClose: (refresh?: boolean) => void; + isUpgrade?: boolean; + pluginData?: IPluginData; +} + +export const PluginUrlForm: FC = ({ onClose, pluginData, isUpgrade }) => { + const { message } = App.useApp(); + const useSaveValues = () => { + const api = useAPIClient(); + const { t } = useTranslation(); + const form = useForm(); + + return { + async run() { + const compressedFileUrl = form.values.compressedFileUrl; + if (!compressedFileUrl) return; + await form.submit(); + const data = { + compressedFileUrl, + }; + if (pluginData?.packageName) { + data['packageName'] = pluginData.packageName; + } + api.request({ + url: `pm:${isUpgrade ? 'update' : 'add'}`, + method: 'post', + data, + }); + onClose(true); + }, + }; + }; + + const useValuesFromProps = (options) => { + return useRequest( + () => + Promise.resolve({ + data: { compressedFileUrl: pluginData.compressedFileUrl }, + }), + options, + ); + }; + + const useCancel = () => { + return { + run() { + onClose(); + }, + }; + }; + + const schema = useMemo(() => { + return { + type: 'object', + properties: { + [uid()]: { + 'x-decorator': 'Form', + 'x-component': 'div', + type: 'void', + 'x-decorator-props': { + useValues: '{{ useValuesFromProps }}', + }, + properties: { + compressedFileUrl: { + type: 'string', + 'x-decorator': 'FormItem', + 'x-component': 'Input', + required: true, + }, + footer: { + type: 'void', + 'x-component': 'ActionBar', + 'x-component-props': { + layout: 'one-column', + style: { + justifyContent: 'right', + }, + }, + properties: { + cancel: { + title: 'Cancel', + 'x-component': 'Action', + 'x-component-props': { + useAction: '{{ useCancel }}', + }, + }, + submit: { + title: '{{t("Submit")}}', + 'x-component': 'Action', + 'x-component-props': { + type: 'primary', + htmlType: 'submit', + useAction: '{{ useSaveValues }}', + }, + }, + }, + }, + }, + }, + }, + }; + }, []); + + return ; +}; diff --git a/packages/core/client/src/pm/PluginForm/modal/PluginAddModal.tsx b/packages/core/client/src/pm/PluginForm/modal/PluginAddModal.tsx new file mode 100644 index 000000000..3e30ede7b --- /dev/null +++ b/packages/core/client/src/pm/PluginForm/modal/PluginAddModal.tsx @@ -0,0 +1,35 @@ +import { Modal, Radio } from 'antd'; +import React, { FC, useState } from 'react'; +import { useTranslation } from 'react-i18next'; +import { useStyles } from '../../style'; + +import { PluginNpmForm } from '../form/PluginNpmForm'; +import { PluginUploadForm } from '../form/PluginUploadForm'; +import { PluginUrlForm } from '../form/PluginUrlForm'; + +interface IPluginFormProps { + onClose: (refresh?: boolean) => void; + isShow: boolean; +} + +export const PluginAddModal: FC = ({ onClose, isShow }) => { + const { t } = useTranslation(); + const { theme } = useStyles(); + const [type, setType] = useState<'npm' | 'upload' | 'url'>('npm'); + + return ( + onClose()} footer={null} destroyOnClose title={t('Add plugin')} width={580} open={isShow}> + {/* */} +
+ setType(e.target.value)}> + {t('Npm package')} + {t('Upload plugin')} + {t('Compressed file url')} + +
+ {type === 'npm' && } + {type === 'upload' && } + {type === 'url' && } +
+ ); +}; diff --git a/packages/core/client/src/pm/PluginForm/modal/PluginUpgradeModal.tsx b/packages/core/client/src/pm/PluginForm/modal/PluginUpgradeModal.tsx new file mode 100644 index 000000000..7c699e48d --- /dev/null +++ b/packages/core/client/src/pm/PluginForm/modal/PluginUpgradeModal.tsx @@ -0,0 +1,38 @@ +import { Modal, Radio } from 'antd'; +import React, { FC, useState } from 'react'; +import { useTranslation } from 'react-i18next'; + +import { useStyles } from '../../style'; +import { IPluginData } from '../../types'; +import { PluginNpmForm } from '../form/PluginNpmForm'; +import { PluginUploadForm } from '../form/PluginUploadForm'; +import { PluginUrlForm } from '../form/PluginUrlForm'; + +interface IPluginUpgradeModalProps { + onClose: (refresh?: boolean) => void; + isShow: boolean; + pluginData: IPluginData; +} + +export const PluginUpgradeModal: FC = ({ onClose, isShow, pluginData }) => { + const { t } = useTranslation(); + const { theme } = useStyles(); + + const [type, setType] = useState<'npm' | 'upload' | 'url'>('npm'); + + return ( + onClose()} footer={null} destroyOnClose title={t('Update plugin')} width={580} open={isShow}> + {/* */} +
+ setType(e.target.value)}> + {t('Npm package')} + {t('Upload plugin')} + {t('Compressed file url')} + +
+ {type === 'npm' && } + {type === 'upload' && } + {type === 'url' && } +
+ ); +}; diff --git a/packages/core/client/src/pm/PluginManager.tsx b/packages/core/client/src/pm/PluginManager.tsx new file mode 100644 index 000000000..23e3b79fa --- /dev/null +++ b/packages/core/client/src/pm/PluginManager.tsx @@ -0,0 +1,222 @@ +export * from './PluginManagerLink'; +import { PageHeader } from '@ant-design/pro-layout'; +import { useDebounce } from 'ahooks'; +import { Button, Divider, Input, Result, Space, Spin, Tabs } from 'antd'; +import _ from 'lodash'; +import React, { useEffect, useMemo, useState } from 'react'; +import { useTranslation } from 'react-i18next'; +import { useNavigate, useParams } from 'react-router-dom'; + +import { css } from '@emotion/css'; +import { useACLRoleContext } from '../acl/ACLProvider'; +import { useRequest } from '../api-client'; +import { useToken } from '../style'; +import { PluginCard } from './PluginCard'; +import { PluginAddModal } from './PluginForm/modal/PluginAddModal'; +import { useStyles } from './style'; +import { IPluginData } from './types'; + +export interface TData { + data: IPluginData[]; + meta: IMetaData; +} + +export interface IMetaData { + count: number; + page: number; + pageSize: number; + totalPage: number; + allowedActions: AllowedActions; +} + +export interface AllowedActions { + view: number[]; + update: number[]; + destroy: number[]; +} + +const LocalPlugins = () => { + const { t } = useTranslation(); + const { theme } = useStyles(); + const { data, loading, refresh } = useRequest({ + url: 'pm:list', + }); + const filterList = useMemo(() => { + let list = data?.data || []; + list = list.reverse(); + return [ + { + type: 'All', + list: list, + }, + { + type: 'Built-in', + list: _.filter(list, (item) => item.builtIn), + }, + { + type: 'Enabled', + list: _.filter(list, (item) => item.enabled), + }, + { + type: 'Not enabled', + list: _.filter(list, (item) => !item.enabled), + }, + { + type: 'Problematic', + list: _.filter(list, (item) => !item.isCompatible), + }, + ]; + }, [data?.data]); + + const [filterIndex, setFilterIndex] = useState(0); + const [isShowAddForm, setShowAddForm] = useState(false); + const [searchValue, setSearchValue] = useState(''); + const debouncedSearchValue = useDebounce(searchValue, { wait: 100 }); + + const pluginList = useMemo(() => { + let list = filterList[filterIndex]?.list || []; + if (debouncedSearchValue) { + list = _.filter( + list, + (item) => + item.name?.includes(debouncedSearchValue) || + item.description?.includes(debouncedSearchValue) || + item.displayName?.includes(debouncedSearchValue) || + item.packageName?.includes(debouncedSearchValue), + ); + } + return list; + }, [filterIndex, filterList, debouncedSearchValue]); + + const handleSearch = (value: string) => { + setSearchValue(value); + }; + + if (loading) { + return ; + } + + return ( + <> + { + setShowAddForm(false); + // if (isRefresh) refresh(); + }} + /> +
+ +
+ {pluginList.map((item) => ( + + ))} +
+
+ + ); +}; + +const MarketplacePlugins = () => { + const { token } = useToken(); + const { t } = useTranslation(); + return
{t('Coming soon...')}
; +}; + +export const PluginManager = () => { + const params = useParams(); + const navigate = useNavigate(); + const { tabName = 'local' } = params; + const { t } = useTranslation(); + const { snippets = [] } = useACLRoleContext(); + const { styles } = useStyles(); + + useEffect(() => { + const { tabName } = params; + if (!tabName) { + navigate(`/admin/pm/list/local/`, { replace: true }); + } + }, []); + + return snippets.includes('pm') ? ( +
+ { + navigate(`/admin/pm/list/${activeKey}`); + }} + items={[ + { + key: 'local', + label: t('Local'), + }, + { + key: 'marketplace', + label: t('Marketplace'), + }, + ]} + /> + } + /> +
+ {React.createElement( + { + local: LocalPlugins, + marketplace: MarketplacePlugins, + }[tabName], + )} +
+
+ ) : ( + + ); +}; diff --git a/packages/core/client/src/pm/PluginSetting.tsx b/packages/core/client/src/pm/PluginSetting.tsx new file mode 100644 index 000000000..29bb6e90c --- /dev/null +++ b/packages/core/client/src/pm/PluginSetting.tsx @@ -0,0 +1,205 @@ +export * from './PluginManagerLink'; +import { PageHeader } from '@ant-design/pro-layout'; +import { css } from '@emotion/css'; +import { Layout, Menu, Result, Tabs } from 'antd'; +import _, { sortBy } from 'lodash'; +import React, { createContext, useContext, useMemo } from 'react'; +import { Navigate, useNavigate, useParams } from 'react-router-dom'; +import { useACLRoleContext } from '../acl/ACLProvider'; +import { ACLPane } from '../acl/ACLShortcut'; +import { CollectionManagerPane } from '../collection-manager'; +import { Icon } from '../icon'; +import { useCompile } from '../schema-component'; +import { BlockTemplatesPane } from '../schema-templates'; +import { SystemSettingsPane } from '../system-settings'; +import { useStyles } from './style'; + +export const SettingsCenterContext = createContext({}); + +export const settings = { + acl: { + title: '{{t("ACL")}}', + icon: 'LockOutlined', + tabs: { + roles: { + isBookmark: true, + title: '{{t("Roles & Permissions")}}', + component: () => , + }, + }, + }, + 'ui-schema-storage': { + title: '{{t("Block templates")}}', + icon: 'LayoutOutlined', + tabs: { + 'block-templates': { + title: '{{t("Block templates")}}', + component: BlockTemplatesPane, + }, + }, + }, + 'collection-manager': { + icon: 'DatabaseOutlined', + title: '{{t("Collection manager")}}', + tabs: { + collections: { + isBookmark: true, + title: '{{t("Collections & Fields")}}', + component: CollectionManagerPane, + }, + }, + }, + 'system-settings': { + icon: 'SettingOutlined', + title: '{{t("System settings")}}', + tabs: { + 'system-settings': { + isBookmark: true, + title: '{{t("System settings")}}', + component: SystemSettingsPane, + }, + }, + }, +}; + +export const getPluginsTabs = _.memoize((items, snippets) => { + const pluginsTabs = Object.keys(items).map((plugin) => { + const tabsObj = items[plugin].tabs; + const tabs = sortBy( + Object.keys(tabsObj).map((tab) => { + return { + key: tab, + ...tabsObj[tab], + isAllow: snippets.includes('pm.*') && !snippets?.includes(`!pm.${plugin}.${tab}`), + }; + }), + (o) => !o.isAllow, + ); + return { + ...items[plugin], + key: plugin, + tabs, + isAllow: !tabs.every((v) => !v.isAllow), + }; + }); + return sortBy(pluginsTabs, (o) => !o.isAllow); +}); + +export const SettingsCenter = () => { + const { styles } = useStyles(); + const { snippets = [] } = useACLRoleContext(); + const params = useParams(); + const navigate = useNavigate(); + const items = useContext(SettingsCenterContext); + const pluginsTabs = getPluginsTabs(items, snippets); + const compile = useCompile(); + const firstUri = useMemo(() => { + const pluginName = pluginsTabs[0].key; + const tabName = pluginsTabs[0].tabs[0].key; + return `/admin/settings/${pluginName}/${tabName}`; + }, [pluginsTabs]); + const { pluginName, tabName } = params; + const activePlugin = pluginsTabs.find((v) => v.key === pluginName); + const aclPluginTabCheck = activePlugin?.isAllow && activePlugin.tabs.find((v) => v.key === tabName)?.isAllow; + if (!pluginName) { + return ; + } + if (!items[pluginName]) { + return ; + } + if (!tabName) { + const firstTabName = Object.keys(items[pluginName]?.tabs).shift(); + return ; + } + const component = items[pluginName]?.tabs?.[tabName]?.component; + const plugin: any = pluginsTabs.find((v) => v.key === pluginName); + const menuItems: any = pluginsTabs + .filter((plugin) => plugin.isAllow) + .map((plugin) => { + return { + label: compile(plugin.title), + key: plugin.key, + icon: plugin.icon ? : null, + }; + }); + return ( +
+ + + { + const item = items[e.key]; + const tabKey = Object.keys(item.tabs).shift(); + navigate(`/admin/settings/${e.key}/${tabKey}`); + }} + items={menuItems as any} + /> + + + {aclPluginTabCheck && ( + { + navigate(`/admin/settings/${pluginName}/${activeKey}`); + }} + items={plugin.tabs?.map((tab) => { + if (!tab.isAllow) { + return null; + } + return { + label: compile(tab?.title), + key: tab.key, + }; + })} + /> + } + /> + )} +
+ {aclPluginTabCheck ? ( + component && React.createElement(component) + ) : ( + + )} +
+
+ +
+ ); +}; + +export const SettingsCenterProvider = (props) => { + const { settings = {} } = props; + const items = useContext(SettingsCenterContext); + return ( + {props.children} + ); +}; + +export const PMProvider = (props) => { + return {props.children}; +}; diff --git a/packages/core/client/src/pm/index.tsx b/packages/core/client/src/pm/index.tsx index e3fd36b2f..58bc205e0 100644 --- a/packages/core/client/src/pm/index.tsx +++ b/packages/core/client/src/pm/index.tsx @@ -1,367 +1,13 @@ -export * from './PluginManagerLink'; -import { PageHeader } from '@ant-design/pro-layout'; -import { css } from '@emotion/css'; -import { Layout, Menu, Result, Spin, Tabs } from 'antd'; -import _, { sortBy } from 'lodash'; -import React, { createContext, useContext, useEffect, useMemo } from 'react'; -import { useTranslation } from 'react-i18next'; -import { Navigate, useNavigate, useParams } from 'react-router-dom'; -import { useACLRoleContext } from '../acl/ACLProvider'; -import { ACLPane } from '../acl/ACLShortcut'; -import { useRequest } from '../api-client'; +import React from 'react'; import { Plugin } from '../application/Plugin'; -import { CollectionManagerPane } from '../collection-manager'; -import { Icon } from '../icon'; -import { useCompile } from '../schema-component'; -import { BlockTemplatesPane } from '../schema-templates'; -import { useToken } from '../style'; -import { SystemSettingsPane } from '../system-settings'; -import { BuiltInPluginCard, PluginCard } from './Card'; import { PluginManagerLink, SettingsCenterDropdown } from './PluginManagerLink'; -import { useStyles } from './style'; +import { PMProvider, SettingsCenter } from './PluginSetting'; +import { PluginManager } from './PluginManager'; -export interface TData { - data: IPluginData[]; - meta: IMetaData; -} +export * from './PluginManagerLink'; +export * from './PluginSetting'; +export * from './PluginManager'; -export interface IPluginData { - id: number; - createdAt: Date; - updatedAt: Date; - name: string; - displayName: string; - version: string; - enabled: boolean; - installed: boolean; - builtIn: boolean; - options: Record; - description?: string; -} - -export interface IMetaData { - count: number; - page: number; - pageSize: number; - totalPage: number; - allowedActions: AllowedActions; -} - -export interface AllowedActions { - view: number[]; - update: number[]; - destroy: number[]; -} - -// TODO: refactor card/built-int card - -export const SettingsCenterContext = createContext({}); - -const LocalPlugins = () => { - // TODO: useRequest types for data ts type - const { data, loading } = useRequest({ - url: 'applicationPlugins:list', - params: { - filter: { - 'builtIn.$isFalsy': true, - }, - sort: 'name', - paginate: false, - }, - }); - if (loading) { - return ; - } - - return ( - <> - {data?.data?.map((item) => { - const { id } = item; - return ; - })} - - ); -}; - -const BuiltinPlugins = () => { - const { data, loading } = useRequest<{ - data: IPluginData[]; - meta: IMetaData; - }>({ - url: 'applicationPlugins:list', - params: { - filter: { - 'builtIn.$isTruly': true, - }, - sort: 'name', - paginate: false, - }, - }); - if (loading) { - return ; - } - return ( - <> - {data?.data?.map((item) => { - const { id } = item; - return ; - })} - - ); -}; - -const MarketplacePlugins = () => { - const { token } = useToken(); - const { t } = useTranslation(); - return
{t('Coming soon...')}
; -}; - -const PluginList = () => { - const params = useParams(); - const navigate = useNavigate(); - const { tabName = 'local' } = params; - const { t } = useTranslation(); - const { snippets = [] } = useACLRoleContext(); - const { styles } = useStyles(); - - useEffect(() => { - const { tabName } = params; - if (!tabName) { - navigate(`/admin/pm/list/local/`, { replace: true }); - } - }, []); - - return snippets.includes('pm') ? ( -
- { - navigate(`/admin/pm/list/${activeKey}`); - }} - items={[ - { - key: 'local', - label: t('Local'), - }, - { - key: 'built-in', - label: t('Built-in'), - }, - { - key: 'marketplace', - label: t('Marketplace'), - }, - ]} - /> - } - /> -
- {React.createElement( - { - local: LocalPlugins, - 'built-in': BuiltinPlugins, - marketplace: MarketplacePlugins, - }[tabName], - )} -
-
- ) : ( - - ); -}; - -const settings = { - acl: { - title: '{{t("ACL")}}', - icon: 'LockOutlined', - tabs: { - roles: { - isBookmark: true, - title: '{{t("Roles & Permissions")}}', - component: () => , - }, - }, - }, - 'ui-schema-storage': { - title: '{{t("Block templates")}}', - icon: 'LayoutOutlined', - tabs: { - 'block-templates': { - title: '{{t("Block templates")}}', - component: BlockTemplatesPane, - }, - }, - }, - 'collection-manager': { - icon: 'DatabaseOutlined', - title: '{{t("Collection manager")}}', - tabs: { - collections: { - isBookmark: true, - title: '{{t("Collections & Fields")}}', - component: CollectionManagerPane, - }, - }, - }, - 'system-settings': { - icon: 'SettingOutlined', - title: '{{t("System settings")}}', - tabs: { - 'system-settings': { - isBookmark: true, - title: '{{t("System settings")}}', - component: SystemSettingsPane, - }, - }, - }, -}; - -export const getPluginsTabs = _.memoize((items, snippets) => { - const pluginsTabs = Object.keys(items).map((plugin) => { - const tabsObj = items[plugin].tabs; - const tabs = sortBy( - Object.keys(tabsObj).map((tab) => { - return { - key: tab, - ...tabsObj[tab], - isAllow: snippets.includes('pm.*') && !snippets?.includes(`!pm.${plugin}.${tab}`), - }; - }), - (o) => !o.isAllow, - ); - return { - ...items[plugin], - key: plugin, - tabs, - isAllow: !tabs.every((v) => !v.isAllow), - }; - }); - return sortBy(pluginsTabs, (o) => !o.isAllow); -}); - -const SettingsCenter = () => { - const { styles } = useStyles(); - const { snippets = [] } = useACLRoleContext(); - const params = useParams(); - const navigate = useNavigate(); - const items = useContext(SettingsCenterContext); - const pluginsTabs = getPluginsTabs(items, snippets); - const compile = useCompile(); - const firstUri = useMemo(() => { - const pluginName = pluginsTabs[0].key; - const tabName = pluginsTabs[0].tabs[0].key; - return `/admin/settings/${pluginName}/${tabName}`; - }, [pluginsTabs]); - const { pluginName, tabName } = params; - const activePlugin = pluginsTabs.find((v) => v.key === pluginName); - const aclPluginTabCheck = activePlugin?.isAllow && activePlugin.tabs.find((v) => v.key === tabName)?.isAllow; - if (!pluginName) { - return ; - } - if (!items[pluginName]) { - return ; - } - if (!tabName) { - const firstTabName = Object.keys(items[pluginName]?.tabs).shift(); - return ; - } - const component = items[pluginName]?.tabs?.[tabName]?.component; - const plugin: any = pluginsTabs.find((v) => v.key === pluginName); - const menuItems: any = pluginsTabs - .filter((plugin) => plugin.isAllow) - .map((plugin) => { - return { - label: compile(plugin.title), - key: plugin.key, - icon: plugin.icon ? : null, - }; - }); - return ( -
- - - { - const item = items[e.key]; - const tabKey = Object.keys(item.tabs).shift(); - navigate(`/admin/settings/${e.key}/${tabKey}`); - }} - items={menuItems as any} - /> - - - {aclPluginTabCheck && ( - { - navigate(`/admin/settings/${pluginName}/${activeKey}`); - }} - items={plugin.tabs?.map((tab) => { - if (!tab.isAllow) { - return null; - } - return { - label: compile(tab?.title), - key: tab.key, - }; - })} - /> - } - /> - )} -
- {aclPluginTabCheck ? ( - component && React.createElement(component) - ) : ( - - )} -
-
- -
- ); -}; - -export const SettingsCenterProvider = (props) => { - const { settings = {} } = props; - const items = useContext(SettingsCenterContext); - return ( - {props.children} - ); -}; - -export const PMProvider = (props) => { - return {props.children}; -}; export class PMPlugin extends Plugin { async load() { this.addComponents(); @@ -379,15 +25,15 @@ export class PMPlugin extends Plugin { addRoutes() { this.app.router.add('admin.pm.list', { path: '/admin/pm/list', - element: , + element: , }); this.app.router.add('admin.pm.list-tab', { path: '/admin/pm/list/:tabName', - element: , + element: , }); this.app.router.add('admin.pm.list-tab-mdfile', { path: '/admin/pm/list/:tabName/:mdfile', - element: , + element: , }); this.app.router.add('admin.settings.list', { diff --git a/packages/core/client/src/pm/style.ts b/packages/core/client/src/pm/style.ts index dc1ddd416..5be73ecf7 100644 --- a/packages/core/client/src/pm/style.ts +++ b/packages/core/client/src/pm/style.ts @@ -2,9 +2,13 @@ import { createStyles } from 'antd-style'; export const useStyles = createStyles(({ token }) => { return { + cardActionDisabled: { + color: token.colorTextDisabled, + cursor: 'not-allowed', + }, pageHeader: { - backgroundColor: token.colorBgContainer, paddingBottom: 0, + backgroundColor: token.colorBgContainer, paddingTop: token.paddingSM, paddingInline: token.paddingLG, '.ant-page-header-footer': { marginBlockStart: '0' }, @@ -15,22 +19,20 @@ export const useStyles = createStyles(({ token }) => { color: token.colorText, }, }, - pageContent: { margin: token.marginLG, }, + // pageContent: { + // marginTop: token.margin, + // marginBottom: token.marginLG, + // background: 'transparent', + // minHeight: '80vh', + // }, - PluginDetail: { - '.ant-modal-header': { paddingBottom: token.paddingXS }, - '.ant-modal-body': { paddingTop: 0 }, - '.ant-modal-content': { - '.plugin-desc': { paddingBottom: token.paddingXS }, - }, - '.version-tag': { - verticalAlign: 'middle', - marginTop: -token.marginXXS, - marginLeft: token.marginXS, - }, + PluginDetailBaseInfo: { + display: 'flex', + flexDirection: 'column', + marginBottom: token.margin, }, PluginDocument: { @@ -40,13 +42,6 @@ export const useStyles = createStyles(({ token }) => { overflowY: 'auto', }, - CommonCard: { - width: `calc(20% - ${token.marginLG}px)`, - marginRight: token.marginLG, - marginBottom: token.marginLG, - transition: 'all 0.35s ease-in-out', - }, - avatar: { '.ant-card-meta-avatar': { marginTop: '8px', diff --git a/packages/core/client/src/pm/types.ts b/packages/core/client/src/pm/types.ts new file mode 100644 index 000000000..690c21806 --- /dev/null +++ b/packages/core/client/src/pm/types.ts @@ -0,0 +1,23 @@ +export interface IPluginData { + id: number; + createdAt: Date; + updatedAt: Date; + name: string; + displayName: string; + packageName: string; + version: string; + enabled: boolean; + installed: boolean; + builtIn: boolean; + registry?: string; + authToken?: string; + compressedFileUrl?: string; + options: Record; + description?: string; + type: 'npm' | 'upload' | 'url'; + isCompatible?: boolean; + readmeUrl: string; + changelogUrl: string; + error: boolean; + updatable?: boolean; +} diff --git a/packages/core/client/src/route-switch/antd/admin-layout/index.tsx b/packages/core/client/src/route-switch/antd/admin-layout/index.tsx index 3cf548632..f31d54b0e 100644 --- a/packages/core/client/src/route-switch/antd/admin-layout/index.tsx +++ b/packages/core/client/src/route-switch/antd/admin-layout/index.tsx @@ -1,7 +1,8 @@ import { css } from '@emotion/css'; -import { Layout } from 'antd'; +import { useSessionStorageState } from 'ahooks'; +import { App, Layout } from 'antd'; import React, { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react'; -import { Outlet, useMatch, useNavigate, useParams } from 'react-router-dom'; +import { Link, Outlet, useMatch, useNavigate, useParams } from 'react-router-dom'; import { ACLRolesCheckProvider, CurrentAppInfoProvider, @@ -60,6 +61,8 @@ const useMenuProps = () => { }; const MenuEditor = (props) => { + const { notification } = App.useApp(); + const [hasNotice, setHasNotice] = useSessionStorageState('plugin-notice', { defaultValue: false }); const { setTitle } = useDocumentTitle(); const navigate = useNavigate(); const params = useParams(); @@ -140,6 +143,45 @@ const MenuEditor = (props) => { } return s; }, [data?.data]); + + useRequest( + { + url: 'applicationPlugins:list', + params: { + sort: 'id', + paginate: false, + }, + }, + { + onSuccess: ({ data }) => { + setHasNotice(true); + const errorPlugins = data.filter((item) => !item.isCompatible); + if (errorPlugins.length) { + notification.error({ + message: 'Plugin dependencies check failed', + description: ( +
+
+ These plugins failed dependency checks. Please go to the{' '} + plugin management page for more details.{' '} +
+
    + {errorPlugins.map((item) => ( +
  • + {item.displayName} - {item.packageName} +
  • + ))} +
+
+ ), + }); + } + }, + manual: true, + // ready: !hasNotice, + }, + ); + if (loading) { return render(); } diff --git a/packages/core/create-nocobase-app/templates/app/storage/plugins/.gitignore b/packages/core/create-nocobase-app/templates/app/storage/plugins/.gitignore new file mode 100644 index 000000000..c96a04f00 --- /dev/null +++ b/packages/core/create-nocobase-app/templates/app/storage/plugins/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/packages/core/create-nocobase-app/templates/app/tsconfig.json.tpl b/packages/core/create-nocobase-app/templates/app/tsconfig.json.tpl index a78853f81..509330731 100644 --- a/packages/core/create-nocobase-app/templates/app/tsconfig.json.tpl +++ b/packages/core/create-nocobase-app/templates/app/tsconfig.json.tpl @@ -21,8 +21,8 @@ "packages/app/*/src" ], "@{{{name}}}/plugin-*": [ - "packages/plugins/*/src" + "packages/plugins/plugin-*/src" ] } } -} \ No newline at end of file +} diff --git a/packages/core/devtools/package.json b/packages/core/devtools/package.json index b8434d182..acc7b5d58 100644 --- a/packages/core/devtools/package.json +++ b/packages/core/devtools/package.json @@ -46,7 +46,8 @@ "ts-node-dev": "1.1.8", "tsconfig-paths": "^3.12.0", "typescript": "5.1.3", - "umi": "^4.0.69" + "umi": "^4.0.69", + "fast-glob": "^3.3.1" }, "repository": { "type": "git", diff --git a/packages/core/devtools/umiConfig.js b/packages/core/devtools/umiConfig.js index 69949ac7c..08b6d32a0 100644 --- a/packages/core/devtools/umiConfig.js +++ b/packages/core/devtools/umiConfig.js @@ -2,7 +2,7 @@ const { existsSync } = require('fs'); const { resolve, sep } = require('path'); const packageJson = require('./package.json'); const fs = require('fs'); -const glob = require('glob'); +const glob = require('fast-glob'); const path = require('path'); console.log('VERSION: ', packageJson.version); @@ -11,7 +11,8 @@ function getUmiConfig() { const { APP_PORT, API_BASE_URL } = process.env; const API_BASE_PATH = process.env.API_BASE_PATH || '/api/'; const PROXY_TARGET_URL = process.env.PROXY_TARGET_URL || `http://127.0.0.1:${APP_PORT}`; - const LOCAL_STORAGE_BASE_URL = process.env.LOCAL_STORAGE_BASE_URL || '/storage/uploads/'; + const LOCAL_STORAGE_BASE_URL = '/storage/uploads/'; + const STATIC_PATH = '/static/'; function getLocalStorageProxy() { if (LOCAL_STORAGE_BASE_URL.startsWith('http')) { @@ -23,6 +24,10 @@ function getUmiConfig() { target: PROXY_TARGET_URL, changeOrigin: true, }, + [STATIC_PATH]: { + target: PROXY_TARGET_URL, + changeOrigin: true, + }, }; } @@ -68,24 +73,25 @@ function getPackagePaths() { const pkgs = []; for (const key in paths) { if (Object.hasOwnProperty.call(paths, key)) { - const dir = paths[key][0]; - if (dir.includes('*')) { - const files = glob.sync(dir); - for (const file of files) { - const dirname = resolve(process.cwd(), file); - if (existsSync(dirname)) { - const re = new RegExp(dir.replace('*', '(.+)')); - const p = dirname - .substring(process.cwd().length + 1) - .split(sep) - .join('/'); - const match = re.exec(p); - pkgs.push([key.replace('*', match?.[1]), dirname]); + for (let dir of paths[key]) { + if (dir.includes('*')) { + const files = glob.sync(dir, { cwd: process.cwd(), onlyDirectories: true }); + for (const file of files) { + const dirname = resolve(process.cwd(), file); + if (existsSync(dirname)) { + const re = new RegExp(dir.replace('*', '(.+)')); + const p = dirname + .substring(process.cwd().length + 1) + .split(sep) + .join('/'); + const match = re.exec(p); + pkgs.push([key.replace('*', match?.[1]), dirname]); + } } + } else { + const dirname = resolve(process.cwd(), dir); + pkgs.push([key, dirname]); } - } else { - const dirname = resolve(process.cwd(), dir); - pkgs.push([key, dirname]); } } } @@ -157,13 +163,13 @@ export default function devDynamicImport(packageName: string): Promise { fs.rmdirSync(this.outputPath, { recursive: true, force: true }); } fs.mkdirSync(this.outputPath); - const validPluginPaths = this.pluginsPath.filter((pluginPath) => fs.existsSync(pluginPath)); + const validPluginPaths = this.pluginsPath.filter((pluginsPath) => fs.existsSync(pluginsPath)); if (!validPluginPaths.length || process.env.NODE_ENV === 'production') { fs.writeFileSync(this.indexPath, this.emptyIndexContent); return; } - const pluginInfos = validPluginPaths.map((pluginPath) => this.getContent(pluginPath)).flat(); + const pluginInfos = validPluginPaths.map((pluginsPath) => this.getContent(pluginsPath)).flat(); // index.ts fs.writeFileSync(this.indexPath, this.indexContent); @@ -181,21 +187,23 @@ export default function devDynamicImport(packageName: string): Promise { }); } - getContent(pluginPath) { - const pluginFolders = fs.readdirSync(pluginPath); + getContent(pluginsPath) { + const pluginFolders = glob + .sync(['*/package.json', '*/*/package.json'], { cwd: pluginsPath, onlyFiles: true, absolute: true }) + .map((item) => path.dirname(item)); const pluginInfos = pluginFolders .filter((folder) => { - const pluginPackageJsonPath = path.join(pluginPath, folder, 'package.json'); - const pluginSrcClientPath = path.join(pluginPath, folder, 'src', 'client'); + const pluginPackageJsonPath = path.join(folder, 'package.json'); + const pluginSrcClientPath = path.join(folder, 'src', 'client'); return fs.existsSync(pluginPackageJsonPath) && fs.existsSync(pluginSrcClientPath); }) .map((folder) => { - const pluginPackageJsonPath = path.join(pluginPath, folder, 'package.json'); + const pluginPackageJsonPath = path.join(folder, 'package.json'); const pluginPackageJson = require(pluginPackageJsonPath); const pluginSrcClientPath = path - .relative(this.packagesPath, path.join(pluginPath, folder, 'src', 'client')) + .relative(this.packagesPath, path.join(folder, 'src', 'client')) .replaceAll('\\', '/'); - const pluginFileName = `${path.basename(pluginPath)}_${folder.replaceAll('-', '_')}`; + const pluginFileName = `${path.basename(pluginsPath)}_${path.basename(folder).replaceAll('-', '_')}`; const exportStatement = `export { default } from '${pluginSrcClientPath}';`; return { exportStatement, pluginFileName, packageJsonName: pluginPackageJson.name }; }); diff --git a/packages/core/server/package.json b/packages/core/server/package.json index cce16b13d..0d82e29b0 100644 --- a/packages/core/server/package.json +++ b/packages/core/server/package.json @@ -37,6 +37,11 @@ "multer": "^1.4.2", "nanoid": "3.3.4", "semver": "^7.3.7", + "ini": "^4.1.1", + "@types/ini": "^1.3.31", + "decompress": "4.2.1", + "@types/decompress": "4.2.4", + "fs-extra": "^11.1.1", "serve-handler": "^6.1.5", "ws": "^8.13.0", "xpipe": "^1.0.5" diff --git a/packages/core/server/src/__tests__/upgrade.test.ts b/packages/core/server/src/__tests__/upgrade.test.ts deleted file mode 100644 index 7ce15925c..000000000 --- a/packages/core/server/src/__tests__/upgrade.test.ts +++ /dev/null @@ -1,31 +0,0 @@ -import Application from '../application'; -import Plugin from '../plugin'; - -class TestPlugin extends Plugin {} - -describe('upgrade test', () => { - let app: Application; - beforeEach(async () => { - app = new Application({ - database: { - dialect: 'sqlite', - dialectModule: require('sqlite3'), - storage: ':memory:', - logging: false, - }, - resourcer: { - prefix: '/api', - }, - acl: false, - dataWrapping: false, - registerActions: false, - }); - - app.plugin(TestPlugin, { name: 'test-plugin' }); - }); - - it('should call upgrade', async () => { - await app.upgrade(); - console.log('1231'); - }); -}); diff --git a/packages/core/server/src/app-supervisor.ts b/packages/core/server/src/app-supervisor.ts index 72fad414d..832f06914 100644 --- a/packages/core/server/src/app-supervisor.ts +++ b/packages/core/server/src/app-supervisor.ts @@ -263,7 +263,9 @@ export class AppSupervisor extends EventEmitter implements AsyncEmitter { const { maintainingStatus } = options; if ( maintainingStatus && - ['install', 'upgrade', 'pm.enable', 'pm.disable'].includes(maintainingStatus.command.name) + ['install', 'upgrade', 'pm.add', 'pm.update', 'pm.enable', 'pm.disable', 'pm.remove'].includes( + maintainingStatus.command.name, + ) ) { this.setAppStatus(app.name, 'running', { refresh: true, diff --git a/packages/core/server/src/application.ts b/packages/core/server/src/application.ts index 27c12c79e..a38f085e8 100644 --- a/packages/core/server/src/application.ts +++ b/packages/core/server/src/application.ts @@ -4,7 +4,7 @@ import { actions as authActions, AuthManager } from '@nocobase/auth'; import { Cache, createCache, ICacheConfig } from '@nocobase/cache'; import Database, { CollectionOptions, IDatabaseOptions } from '@nocobase/database'; import { AppLoggerOptions, createAppLogger, Logger } from '@nocobase/logger'; -import { Resourcer, ResourceOptions } from '@nocobase/resourcer'; +import { ResourceOptions, Resourcer } from '@nocobase/resourcer'; import { applyMixins, AsyncEmitter, Toposort, ToposortOptions } from '@nocobase/utils'; import chalk from 'chalk'; import { Command, CommandOptions, ParseOptions } from 'commander'; @@ -117,6 +117,7 @@ export class Application exten private _maintaining = false; private _maintainingCommandStatus: MaintainingCommandStatus; private _maintainingStatusBeforeCommand: MaintainingCommandStatus | null; + private _actionCommand: Command; constructor(public options: ApplicationOptions) { super(); @@ -303,7 +304,9 @@ export class Application exten this.log.info(`app.reload()`); const oldDb = this._db; this.init(); - await oldDb.close(); + if (!oldDb.closed()) { + await oldDb.close(); + } } this.setMaintainingMessage('init plugins'); @@ -363,6 +366,8 @@ export class Application exten const command = new Command('nocobase') .usage('[command] [options]') .hook('preAction', async (_, actionCommand) => { + this._actionCommand = actionCommand; + this.activatedCommand = { name: getCommandFullName(actionCommand), }; @@ -426,7 +431,13 @@ export class Application exten throw error; } } finally { + const _actionCommand = this._actionCommand; + if (_actionCommand) { + _actionCommand['_optionValues'] = {}; + _actionCommand['_optionValueSources'] = {}; + } this.activatedCommand = null; + this._actionCommand = null; } } @@ -454,11 +465,15 @@ export class Application exten this.setMaintainingMessage('emit afterStart'); await this.emitAsync('afterStart', this, options); + await this.emitStartedEvent(); + + this.stopped = false; + } + + async emitStartedEvent() { await this.emitAsync('__started', this, { maintainingStatus: lodash.cloneDeep(this._maintainingCommandStatus), }); - - this.stopped = false; } async isStarted() { @@ -477,7 +492,9 @@ export class Application exten if (!this._started) { return; } + this._started = false; + await this.emitAsync('beforeStop'); await this.reload(options); await this.start(options); this.emit('__restarted', this, options); @@ -505,6 +522,7 @@ export class Application exten } await this.emitAsync('afterStop', this, options); + this.stopped = true; this.log.info(`${this.name} is stopped`); this._started = false; diff --git a/packages/core/server/src/commands/pm.ts b/packages/core/server/src/commands/pm.ts index 56999b827..4965bae6c 100644 --- a/packages/core/server/src/commands/pm.ts +++ b/packages/core/server/src/commands/pm.ts @@ -1,3 +1,4 @@ +import _ from 'lodash'; import Application from '../application'; import { PluginCommandError } from '../errors/plugin-command-error'; @@ -11,9 +12,35 @@ export default (app: Application) => { }); pm.command('add') - .arguments('plugin') - .action(async (plugin) => { - await app.pm.add(plugin, {}, true); + .argument('') + .option('--registry [registry]') + .option('--auth-token [authToken]') + .option('--version [version]') + .action(async (name, options, cli) => { + console.log('pm.add', name, options); + try { + await app.pm.addViaCLI(name, _.cloneDeep(options)); + } catch (error) { + throw new PluginCommandError(`Failed to add plugin: ${error.message}`); + } + }); + + pm.command('update') + .argument('') + .option('--path [path]') + .option('--url [url]') + .option('--registry [registry]') + .option('--auth-token [authToken]') + .option('--version [version]') + .action(async (packageName, options) => { + try { + await app.pm.update({ + ...options, + packageName, + }); + } catch (error) { + throw new PluginCommandError(`Failed to update plugin: ${error.message}`); + } }); pm.command('enable') diff --git a/packages/core/server/src/gateway/handle-plugin-static-file.ts b/packages/core/server/src/gateway/handle-plugin-static-file.ts deleted file mode 100644 index 36207ea53..000000000 --- a/packages/core/server/src/gateway/handle-plugin-static-file.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { IncomingMessage, ServerResponse } from 'http'; -import path from 'path'; -import fs from 'fs'; - -const cwd = process.cwd(); -const NODE_MODULES = path.join(cwd, 'node_modules'); - -const PREFIX = '/api/plugins/client/'; - -const isMatchClientStaticUrl = (url: string) => { - return url.startsWith(PREFIX); -}; - -/** - * get package name from url - * - * @example - * /api/plugins/client/@nocobase/plugin-acl/index.js => @nocobase/plugin-acl - * /api/plugins/client/my-plugin/README.md => my-plugin - */ -const getPackageName = (url: string) => { - const urlArr = url.split('/'); - return urlArr[4].startsWith('@') ? `${urlArr[4]}/${urlArr[5]}` : urlArr[4]; -}; - -/** - * get plugin client static file real path - * - * @example - * /api/plugins/client/@nocobase/plugin-acl/index.js => /node_modules/@nocobase/plugin-acl/dist/client/index.js - * /api/plugins/client/my-plugin/README.md => /node_modules/my-plugin/dist/client/README.md - */ -const getRealPath = (packageName: string, url: string) => { - const ext = path.extname(url); - const filePath = url.replace(`${PREFIX}${packageName}/`, ''); - if (ext.toLowerCase() === '.md') { - return path.join(NODE_MODULES, packageName, filePath); - } else { - return path.join(NODE_MODULES, packageName, 'dist', 'client', filePath); - } -}; - -export async function handlePluginStaticFile(req: IncomingMessage, res: ServerResponse): Promise { - if (isMatchClientStaticUrl(req.url)) { - // TODO: check packageName in plugins - const packageName = getPackageName(req.url); - - const realPath = getRealPath(packageName, req.url); - - try { - // get file stats - const stats = await fs.promises.stat(realPath); - - const ifModifiedSince = req.headers['if-modified-since']; - - const lastModified = stats.mtime.toUTCString(); - - // check cache headers - if (ifModifiedSince === lastModified) { - res.statusCode = 304; - return true; - } - - const relativePath = path.relative(cwd, realPath); - - res.writeHead(200, { - 'Content-Length': stats.size, - }); - - const readStream = fs.createReadStream(relativePath); - readStream.pipe(res); - } catch (e) { - res.writeHead(404); - res.end(); - } - - return true; - } - - return false; -} diff --git a/packages/core/server/src/gateway/index.ts b/packages/core/server/src/gateway/index.ts index 91d8c0181..cbc804410 100644 --- a/packages/core/server/src/gateway/index.ts +++ b/packages/core/server/src/gateway/index.ts @@ -1,6 +1,9 @@ +import { uid } from '@nocobase/utils'; +import { createStoragePluginsSymlink } from '@nocobase/utils/plugin-symlink'; import { Command } from 'commander'; import compression from 'compression'; import { EventEmitter } from 'events'; +import fs from 'fs'; import http, { IncomingMessage, ServerResponse } from 'http'; import { promisify } from 'node:util'; import { resolve } from 'path'; @@ -10,6 +13,7 @@ import { parse } from 'url'; import xpipe from 'xpipe'; import { AppSupervisor } from '../app-supervisor'; import { ApplicationOptions } from '../application'; +import { PLUGIN_STATICS_PATH, getPackageDirByExposeUrl, getPackageNameByExposeUrl } from '../plugin-manager'; import { applyErrorWithArgs, getErrorWithCode } from './errors'; import { IPCSocketClient } from './ipc-socket-client'; import { IPCSocketServer } from './ipc-socket-server'; @@ -123,18 +127,21 @@ export class Gateway extends EventEmitter { }); } - if (pathname.startsWith('/api/plugins/client/')) { + // pathname example: /static/plugins/@nocobase/plugins-acl/README.md + // protect server files + if (pathname.startsWith(PLUGIN_STATICS_PATH) && !pathname.includes('/server/')) { await compress(req, res); + const packageName = getPackageNameByExposeUrl(pathname); + // /static/plugins/@nocobase/plugins-acl/README.md => /User/projects/nocobase/plugins/acl + const publicDir = getPackageDirByExposeUrl(pathname); + // /static/plugins/@nocobase/plugins-acl/README.md => README.md + const destination = pathname.replace(PLUGIN_STATICS_PATH, '').replace(packageName, ''); return handler(req, res, { - public: resolve(process.cwd(), 'node_modules'), + public: publicDir, rewrites: [ { - source: '/api/plugins/client/:plugin/:file', - destination: '/:plugin/dist/client/:file', - }, - { - source: '/api/plugins/client/@:org/:plugin/:file', - destination: '/@:org/:plugin/dist/client/:file', + source: pathname, + destination, }, ], }); @@ -192,9 +199,23 @@ export class Gateway extends EventEmitter { return this.requestHandler.bind(this); } + async watch() { + if (!process.env.IS_DEV_CMD) { + return; + } + const file = resolve(process.cwd(), 'storage/app.watch.ts'); + if (!fs.existsSync(file)) { + await fs.promises.writeFile(file, `export const watchId = '${uid()}';`, 'utf-8'); + } + require(file); + } + async run(options: RunOptions) { const isStart = this.isStart(); + let ipcClient: IPCSocketClient | false; if (isStart) { + await this.watch(); + const startOptions = this.getStartOptions(); const port = startOptions.port || process.env.APP_PORT || 13000; const host = startOptions.host || process.env.APP_HOST || '0.0.0.0'; @@ -204,7 +225,7 @@ export class Gateway extends EventEmitter { host, }); } else if (!this.isHelp()) { - const ipcClient = await this.tryConnectToIPCServer(); + ipcClient = await this.tryConnectToIPCServer(); if (ipcClient) { await ipcClient.write({ type: 'passCliArgv', payload: { argv: process.argv } }); @@ -214,6 +235,10 @@ export class Gateway extends EventEmitter { } } + if (isStart || !ipcClient) { + await createStoragePluginsSymlink(); + } + const mainApp = AppSupervisor.getInstance().bootMainApp(options.mainAppOptions); mainApp diff --git a/packages/core/server/src/helper.ts b/packages/core/server/src/helper.ts index a67dc7670..d99bf53dc 100644 --- a/packages/core/server/src/helper.ts +++ b/packages/core/server/src/helper.ts @@ -1,9 +1,12 @@ import cors from '@koa/cors'; import Database from '@nocobase/database'; import { Resourcer } from '@nocobase/resourcer'; +import { uid } from '@nocobase/utils'; import { Command } from 'commander'; +import fs from 'fs'; import i18next from 'i18next'; import bodyParser from 'koa-bodyparser'; +import { resolve } from 'path'; import Application, { ApplicationOptions } from './application'; import { parseVariables } from './middlewares'; import { dateTemplate } from './middlewares/data-template'; @@ -111,3 +114,8 @@ export const getCommandFullName = (command: Command) => { } return names.join('.'); }; + +export const tsxRerunning = async () => { + const file = resolve(process.cwd(), 'storage/app.watch.ts'); + await fs.promises.writeFile(file, `export const watchId = '${uid()}';`, 'utf-8'); +}; diff --git a/packages/core/server/src/migrations/20230910193824-package-name-unique.ts b/packages/core/server/src/migrations/20230910193824-package-name-unique.ts new file mode 100644 index 000000000..42013601b --- /dev/null +++ b/packages/core/server/src/migrations/20230910193824-package-name-unique.ts @@ -0,0 +1,23 @@ +import { DataTypes } from '@nocobase/database'; +import { Migration } from '../migration'; + +export default class extends Migration { + async up() { + const collection = this.db.getCollection('applicationPlugins'); + if (!collection) { + return; + } + const tableNameWithSchema = collection.getTableNameWithSchema(); + const field = collection.getField('packageName'); + if (await field.existsInDb()) { + return; + } + await this.db.sequelize.getQueryInterface().addColumn(tableNameWithSchema, 'packageName', { + type: DataTypes.STRING, + }); + await this.db.sequelize.getQueryInterface().addConstraint(tableNameWithSchema, { + type: 'unique', + fields: ['packageName'], + }); + } +} diff --git a/packages/core/server/src/plugin-manager/clientStaticMiddleware.ts b/packages/core/server/src/plugin-manager/clientStaticMiddleware.ts deleted file mode 100644 index b223f819c..000000000 --- a/packages/core/server/src/plugin-manager/clientStaticMiddleware.ts +++ /dev/null @@ -1,12 +0,0 @@ -const PREFIX = '/api/plugins/client/'; - -/** - * get plugin client static file url - * - * @example - * @nocobase/plugin-acl, index.js => /api/plugins/client/@nocobase/plugin-acl/index.js - * my-plugin, README.md => /api/plugins/client/my-plugin/README.md - */ -export const getPackageClientStaticUrl = (packageName: string, filePath: string) => { - return `${PREFIX}${packageName}/${filePath}`; -}; diff --git a/packages/core/server/src/plugin-manager/clientStaticUtils.ts b/packages/core/server/src/plugin-manager/clientStaticUtils.ts new file mode 100644 index 000000000..e7e6b6087 --- /dev/null +++ b/packages/core/server/src/plugin-manager/clientStaticUtils.ts @@ -0,0 +1,76 @@ +import fs from 'fs'; +import path from 'path'; + +export const PLUGIN_STATICS_PATH = '/static/plugins/'; + +/** + * get package.json path for specific NPM package + */ +export function getDepPkgPath(packageName: string, cwd?: string) { + try { + return require.resolve(`${packageName}/package.json`, { paths: cwd ? [cwd] : undefined }); + } catch { + const mainFile = require.resolve(`${packageName}`, { paths: cwd ? [cwd] : undefined }); + const packageDir = mainFile.slice(0, mainFile.indexOf(packageName.replace('/', path.sep)) + packageName.length); + return path.join(packageDir, 'package.json'); + } +} + +export function getPackageDir(packageName: string) { + const packageJsonPath = getDepPkgPath(packageName); + return path.dirname(packageJsonPath); +} + +export function getPackageFilePath(packageName: string, filePath: string) { + const packageDir = getPackageDir(packageName); + return path.join(packageDir, filePath); +} + +export function getPackageFilePathWithExistCheck(packageName: string, filePath: string) { + const absolutePath = getPackageFilePath(packageName, filePath); + const exists = fs.existsSync(absolutePath); + return { + filePath: absolutePath, + exists, + }; +} + +export function getExposeUrl(packageName: string, filePath: string) { + return `${PLUGIN_STATICS_PATH}${packageName}/${filePath}`; +} + +export function getExposeReadmeUrl(packageName: string, lang: string) { + let READMEPath = null; + if (getPackageFilePathWithExistCheck(packageName, `README.${lang}.md`).exists) { + READMEPath = `README.${lang}.md`; + } else if (getPackageFilePathWithExistCheck(packageName, 'README.md').exists) { + READMEPath = 'README.md'; + } + + return READMEPath ? getExposeUrl(packageName, READMEPath) : null; +} + +export function getExposeChangelogUrl(packageName: string) { + const { exists } = getPackageFilePathWithExistCheck(packageName, 'CHANGELOG.md'); + return exists ? getExposeUrl(packageName, 'CHANGELOG.md') : null; +} + +/** + * get package name by client static url + * + * @example + * getPluginNameByClientStaticUrl('/static/plugins/dayjs/index.js') => 'dayjs' + * getPluginNameByClientStaticUrl('/static/plugins/@nocobase/foo/README.md') => '@nocobase/foo' + */ +export function getPackageNameByExposeUrl(pathname: string) { + pathname = pathname.replace(PLUGIN_STATICS_PATH, ''); + const pathArr = pathname.split('/'); + if (pathname.startsWith('@')) { + return pathArr.slice(0, 2).join('/'); + } + return pathArr[0]; +} + +export function getPackageDirByExposeUrl(pathname: string) { + return getPackageDir(getPackageNameByExposeUrl(pathname)); +} diff --git a/packages/core/server/src/plugin-manager/constants.ts b/packages/core/server/src/plugin-manager/constants.ts new file mode 100644 index 000000000..260648cf5 --- /dev/null +++ b/packages/core/server/src/plugin-manager/constants.ts @@ -0,0 +1,103 @@ +export const APP_NAME = 'nocobase'; +export const DEFAULT_PLUGIN_STORAGE_PATH = 'storage/plugins'; +export const DEFAULT_PLUGIN_PATH = 'packages/plugins/'; +export const pluginPrefix = ( + process.env.PLUGIN_PACKAGE_PREFIX || '@nocobase/plugin-,@nocobase/preset-,@nocobase/plugin-pro-' +).split(','); +export const requireRegex = /require\s*\(['"`](.*?)['"`]\)/g; +export const importRegex = /^import(?:['"\s]*([\w*${}\s,]+)from\s*)?['"\s]['"\s](.*[@\w_-]+)['"\s].*/gm; +export const EXTERNAL = [ + // nocobase + '@nocobase/acl', + '@nocobase/actions', + '@nocobase/auth', + '@nocobase/cache', + '@nocobase/client', + '@nocobase/database', + '@nocobase/evaluators', + '@nocobase/logger', + '@nocobase/resourcer', + '@nocobase/sdk', + '@nocobase/server', + '@nocobase/test', + '@nocobase/utils', + + // @nocobase/auth + 'jsonwebtoken', + + // @nocobase/cache + 'cache-manager', + + // @nocobase/database + 'sequelize', + 'umzug', + 'async-mutex', + + // @nocobase/evaluators + '@formulajs/formulajs', + 'mathjs', + + // @nocobase/logger + 'winston', + 'winston-daily-rotate-file', + + // koa + 'koa', + '@koa/cors', + '@koa/router', + 'multer', + '@koa/multer', + 'koa-bodyparser', + 'koa-static', + 'koa-send', + + // react + 'react', + 'react-dom', + 'react/jsx-runtime', + + // react-router + 'react-router', + 'react-router-dom', + + // antd + 'antd', + 'antd-style', + '@ant-design/icons', + '@ant-design/cssinjs', + + // i18next + 'i18next', + 'react-i18next', + + // dnd-kit 相关 + '@dnd-kit/accessibility', + '@dnd-kit/core', + '@dnd-kit/modifiers', + '@dnd-kit/sortable', + '@dnd-kit/utilities', + + // formily 相关 + '@formily/antd-v5', + '@formily/core', + '@formily/react', + '@formily/json-schema', + '@formily/path', + '@formily/validator', + '@formily/shared', + '@formily/reactive', + '@formily/reactive-react', + + // utils + 'dayjs', + 'mysql2', + 'pg', + 'pg-hstore', + 'sqlite3', + 'supertest', + 'axios', + '@emotion/css', + 'ahooks', + 'lodash', + 'china-division', +]; diff --git a/packages/core/server/src/plugin-manager/deps.ts b/packages/core/server/src/plugin-manager/deps.ts new file mode 100644 index 000000000..b3487d3a4 --- /dev/null +++ b/packages/core/server/src/plugin-manager/deps.ts @@ -0,0 +1,55 @@ +// @ts-ignore +import { version } from '../../package.json'; + +const deps: Record = { + '@nocobase': `${version.split('.').slice(0, 2).join('.')}.x`, // 0.12.x + '@formily': '2.x', + + '@formily/antd-v5': '1.x', + jsonwebtoken: '8.x', + 'cache-manager': '4.x', + sequelize: '6.x', + umzug: '3.x', + 'async-mutex': '0.3.x', + '@formulajs/formulajs': '4.x', + mathjs: '10.x', + winston: '3.x', + 'winston-daily-rotate-file': '4.x', + koa: '2.x', + '@koa/cors': '3.x', + '@koa/router': '9.x', + multer: '1.x', + '@koa/multer': '3.x', + 'koa-bodyparser': '4.x', + 'koa-static': '5.x', + 'koa-send': '5.x', + react: '18.x', + 'react-dom': '18.x', + 'react-router': '6.x', + 'react-router-dom': '6.x', + antd: '5.x', + 'antd-style': '3.x', + '@ant-design/icons': '5.x', + '@ant-design/cssinjs': '1.x', + i18next: '22.x', + 'react-i18next': '11.x', + '@dnd-kit/accessibility': '3.x', + '@dnd-kit/core': '5.x', + '@dnd-kit/modifiers': '6.x', + '@dnd-kit/sortable': '6.x', + '@dnd-kit/utilities': '3.x', + dayjs: '1.x', + mysql2: '2.x', + pg: '8.x', + 'pg-hstore': '2.x', + sqlite3: '5.x', + supertest: '6.x', + axios: '0.26.x', + '@emotion/css': '11.x', + ahooks: '3.x', + lodash: '4.x', + 'china-division': '2.x', + cronstrue: '2.x', +}; + +export default deps; diff --git a/packages/core/server/src/plugin-manager/index.ts b/packages/core/server/src/plugin-manager/index.ts index 66f490a9d..af89af531 100644 --- a/packages/core/server/src/plugin-manager/index.ts +++ b/packages/core/server/src/plugin-manager/index.ts @@ -1,2 +1,2 @@ -export * from './clientStaticMiddleware'; +export * from './clientStaticUtils'; export * from './plugin-manager'; diff --git a/packages/core/server/src/plugin-manager/middleware.ts b/packages/core/server/src/plugin-manager/middleware.ts new file mode 100644 index 000000000..547d837da --- /dev/null +++ b/packages/core/server/src/plugin-manager/middleware.ts @@ -0,0 +1,10 @@ +import { Context, Next } from '@nocobase/actions'; +import { koaMulter as multer } from '@nocobase/utils'; + +export async function uploadMiddleware(ctx: Context, next: Next) { + if (ctx.action.resourceName === 'pm' && ['add', 'update'].includes(ctx.action.actionName)) { + const upload = multer().single('file'); + return upload(ctx, next); + } + return next(); +} diff --git a/packages/core/server/src/plugin-manager/options/collection.ts b/packages/core/server/src/plugin-manager/options/collection.ts index 495bc69b5..b6c607be3 100644 --- a/packages/core/server/src/plugin-manager/options/collection.ts +++ b/packages/core/server/src/plugin-manager/options/collection.ts @@ -7,6 +7,7 @@ export default defineCollection({ repository: 'PluginManagerRepository', fields: [ { type: 'string', name: 'name', unique: true }, + { type: 'string', name: 'packageName', unique: true }, { type: 'string', name: 'version' }, { type: 'boolean', name: 'enabled' }, { type: 'boolean', name: 'installed' }, diff --git a/packages/core/server/src/plugin-manager/options/resource.ts b/packages/core/server/src/plugin-manager/options/resource.ts index 488069357..55849ddc1 100644 --- a/packages/core/server/src/plugin-manager/options/resource.ts +++ b/packages/core/server/src/plugin-manager/options/resource.ts @@ -1,20 +1,86 @@ +import { uid } from '@nocobase/utils'; +import fs from 'fs'; +import path from 'path'; import Application from '../../application'; +import { getExposeUrl } from '../clientStaticUtils'; +import PluginManager from '../plugin-manager'; export default { name: 'pm', actions: { async add(ctx, next) { - const pm = ctx.app.pm; + const app = ctx.app as Application; + const { values = {} } = ctx.action.params; + if (values?.packageName) { + const args = []; + if (values.registry) { + args.push('--registry=' + values.registry); + } + if (values.version) { + args.push('--version=' + values.version); + } + if (values.authToken) { + args.push('--auth-token=' + values.authToken); + } + app.runAsCLI(['pm', 'add', values.packageName, ...args], { from: 'user' }); + } else if (ctx.file) { + const tmpDir = path.resolve(process.cwd(), 'storage', 'tmp'); + try { + await fs.promises.mkdir(tmpDir, { recursive: true }); + } catch (error) { + // empty + } + const tempFile = path.join(process.cwd(), 'storage/tmp', uid() + path.extname(ctx.file.originalname)); + await fs.promises.writeFile(tempFile, ctx.file.buffer, 'binary'); + app.runAsCLI(['pm', 'add', tempFile], { from: 'user' }); + } else if (values.compressedFileUrl) { + app.runAsCLI(['pm', 'add', values.compressedFileUrl], { from: 'user' }); + } + ctx.body = 'ok'; + await next(); + }, + async update(ctx, next) { + const app = ctx.app as Application; + const values = ctx.action.params.values || {}; + const args = []; + if (values.registry) { + args.push('--registry=' + values.registry); + } + if (values.version) { + args.push('--version=' + values.version); + } + if (values.authToken) { + args.push('--auth-token=' + values.authToken); + } + if (values.compressedFileUrl) { + args.push('--url=' + values.compressedFileUrl); + } + if (ctx.file) { + values.packageName = ctx.request.body.packageName; + const tmpDir = path.resolve(process.cwd(), 'storage', 'tmp'); + try { + await fs.promises.mkdir(tmpDir, { recursive: true }); + } catch (error) { + // empty + } + const tempFile = path.join(process.cwd(), 'storage/tmp', uid() + path.extname(ctx.file.originalname)); + await fs.promises.writeFile(tempFile, ctx.file.buffer, 'binary'); + args.push(`--url=${tempFile}`); + } + app.runAsCLI(['pm', 'update', values.packageName, ...args], { from: 'user' }); + ctx.body = 'ok'; + await next(); + }, + async npmVersionList(ctx, next) { const { filterByTk } = ctx.action.params; if (!filterByTk) { ctx.throw(400, 'plugin name invalid'); } - await pm.add(filterByTk); - ctx.body = filterByTk; + const pm = ctx.app.pm; + ctx.body = await pm.getNpmVersionList(filterByTk); await next(); }, async enable(ctx, next) { - const pm = ctx.app.pm; const { filterByTk } = ctx.action.params; const app = ctx.app as Application; if (!filterByTk) { @@ -25,7 +91,6 @@ export default { await next(); }, async disable(ctx, next) { - const pm = ctx.app.pm; const { filterByTk } = ctx.action.params; if (!filterByTk) { ctx.throw(400, 'plugin name invalid'); @@ -35,12 +100,7 @@ export default { ctx.body = filterByTk; await next(); }, - async upgrade(ctx, next) { - ctx.body = 'ok'; - await next(); - }, async remove(ctx, next) { - const pm = ctx.app.pm; const { filterByTk } = ctx.action.params; if (!filterByTk) { ctx.throw(400, 'plugin name invalid'); @@ -50,5 +110,45 @@ export default { ctx.body = filterByTk; await next(); }, + async list(ctx, next) { + const locale = ctx.getCurrentLocale(); + const pm = ctx.app.pm as PluginManager; + ctx.body = await pm.list({ locale, isPreset: false }); + await next(); + }, + async listEnabled(ctx, next) { + const pm = ctx.db.getRepository('applicationPlugins'); + const PLUGIN_CLIENT_ENTRY_FILE = 'dist/client/index.js'; + const items = await pm.find({ + filter: { + enabled: true, + }, + }); + ctx.body = items + .map((item) => { + try { + const packageName = PluginManager.getPackageName(item.name); + return { + ...item.toJSON(), + packageName, + url: getExposeUrl(packageName, PLUGIN_CLIENT_ENTRY_FILE), + }; + } catch { + return false; + } + }) + .filter(Boolean); + await next(); + }, + async get(ctx, next) { + const locale = ctx.getCurrentLocale(); + const pm = ctx.app.pm as PluginManager; + const { filterByTk } = ctx.action.params; + if (!filterByTk) { + ctx.throw(400, 'plugin name invalid'); + } + ctx.body = await pm.get(filterByTk).toJSON({ locale }); + await next(); + }, }, }; diff --git a/packages/core/server/src/plugin-manager/plugin-manager-repository.ts b/packages/core/server/src/plugin-manager/plugin-manager-repository.ts index 20a7a2fa2..4d173c583 100644 --- a/packages/core/server/src/plugin-manager/plugin-manager-repository.ts +++ b/packages/core/server/src/plugin-manager/plugin-manager-repository.ts @@ -1,6 +1,7 @@ import { Repository } from '@nocobase/database'; import lodash from 'lodash'; import { PluginManager } from './plugin-manager'; +import { PluginData } from './types'; export class PluginManagerRepository extends Repository { pm: PluginManager; @@ -47,6 +48,15 @@ export class PluginManagerRepository extends Repository { return pluginNames; } + async upgrade(name: string, data: PluginData) { + return this.update({ + filter: { + name, + }, + values: data, + }); + } + async disable(name: string | string[]) { name = lodash.cloneDeep(name); @@ -74,6 +84,7 @@ export class PluginManagerRepository extends Repository { sort: 'id', }); } catch (error) { + await this.database.migrator.up(); await this.collection.sync({ alter: { drop: false, diff --git a/packages/core/server/src/plugin-manager/plugin-manager.ts b/packages/core/server/src/plugin-manager/plugin-manager.ts index 4416cad70..4db965264 100644 --- a/packages/core/server/src/plugin-manager/plugin-manager.ts +++ b/packages/core/server/src/plugin-manager/plugin-manager.ts @@ -1,15 +1,28 @@ import { CleanOptions, Collection, SyncOptions } from '@nocobase/database'; -import { requireModule } from '@nocobase/utils'; +import { isURL } from '@nocobase/utils'; +import { fsExists } from '@nocobase/utils/plugin-symlink'; import execa from 'execa'; import _ from 'lodash'; import net from 'net'; -import { resolve } from 'path'; +import { resolve, sep } from 'path'; import Application from '../application'; -import { createAppProxy } from '../helper'; +import { createAppProxy, tsxRerunning } from '../helper'; import { Plugin } from '../plugin'; +import { uploadMiddleware } from './middleware'; import collectionOptions from './options/collection'; import resourceOptions from './options/resource'; import { PluginManagerRepository } from './plugin-manager-repository'; +import { PluginData } from './types'; +import { + copyTempPackageToStorageAndLinkToNodeModules, + downloadAndUnzipToTempDir, + getNpmInfo, + getPluginInfoByNpm, + removeTmpDir, + requireModule, + requireNoCache, + updatePluginByCompressedFileUrl, +} from './utils'; export interface PluginManagerOptions { app: Application; @@ -43,31 +56,16 @@ export class PluginManager { this._repository = this.collection.repository as PluginManagerRepository; this._repository.setPluginManager(this); this.app.resourcer.define(resourceOptions); - - this.app.resourcer.use(async (ctx, next) => { - await next(); - const { resourceName, actionName } = ctx.action; - if (resourceName === 'applicationPlugins' && actionName === 'list') { - const lng = ctx.getCurrentLocale(); - if (Array.isArray(ctx.body)) { - ctx.body = ctx.body.map((plugin) => { - const json = plugin.toJSON(); - const packageName = PluginManager.getPackageName(json.name); - const packageJson = PluginManager.getPackageJson(packageName); - return { - displayName: packageJson[`displayName.${lng}`] || packageJson.displayName, - description: packageJson[`description.${lng}`] || packageJson.description, - ...json, - }; - }); - } - } - }); - + this.app.acl.allow('pm', 'listEnabled', 'public'); this.app.acl.registerSnippet({ name: 'pm', - actions: ['pm:*', 'applicationPlugins:list'], + actions: ['pm:*'], }); + this.app.db.addMigrations({ + namespace: 'core/pm', + directory: resolve(__dirname, '../migrations'), + }); + this.app.resourcer.use(uploadMiddleware); } get repository() { @@ -75,7 +73,7 @@ export class PluginManager { } static getPackageJson(packageName: string) { - return require(`${packageName}/package.json`); + return requireNoCache(`${packageName}/package.json`); } static getPackageName(name: string) { @@ -121,9 +119,19 @@ export class PluginManager { throw new Error(`No available packages found, ${name} plugin does not exist`); } - static resolvePlugin(pluginName: string | typeof Plugin) { + static clearCache(packageName: string) { + const packageNamePath = packageName.replace('/', sep); + Object.keys(require.cache).forEach((key) => { + if (key.includes(packageNamePath)) { + delete require.cache[key]; + } + }); + } + + static resolvePlugin(pluginName: string | typeof Plugin, isUpgrade = false, isPkg = false) { if (typeof pluginName === 'string') { - const packageName = this.getPackageName(pluginName); + const packageName = isPkg ? pluginName : this.getPackageName(pluginName); + this.clearCache(packageName); return requireModule(packageName); } else { return pluginName; @@ -170,10 +178,8 @@ export class PluginManager { } } - async create(name: string | string[]) { + async create(pluginName: string) { console.log('creating...'); - const pluginNames = Array.isArray(name) ? name : [name]; - const { run } = require('@nocobase/cli/src/util'); const createPlugin = async (name) => { const { PluginGenerator } = require('@nocobase/cli/src/plugin-generator'); const generator = new PluginGenerator({ @@ -185,12 +191,21 @@ export class PluginManager { }); await generator.run(); }; - await Promise.all(pluginNames.map((pluginName) => createPlugin(pluginName))); - await run('yarn', ['install']); + await createPlugin(pluginName); + await this.repository.create({ + values: { + name: pluginName, + packageName: pluginName, + version: '0.1.0', + }, + }); + await tsxRerunning(); + // await createDevPluginSymLink(pluginName); + // await this.add(pluginName, { packageName: pluginName }, true); } - async add(plugin?: any, options: any = {}, insert = false) { - if (this.has(plugin)) { + async add(plugin?: any, options: any = {}, insert = false, isUpgrade = false) { + if (!isUpgrade && this.has(plugin)) { const name = typeof plugin === 'string' ? plugin : plugin.name; this.app.log.warn(`plugin [${name}] added`); return; @@ -198,10 +213,24 @@ export class PluginManager { if (!options.name && typeof plugin === 'string') { options.name = plugin; } + try { + if (typeof plugin === 'string' && options.name && !options.packageName) { + const packageName = PluginManager.getPackageName(options.name); + options['packageName'] = packageName; + } + if (options.packageName) { + const packageJson = PluginManager.getPackageJson(options.packageName); + options['packageJson'] = packageJson; + options['version'] = packageJson.version; + } + } catch (error) { + console.error(error); + // empty + } this.app.log.debug(`adding plugin [${options.name}]...`); let P: any; try { - P = PluginManager.resolvePlugin(plugin); + P = PluginManager.resolvePlugin(options.packageName || plugin, isUpgrade, !!options.packageName); } catch (error) { this.app.log.warn('plugin not found', error); return; @@ -212,12 +241,9 @@ export class PluginManager { this.pluginAliases.set(options.name, instance); } if (insert && options.name) { - const packageName = PluginManager.getPackageName(options.name); - const packageJson = PluginManager.getPackageJson(packageName); await this.repository.updateOrCreate({ values: { ...options, - version: packageJson.version, }, filterKeys: ['name'], }); @@ -451,7 +477,7 @@ export class PluginManager { for (const pluginName of pluginNames) { const plugin = this.get(pluginName); if (!plugin) { - throw new Error(`${pluginName} plugin does not exist`); + continue; } if (plugin.enabled) { throw new Error(`${pluginName} plugin is enabled`); @@ -466,13 +492,20 @@ export class PluginManager { const plugins: Plugin[] = []; for (const pluginName of pluginNames) { const plugin = this.get(pluginName); + if (!plugin) { + continue; + } plugins.push(plugin); this.del(pluginName); + // if (plugin.options.type && plugin.options.packageName) { + // await removePluginPackage(plugin.options.packageName); + // } } await this.app.reload(); for (const plugin of plugins) { await plugin.afterRemove(); } + await this.app.emitStartedEvent(); } protected async initPresetPlugins() { @@ -481,6 +514,200 @@ export class PluginManager { await this.add(p, { enabled: true, isPreset: true, ...opts }); } } + + async loadOne(plugin: Plugin) { + this.app.setMaintainingMessage(`loading plugin ${plugin.name}...`); + if (plugin.state.loaded || !plugin.enabled) { + return; + } + const name = plugin.getName(); + await plugin.beforeLoad(); + + await this.app.emitAsync('beforeLoadPlugin', plugin, {}); + this.app.logger.debug(`loading plugin [${name}]...`); + await plugin.load(); + plugin.state.loaded = true; + await this.app.emitAsync('afterLoadPlugin', plugin, {}); + this.app.logger.debug(`after load plugin [${name}]...`); + + this.app.setMaintainingMessage(`loaded plugin ${plugin.name}`); + } + + async addViaCLI(urlOrName: string, options?: PluginData) { + if (isURL(urlOrName)) { + await this.addByCompressedFileUrl({ + ...options, + compressedFileUrl: urlOrName, + }); + } else if (await fsExists(urlOrName)) { + await this.addByCompressedFileUrl({ + ...(options as any), + compressedFileUrl: urlOrName, + }); + } else if (options?.registry) { + if (!options.name) { + const model = await this.repository.findOne({ filter: { packageName: urlOrName } }); + if (model) { + options['name'] = model?.name; + } + if (!options.name) { + options['name'] = urlOrName.replace('@nocobase/plugin-', ''); + } + } + await this.addByNpm({ + ...(options as any), + packageName: urlOrName, + }); + } else { + const opts = { + ...options, + }; + const model = await this.repository.findOne({ filter: { packageName: urlOrName } }); + if (model) { + opts['name'] = model.name; + } + if (!opts['name']) { + opts['packageName'] = urlOrName; + } + await this.add(opts['name'] || urlOrName, opts, true); + } + await this.app.emitStartedEvent(); + } + + async addByNpm(options: { packageName: string; name?: string; registry: string; authToken?: string }) { + let { name = '', registry, packageName, authToken } = options; + name = name.trim(); + registry = registry.trim(); + packageName = packageName.trim(); + authToken = authToken?.trim(); + const { compressedFileUrl } = await getPluginInfoByNpm({ + packageName, + registry, + authToken, + }); + return this.addByCompressedFileUrl({ name, compressedFileUrl, registry, authToken, type: 'npm' }); + } + + async addByFile(options: { file: string; registry?: string; authToken?: string; type?: string; name?: string }) { + const { file, authToken } = options; + + const { packageName, tempFile, tempPackageContentDir } = await downloadAndUnzipToTempDir(file, authToken); + + const name = options.name || packageName; + + if (this.has(name)) { + await removeTmpDir(tempFile, tempPackageContentDir); + throw new Error(`plugin name [${name}] already exists`); + } + await copyTempPackageToStorageAndLinkToNodeModules(tempFile, tempPackageContentDir, packageName); + return this.add(name, { packageName }, true); + } + + async addByCompressedFileUrl(options: { + compressedFileUrl: string; + registry?: string; + authToken?: string; + type?: string; + name?: string; + }) { + const { compressedFileUrl, authToken } = options; + + const { packageName, tempFile, tempPackageContentDir } = await downloadAndUnzipToTempDir( + compressedFileUrl, + authToken, + ); + + const name = options.name || packageName; + + if (this.has(name)) { + await removeTmpDir(tempFile, tempPackageContentDir); + throw new Error(`plugin name [${name}] already exists`); + } + await copyTempPackageToStorageAndLinkToNodeModules(tempFile, tempPackageContentDir, packageName); + return this.add(name, { packageName }, true); + } + + async update(options: PluginData) { + if (options['url']) { + options.compressedFileUrl = options['url']; + } + if (!options.name) { + const model = await this.repository.findOne({ filter: { packageName: options.packageName } }); + options['name'] = model.name; + } + if (options.compressedFileUrl) { + await this.upgradeByCompressedFileUrl(options); + } else { + await this.upgradeByNpm(options as any); + } + await this.app.upgrade(); + } + + async upgradeByNpm(values: PluginData) { + const name = values.name; + const plugin = this.get(name); + if (!this.has(name)) { + throw new Error(`plugin name [${name}] not exists`); + } + if (!plugin.options.packageName || !values.registry) { + throw new Error(`plugin name [${name}] not installed by npm`); + } + const version = values.version?.trim(); + const registry = values.registry?.trim() || plugin.options.registry; + const authToken = values.authToken?.trim() || plugin.options.authToken; + const { compressedFileUrl } = await getPluginInfoByNpm({ + packageName: plugin.options.packageName, + registry: registry, + authToken: authToken, + version, + }); + return this.upgradeByCompressedFileUrl({ compressedFileUrl, name, version, registry, authToken }); + } + + async upgradeByCompressedFileUrl(options: PluginData) { + const { name, compressedFileUrl, authToken } = options; + const data = await this.repository.findOne({ filter: { name } }); + const { version } = await updatePluginByCompressedFileUrl({ + compressedFileUrl, + packageName: data.packageName, + authToken: authToken, + }); + await this.add(name, { version, packageName: data.packageName }, true, true); + } + + getNameByPackageName(packageName: string) { + const prefixes = PluginManager.getPluginPkgPrefix(); + const prefix = prefixes.find((prefix) => packageName.startsWith(prefix)); + if (!prefix) { + throw new Error( + `package name [${packageName}] invalid, just support ${prefixes.join( + ', ', + )}. You can modify process.env.PLUGIN_PACKAGE_PREFIX add more prefix.`, + ); + } + return packageName.replace(prefix, ''); + } + + async list(options: any = {}) { + const { locale = 'en-US', isPreset = false } = options; + return Promise.all( + [...this.getAliases()] + .map((name) => { + const plugin = this.get(name); + if (!isPreset && plugin.options.isPreset) { + return; + } + return plugin.toJSON({ locale }); + }) + .filter(Boolean), + ); + } + + async getNpmVersionList(name: string) { + const plugin = this.get(name); + const npmInfo = await getNpmInfo(plugin.options.packageName, plugin.options.registry, plugin.options.authToken); + return Object.keys(npmInfo.versions); + } } export default PluginManager; diff --git a/packages/core/server/src/plugin-manager/types.ts b/packages/core/server/src/plugin-manager/types.ts new file mode 100644 index 000000000..98bee32b4 --- /dev/null +++ b/packages/core/server/src/plugin-manager/types.ts @@ -0,0 +1,15 @@ +export interface PluginData { + name?: string; + packageName?: string; + version?: string; + preVersion?: string; + registry?: string; + clientUrl?: string; + compressedFileUrl?: string; + enabled?: boolean; + type?: 'url' | 'npm' | 'upload'; + authToken?: string; + installed?: boolean; + builtIn?: boolean; + options?: any; +} diff --git a/packages/core/server/src/plugin-manager/utils.ts b/packages/core/server/src/plugin-manager/utils.ts new file mode 100644 index 000000000..9430664e0 --- /dev/null +++ b/packages/core/server/src/plugin-manager/utils.ts @@ -0,0 +1,552 @@ +import { isURL } from '@nocobase/utils'; +import { createStoragePluginSymLink } from '@nocobase/utils/plugin-symlink'; +import axios, { AxiosRequestConfig } from 'axios'; +import decompress from 'decompress'; +import fg from 'fast-glob'; +import fs from 'fs-extra'; +import ini from 'ini'; +import { builtinModules } from 'module'; +import os from 'os'; +import path from 'path'; +import semver from 'semver'; +import { + APP_NAME, + DEFAULT_PLUGIN_PATH, + DEFAULT_PLUGIN_STORAGE_PATH, + EXTERNAL, + importRegex, + pluginPrefix, + requireRegex, +} from './constants'; +import deps from './deps'; +import { PluginData } from './types'; +import { getDepPkgPath, getPackageDir, getPackageFilePathWithExistCheck } from './clientStaticUtils'; + +/** + * get temp dir + * + * @example + * getTempDir() => '/tmp/nocobase' + */ +export async function getTempDir() { + const temporaryDirectory = await fs.realpath(os.tmpdir()); + return path.join(temporaryDirectory, APP_NAME); +} + +export function getPluginStoragePath() { + const pluginStoragePath = process.env.PLUGIN_STORAGE_PATH || DEFAULT_PLUGIN_STORAGE_PATH; + return path.isAbsolute(pluginStoragePath) ? pluginStoragePath : path.join(process.cwd(), pluginStoragePath); +} + +export function getLocalPluginPackagesPathArr(): string[] { + const pluginPackagesPathArr = process.env.PLUGIN_PATH || DEFAULT_PLUGIN_PATH; + return pluginPackagesPathArr.split(',').map((pluginPackagesPath) => { + pluginPackagesPath = pluginPackagesPath.trim(); + return path.isAbsolute(pluginPackagesPath) ? pluginPackagesPath : path.join(process.cwd(), pluginPackagesPath); + }); +} + +export function getStoragePluginDir(packageName: string) { + const pluginStoragePath = getPluginStoragePath(); + return path.join(pluginStoragePath, packageName); +} + +export function getLocalPluginDir(packageDirBasename: string) { + const localPluginDir = getLocalPluginPackagesPathArr() + .map((pluginPackagesPath) => path.join(pluginPackagesPath, packageDirBasename)) + .find((pluginDir) => fs.existsSync(pluginDir)); + + if (!localPluginDir) { + throw new Error(`local plugin "${packageDirBasename}" not found`); + } + + return localPluginDir; +} + +export function getNodeModulesPluginDir(packageName: string) { + return path.join(process.env.NODE_MODULES_PATH, packageName); +} + +export function getAuthorizationHeaders(registry?: string, authToken?: string) { + const headers = {}; + if (registry && !authToken) { + const npmrcPath = path.join(process.cwd(), '.npmrc'); + const url = new URL(registry); + let envConfig: Record = process.env; + if (fs.existsSync(npmrcPath)) { + const content = fs.readFileSync(path.join(process.cwd(), '.npmrc'), 'utf-8'); + envConfig = { + ...envConfig, + ...ini.parse(content), + }; + } + const key = Object.keys(envConfig).find((key) => key.includes(url.host) && key.includes('_authToken')); + if (key) { + authToken = envConfig[key]; + } + } + if (authToken) { + headers['Authorization'] = `Bearer ${authToken}`; + } + return headers; +} + +/** + * get latest version from npm + * + * @example + * getLatestVersion('dayjs', 'https://registry.npmjs.org') => '1.10.6' + */ +export async function getLatestVersion(packageName: string, registry: string, token?: string) { + const npmInfo = await getNpmInfo(packageName, registry, token); + const latestVersion = npmInfo['dist-tags'].latest; + return latestVersion; +} + +export async function getNpmInfo(packageName: string, registry: string, token?: string) { + registry.endsWith('/') && (registry = registry.slice(0, -1)); + const response = await axios.get(`${registry}/${packageName}`, { + headers: getAuthorizationHeaders(registry, token), + }); + try { + const data = response.data; + return data; + } catch (e) { + console.error(e); + throw new Error(`${registry} is not a valid registry, '${registry}/${packageName}' response is not a valid json.`); + } +} + +export async function download(url: string, destination: string, options: AxiosRequestConfig = {}) { + const response = await axios.get(url, { + ...options, + responseType: 'stream', + }); + + fs.mkdirpSync(path.dirname(destination)); + const writer = fs.createWriteStream(destination); + + response.data.pipe(writer); + + return new Promise((resolve, reject) => { + writer.on('finish', resolve); + writer.on('error', reject); + }); +} + +export async function removeTmpDir(tempFile: string, tempPackageContentDir: string) { + await fs.remove(tempFile); + await fs.remove(tempPackageContentDir); +} + +/** + * download and unzip to node_modules + */ +export async function downloadAndUnzipToTempDir(fileUrl: string, authToken?: string) { + const fileName = path.basename(fileUrl); + const tempDir = await getTempDir(); + const tempFile = path.join(tempDir, fileName); + const tempPackageDir = tempFile.replace(path.extname(fileName), ''); + + // download and unzip to temp dir + await fs.remove(tempPackageDir); + await fs.remove(tempFile); + + if (isURL(fileUrl)) { + await download(fileUrl, tempFile, { + headers: getAuthorizationHeaders(fileUrl, authToken), + }); + } else if (await fs.exists(fileUrl)) { + await fs.copy(fileUrl, tempFile); + } else { + throw new Error(`${fileUrl} does not exist`); + } + + if (!fs.existsSync(tempFile)) { + throw new Error(`download ${fileUrl} failed`); + } + + await decompress(tempFile, tempPackageDir); + + if (!fs.existsSync(tempPackageDir)) { + await fs.remove(tempFile); + throw new Error(`File is not a valid compressed file. Maybe the file need authorization.`); + } + + let tempPackageContentDir = tempPackageDir; + const files = fs + .readdirSync(tempPackageDir, { recursive: false, withFileTypes: true }) + .filter((item) => item.name !== '__MACOSX'); + if ( + files.length === 1 && + files[0].isDirectory() && + fs.existsSync(path.join(tempPackageDir, files[0]['name'], 'package.json')) + ) { + tempPackageContentDir = path.join(tempPackageDir, files[0]['name']); + } + const packageJsonPath = path.join(tempPackageContentDir, 'package.json'); + + if (!fs.existsSync(packageJsonPath)) { + await removeTmpDir(tempFile, tempPackageContentDir); + throw new Error(`decompress ${fileUrl} failed`); + } + + const packageJson = requireNoCache(packageJsonPath); + const mainFile = path.join(tempPackageContentDir, packageJson.main); + if (!fs.existsSync(mainFile)) { + await removeTmpDir(tempFile, tempPackageContentDir); + throw new Error(`main file ${packageJson.main} not found, Please check if the plugin has been built.`); + } + + return { + packageName: packageJson.name, + version: packageJson.version, + tempPackageContentDir, + tempFile, + }; +} + +export async function copyTempPackageToStorageAndLinkToNodeModules( + tempFile: string, + tempPackageContentDir: string, + packageName: string, +) { + const packageDir = getStoragePluginDir(packageName); + + // move to plugin storage dir + await fs.remove(packageDir); + await fs.move(tempPackageContentDir, packageDir, { overwrite: true }); + + // symlink to node_modules + await createStoragePluginSymLink(packageName); + + // remove temp dir + await removeTmpDir(tempFile, tempPackageContentDir); + + return { + packageDir, + }; +} + +/** + * get package info from npm + * + * @example + * getPluginInfoByNpm('dayjs', 'https://registry.npmjs.org') + * => { fileUrl: 'https://registry.npmjs.org/dayjs/-/dayjs-1.10.6.tgz', latestVersion: '1.10.6' } + * + * getPluginInfoByNpm('dayjs', 'https://registry.npmjs.org', '1.1.0') + * => { fileUrl: 'https://registry.npmjs.org/dayjs/-/dayjs-1.1.0.tgz', latestVersion: '1.1.0' } + */ + +interface GetPluginInfoOptions { + packageName: string; + registry: string; + version?: string; + authToken?: string; +} + +export async function getPluginInfoByNpm(options: GetPluginInfoOptions) { + let { registry, version } = options; + const { packageName, authToken } = options; + if (registry.endsWith('/')) { + registry = registry.slice(0, -1); + } + if (!version) { + version = await getLatestVersion(packageName, registry, authToken); + } + + const compressedFileUrl = `${registry}/${packageName}/-/${packageName.split('/').pop()}-${version}.tgz`; + + return { compressedFileUrl, version }; +} + +/** + * scan `src/server` directory to get server packages + * + * @example + * getServerPackages('src/server') => ['dayjs', '@nocobase/plugin-bbb'] + */ +export function getServerPackages(packageDir: string) { + function isBuiltinModule(packageName: string) { + return builtinModules.includes(packageName); + } + + function getSrcPlugins(sourceDir: string): string[] { + const importedPlugins = new Set(); + const exts = ['.js', '.ts', '.jsx', '.tsx']; + const importRegex = /import\s+.*?\s+from\s+['"]([^'"\s.].+?)['"];?/g; + const requireRegex = /require\s*\(\s*[`'"]([^`'"\s.].+?)[`'"]\s*\)/g; + function setPluginsFromContent(reg: RegExp, content: string) { + let match: RegExpExecArray | null; + while ((match = reg.exec(content))) { + let importedPlugin = match[1]; + if (importedPlugin.startsWith('@')) { + // @aa/bb/ccFile => @aa/bb + importedPlugin = importedPlugin.split('/').slice(0, 2).join('/'); + } else { + // aa/bbFile => aa + importedPlugin = importedPlugin.split('/')[0]; + } + + if (!isBuiltinModule(importedPlugin)) { + importedPlugins.add(importedPlugin); + } + } + } + + function traverseDirectory(directory: string) { + const files = fs.readdirSync(directory); + + for (const file of files) { + const filePath = path.join(directory, file); + const stat = fs.statSync(filePath); + + if (stat.isDirectory()) { + // recursive + traverseDirectory(filePath); + } else if (stat.isFile() && !filePath.includes('__tests__')) { + if (exts.includes(path.extname(filePath).toLowerCase())) { + const content = fs.readFileSync(filePath, 'utf-8'); + + setPluginsFromContent(importRegex, content); + setPluginsFromContent(requireRegex, content); + } + } + } + } + + traverseDirectory(sourceDir); + + return [...importedPlugins]; + } + + const srcServerPlugins = getSrcPlugins(path.join(packageDir, 'src/server')); + return srcServerPlugins; +} + +export function removePluginPackage(packageName: string) { + const packageDir = getStoragePluginDir(packageName); + const nodeModulesPluginDir = getNodeModulesPluginDir(packageName); + return Promise.all([fs.remove(packageDir), fs.remove(nodeModulesPluginDir)]); +} + +/** + * get package.json + * + * @example + * getPackageJson('dayjs') => { name: 'dayjs', version: '1.0.0', ... } + */ +export function getPackageJson(pluginName: string) { + const packageDir = getStoragePluginDir(pluginName); + return getPackageJsonByLocalPath(packageDir); +} + +export function getPackageJsonByLocalPath(localPath: string) { + if (!fs.existsSync(localPath)) { + return null; + } else { + return requireNoCache(path.join(localPath, 'package.json')); + } +} + +export async function updatePluginByCompressedFileUrl( + options: Partial>, +) { + const { packageName, version, tempFile, tempPackageContentDir } = await downloadAndUnzipToTempDir( + options.compressedFileUrl, + options.authToken, + ); + + if (options.packageName && options.packageName !== packageName) { + await removeTmpDir(tempFile, tempPackageContentDir); + throw new Error(`Plugin name in package.json must be ${options.packageName}, but got ${packageName}`); + } + + const { packageDir } = await copyTempPackageToStorageAndLinkToNodeModules( + tempFile, + tempPackageContentDir, + packageName, + ); + + return { + packageName, + packageDir, + version, + }; +} + +export async function getNewVersion(plugin: PluginData): Promise { + if (!(plugin.packageName && plugin.registry)) return false; + + // 1. Check plugin version by npm registry + const { version } = await getPluginInfoByNpm({ + packageName: plugin.packageName, + registry: plugin.registry, + authToken: plugin.authToken, + }); + // 2. has new version, return true + return version !== plugin.version ? version : false; +} + +export function removeRequireCache(fileOrPackageName: string) { + delete require.cache[require.resolve(fileOrPackageName)]; + delete require.cache[fileOrPackageName]; +} + +export function requireNoCache(fileOrPackageName: string) { + removeRequireCache(fileOrPackageName); + return require(fileOrPackageName); +} + +export function requireModule(m: any) { + if (typeof m === 'string') { + m = require(m); + } + if (typeof m !== 'object') { + return m; + } + return m.__esModule ? m.default : m; +} + +function getExternalVersionFromDistFile(packageName: string): false | Record { + const { exists, filePath } = getPackageFilePathWithExistCheck(packageName, 'dist/externalVersion.js'); + if (!exists) { + return false; + } + + try { + return requireNoCache(filePath); + } catch (e) { + console.error(e); + return false; + } +} +export function isNotBuiltinModule(packageName: string) { + return !builtinModules.includes(packageName); +} + +export const isValidPackageName = (str: string) => { + const pattern = /^(?:@[a-zA-Z0-9_-]+\/)?[a-zA-Z0-9_-]+$/; + return pattern.test(str); +}; + +export function getPackageNameFromString(str: string) { + // ./xx or ../xx + if (str.startsWith('.')) return null; + + const arr = str.split('/'); + let packageName: string; + if (arr[0].startsWith('@')) { + // @aa/bb/ccFile => @aa/bb + packageName = arr.slice(0, 2).join('/'); + } else { + // aa/bbFile => aa + packageName = arr[0]; + } + + packageName = packageName.trim(); + + return isValidPackageName(packageName) ? packageName : null; +} + +export function getPackagesFromFiles(files: string[]): string[] { + const packageNames = files + .map((item) => [ + ...[...item.matchAll(importRegex)].map((item) => item[2]), + ...[...item.matchAll(requireRegex)].map((item) => item[1]), + ]) + .flat() + .map(getPackageNameFromString) + .filter(Boolean) + .filter(isNotBuiltinModule); + + return [...new Set(packageNames)]; +} + +export function getIncludePackages(sourcePackages: string[], external: string[], pluginPrefix: string[]): string[] { + return sourcePackages + .filter((packageName) => !external.includes(packageName)) // exclude external + .filter((packageName) => !pluginPrefix.some((prefix) => packageName.startsWith(prefix))); // exclude other plugin +} + +export function getExcludePackages(sourcePackages: string[], external: string[], pluginPrefix: string[]): string[] { + const includePackages = getIncludePackages(sourcePackages, external, pluginPrefix); + return sourcePackages.filter((packageName) => !includePackages.includes(packageName)); +} + +export async function getExternalVersionFromSource(packageName: string) { + const packageDir = getPackageDir(packageName); + const sourceGlobalFiles: string[] = ['src/**/*.{ts,js,tsx,jsx}', '!src/**/__tests__']; + const sourceFilePaths = await fg.glob(sourceGlobalFiles, { cwd: packageDir, absolute: true }); + const sourceFiles = await Promise.all(sourceFilePaths.map((item) => fs.readFile(item, 'utf-8'))); + const sourcePackages = getPackagesFromFiles(sourceFiles); + const excludePackages = getExcludePackages(sourcePackages, EXTERNAL, pluginPrefix); + const data = excludePackages.reduce>((prev, packageName) => { + const depPkgPath = getDepPkgPath(packageName, packageDir); + const depPkg = require(depPkgPath); + prev[packageName] = depPkg.version; + return prev; + }, {}); + return data; +} + +export interface DepCompatible { + name: string; + result: boolean; + versionRange: string; + packageVersion: string; +} +export async function getCompatible(packageName: string) { + let externalVersion: Record; + if (!process.env.IS_DEV_CMD) { + const res = getExternalVersionFromDistFile(packageName); + if (!res) { + return false; + } else { + externalVersion = res; + } + } else { + externalVersion = await getExternalVersionFromSource(packageName); + } + + return Object.keys(externalVersion).reduce((result, packageName) => { + const packageVersion = externalVersion[packageName]; + const globalPackageName = deps[packageName] + ? packageName + : deps[packageName.split('/')[0]] // @nocobase and @formily + ? packageName.split('/')[0] + : undefined; + + if (globalPackageName) { + const versionRange = deps[globalPackageName]; + result.push({ + name: packageName, + result: semver.satisfies(packageVersion, versionRange, { includePrerelease: true }), + versionRange, + packageVersion, + }); + } + return result; + }, []); +} + +export async function checkCompatible(packageName: string) { + const compatible = await getCompatible(packageName); + if (!compatible) return false; + return compatible.every((item) => item.result); +} + +export async function checkAndGetCompatible(packageName: string) { + const compatible = await getCompatible(packageName); + if (!compatible) { + return { + isCompatible: false, + depsCompatible: [], + }; + } + return { + isCompatible: compatible.every((item) => item.result), + depsCompatible: compatible, + }; +} diff --git a/packages/core/server/src/plugin.ts b/packages/core/server/src/plugin.ts index 51aabf19d..9eb472036 100644 --- a/packages/core/server/src/plugin.ts +++ b/packages/core/server/src/plugin.ts @@ -1,6 +1,9 @@ import { Model } from '@nocobase/database'; +import fs from 'fs'; +import { resolve } from 'path'; import { Application } from './application'; -import { InstallOptions } from './plugin-manager'; +import { InstallOptions, getExposeChangelogUrl, getExposeReadmeUrl } from './plugin-manager'; +import { checkAndGetCompatible } from './plugin-manager/utils'; export interface PluginInterface { beforeLoad?: () => void; @@ -104,6 +107,30 @@ export abstract class Plugin implements PluginInterface { requiredPlugins() { return []; } + + async toJSON(options: any = {}) { + const { locale = 'en-US' } = options; + const { packageName, packageJson } = this.options; + if (!packageName) { + return { + ...this.options, + }; + } + const file = await fs.promises.realpath(resolve(process.env.NODE_MODULES_PATH, packageName)); + const lastUpdated = (await fs.promises.stat(file)).ctime; + const others = await checkAndGetCompatible(packageName); + return { + ...this.options, + ...others, + readmeUrl: getExposeReadmeUrl(packageName, locale), + changelogUrl: getExposeChangelogUrl(packageName), + lastUpdated, + file, + updatable: file.startsWith(process.env.PLUGIN_STORAGE_PATH), + displayName: packageJson[`displayName.${locale}`] || packageJson.displayName, + description: packageJson[`description.${locale}`] || packageJson.description, + }; + } } export default Plugin; diff --git a/packages/core/utils/plugin-symlink.d.ts b/packages/core/utils/plugin-symlink.d.ts new file mode 100644 index 000000000..fb53fddae --- /dev/null +++ b/packages/core/utils/plugin-symlink.d.ts @@ -0,0 +1,5 @@ +export declare function getStoragePluginNames(target: any): Promise; +export declare function fsExists(path: any): Promise; +export declare function createStoragePluginSymLink(pluginName: any): Promise; +export declare function createStoragePluginsSymlink(): Promise; +export declare function createDevPluginSymLink(pluginName: any): Promise; diff --git a/packages/core/utils/plugin-symlink.js b/packages/core/utils/plugin-symlink.js new file mode 100644 index 000000000..a28970586 --- /dev/null +++ b/packages/core/utils/plugin-symlink.js @@ -0,0 +1,87 @@ +const { dirname, resolve } = require('path'); +const { readFile, writeFile, readdir, symlink, unlink, mkdir, stat } = require('fs').promises; + +async function getStoragePluginNames(target) { + const plugins = []; + const items = await readdir(target); + for (const item of items) { + if (item.startsWith('@')) { + const children = await getStoragePluginNames(resolve(target, item)); + plugins.push( + ...children.map((child) => { + return `${item}/${child}`; + }), + ); + } else if (await fsExists(resolve(target, item, 'package.json'))) { + plugins.push(item); + } + } + return plugins; +} + +async function fsExists(path) { + try { + await stat(path); + return true; + } catch (error) { + return false; + } +} + +exports.fsExists = fsExists; + +async function createStoragePluginSymLink(pluginName) { + const storagePluginsPath = resolve(process.cwd(), 'storage/plugins'); + const nodeModulesPath = process.env.NODE_MODULES_PATH; // resolve(dirname(require.resolve('@nocobase/server/package.json')), 'node_modules'); + // const nodeModulesPath = resolve(process.cwd(), 'node_modules'); + try { + if (pluginName.startsWith('@')) { + const [orgName] = pluginName.split('/'); + if (!(await fsExists(resolve(nodeModulesPath, orgName)))) { + await mkdir(resolve(nodeModulesPath, orgName), { recursive: true }); + } + } + const link = resolve(nodeModulesPath, pluginName); + if (await fsExists(link)) { + await unlink(link); + } + await symlink(resolve(storagePluginsPath, pluginName), link); + } catch (error) { + console.error(error); + } +} + +exports.createStoragePluginSymLink = createStoragePluginSymLink; + +async function createStoragePluginsSymlink() { + const storagePluginsPath = resolve(process.cwd(), 'storage/plugins'); + if (!(await fsExists(storagePluginsPath))) { + return; + } + const pluginNames = await getStoragePluginNames(storagePluginsPath); + await Promise.all(pluginNames.map((pluginName) => createStoragePluginSymLink(pluginName))); +} + +exports.createStoragePluginsSymlink = createStoragePluginsSymlink; + +async function createDevPluginSymLink(pluginName) { + const packagePluginsPath = resolve(process.cwd(), 'packages/plugins'); + const nodeModulesPath = process.env.NODE_MODULES_PATH; // resolve(dirname(require.resolve('@nocobase/server/package.json')), 'node_modules'); + try { + if (pluginName.startsWith('@')) { + const [orgName] = pluginName.split('/'); + if (!(await fsExists(resolve(nodeModulesPath, orgName)))) { + await mkdir(resolve(nodeModulesPath, orgName), { recursive: true }); + } + } + const link = resolve(nodeModulesPath, pluginName); + if (await fsExists(link)) { + await unlink(link); + } + await symlink(resolve(packagePluginsPath, pluginName), link); + } catch (error) { + console.error(error); + } +} + +exports.createDevPluginSymLink = createDevPluginSymLink; diff --git a/packages/core/utils/src/index.ts b/packages/core/utils/src/index.ts index bc35655d8..f7b6ec638 100644 --- a/packages/core/utils/src/index.ts +++ b/packages/core/utils/src/index.ts @@ -19,4 +19,6 @@ export * from './registry'; export * from './requireModule'; export * from './toposort'; export * from './uid'; +export * from './url'; + export { dayjs, lodash }; diff --git a/packages/core/utils/src/server.ts b/packages/core/utils/src/server.ts index 6a7df7e8b..d1ed990d2 100644 --- a/packages/core/utils/src/server.ts +++ b/packages/core/utils/src/server.ts @@ -7,3 +7,4 @@ export * from './registry'; export * from './requireModule'; export * from './toposort'; export * from './uid'; +export * from './url'; diff --git a/packages/plugins/acl/.npmignore b/packages/plugins/@nocobase/plugin-acl/.npmignore similarity index 100% rename from packages/plugins/acl/.npmignore rename to packages/plugins/@nocobase/plugin-acl/.npmignore diff --git a/packages/plugins/acl/LICENSE b/packages/plugins/@nocobase/plugin-acl/LICENSE similarity index 100% rename from packages/plugins/acl/LICENSE rename to packages/plugins/@nocobase/plugin-acl/LICENSE diff --git a/packages/plugins/acl/README.md b/packages/plugins/@nocobase/plugin-acl/README.md similarity index 100% rename from packages/plugins/acl/README.md rename to packages/plugins/@nocobase/plugin-acl/README.md diff --git a/packages/plugins/acl/README.zh-CN.md b/packages/plugins/@nocobase/plugin-acl/README.zh-CN.md similarity index 100% rename from packages/plugins/acl/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-acl/README.zh-CN.md diff --git a/packages/plugins/acl/client.d.ts b/packages/plugins/@nocobase/plugin-acl/client.d.ts similarity index 100% rename from packages/plugins/acl/client.d.ts rename to packages/plugins/@nocobase/plugin-acl/client.d.ts diff --git a/packages/plugins/acl/client.js b/packages/plugins/@nocobase/plugin-acl/client.js similarity index 100% rename from packages/plugins/acl/client.js rename to packages/plugins/@nocobase/plugin-acl/client.js diff --git a/packages/plugins/acl/package.json b/packages/plugins/@nocobase/plugin-acl/package.json similarity index 100% rename from packages/plugins/acl/package.json rename to packages/plugins/@nocobase/plugin-acl/package.json diff --git a/packages/plugins/acl/server.d.ts b/packages/plugins/@nocobase/plugin-acl/server.d.ts similarity index 100% rename from packages/plugins/acl/server.d.ts rename to packages/plugins/@nocobase/plugin-acl/server.d.ts diff --git a/packages/plugins/acl/server.js b/packages/plugins/@nocobase/plugin-acl/server.js similarity index 100% rename from packages/plugins/acl/server.js rename to packages/plugins/@nocobase/plugin-acl/server.js diff --git a/packages/plugins/acl/src/client/index.ts b/packages/plugins/@nocobase/plugin-acl/src/client/index.ts similarity index 100% rename from packages/plugins/acl/src/client/index.ts rename to packages/plugins/@nocobase/plugin-acl/src/client/index.ts diff --git a/packages/plugins/acl/src/index.ts b/packages/plugins/@nocobase/plugin-acl/src/index.ts similarity index 100% rename from packages/plugins/acl/src/index.ts rename to packages/plugins/@nocobase/plugin-acl/src/index.ts diff --git a/packages/plugins/acl/src/server/__tests__/acl.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/acl.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/acl.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/acl.test.ts diff --git a/packages/plugins/acl/src/server/__tests__/actions.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/actions.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/actions.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/actions.test.ts diff --git a/packages/plugins/acl/src/server/__tests__/association-field.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/association-field.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/association-field.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/association-field.test.ts diff --git a/packages/plugins/acl/src/server/__tests__/configuration.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/configuration.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/configuration.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/configuration.test.ts diff --git a/packages/plugins/acl/src/server/__tests__/list-action.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/list-action.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/list-action.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/list-action.test.ts diff --git a/packages/plugins/acl/src/server/__tests__/middleware.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/middleware.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/middleware.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/middleware.test.ts diff --git a/packages/plugins/acl/src/server/__tests__/own.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/own.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/own.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/own.test.ts diff --git a/packages/plugins/acl/src/server/__tests__/prepare.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/prepare.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/prepare.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/prepare.ts diff --git a/packages/plugins/acl/src/server/__tests__/role-check.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-check.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/role-check.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-check.test.ts diff --git a/packages/plugins/acl/src/server/__tests__/role-resource.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-resource.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/role-resource.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-resource.test.ts diff --git a/packages/plugins/acl/src/server/__tests__/role-user.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-user.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/role-user.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role-user.test.ts diff --git a/packages/plugins/acl/src/server/__tests__/role.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/role.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/role.test.ts diff --git a/packages/plugins/acl/src/server/__tests__/scope.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/scope.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/scope.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/scope.test.ts diff --git a/packages/plugins/acl/src/server/__tests__/setCurrentRole.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/setCurrentRole.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/setCurrentRole.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/setCurrentRole.test.ts diff --git a/packages/plugins/acl/src/server/__tests__/snippets.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/snippets.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/snippets.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/snippets.test.ts diff --git a/packages/plugins/acl/src/server/__tests__/users.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/users.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/users.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/users.test.ts diff --git a/packages/plugins/acl/src/server/__tests__/write-role-to-acl.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/write-role-to-acl.test.ts similarity index 100% rename from packages/plugins/acl/src/server/__tests__/write-role-to-acl.test.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/__tests__/write-role-to-acl.test.ts diff --git a/packages/plugins/acl/src/server/actions/available-actions.ts b/packages/plugins/@nocobase/plugin-acl/src/server/actions/available-actions.ts similarity index 100% rename from packages/plugins/acl/src/server/actions/available-actions.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/actions/available-actions.ts diff --git a/packages/plugins/acl/src/server/actions/role-check.ts b/packages/plugins/@nocobase/plugin-acl/src/server/actions/role-check.ts similarity index 100% rename from packages/plugins/acl/src/server/actions/role-check.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/actions/role-check.ts diff --git a/packages/plugins/acl/src/server/actions/role-collections.ts b/packages/plugins/@nocobase/plugin-acl/src/server/actions/role-collections.ts similarity index 100% rename from packages/plugins/acl/src/server/actions/role-collections.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/actions/role-collections.ts diff --git a/packages/plugins/acl/src/server/actions/user-setDefaultRole.ts b/packages/plugins/@nocobase/plugin-acl/src/server/actions/user-setDefaultRole.ts similarity index 100% rename from packages/plugins/acl/src/server/actions/user-setDefaultRole.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/actions/user-setDefaultRole.ts diff --git a/packages/plugins/acl/src/server/collections/roles-users.ts b/packages/plugins/@nocobase/plugin-acl/src/server/collections/roles-users.ts similarity index 100% rename from packages/plugins/acl/src/server/collections/roles-users.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/collections/roles-users.ts diff --git a/packages/plugins/acl/src/server/collections/roles.ts b/packages/plugins/@nocobase/plugin-acl/src/server/collections/roles.ts similarity index 100% rename from packages/plugins/acl/src/server/collections/roles.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/collections/roles.ts diff --git a/packages/plugins/acl/src/server/collections/rolesResources.ts b/packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResources.ts similarity index 100% rename from packages/plugins/acl/src/server/collections/rolesResources.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResources.ts diff --git a/packages/plugins/acl/src/server/collections/rolesResourcesActions.ts b/packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResourcesActions.ts similarity index 100% rename from packages/plugins/acl/src/server/collections/rolesResourcesActions.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResourcesActions.ts diff --git a/packages/plugins/acl/src/server/collections/rolesResourcesScopes.ts b/packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResourcesScopes.ts similarity index 100% rename from packages/plugins/acl/src/server/collections/rolesResourcesScopes.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/collections/rolesResourcesScopes.ts diff --git a/packages/plugins/acl/src/server/collections/users.ts b/packages/plugins/@nocobase/plugin-acl/src/server/collections/users.ts similarity index 100% rename from packages/plugins/acl/src/server/collections/users.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/collections/users.ts diff --git a/packages/plugins/acl/src/server/index.ts b/packages/plugins/@nocobase/plugin-acl/src/server/index.ts similarity index 100% rename from packages/plugins/acl/src/server/index.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/index.ts diff --git a/packages/plugins/acl/src/server/middlewares/setCurrentRole.ts b/packages/plugins/@nocobase/plugin-acl/src/server/middlewares/setCurrentRole.ts similarity index 100% rename from packages/plugins/acl/src/server/middlewares/setCurrentRole.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/middlewares/setCurrentRole.ts diff --git a/packages/plugins/acl/src/server/migrations/20221214072638-set-role-snippets.ts b/packages/plugins/@nocobase/plugin-acl/src/server/migrations/20221214072638-set-role-snippets.ts similarity index 100% rename from packages/plugins/acl/src/server/migrations/20221214072638-set-role-snippets.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/migrations/20221214072638-set-role-snippets.ts diff --git a/packages/plugins/acl/src/server/model/RoleModel.ts b/packages/plugins/@nocobase/plugin-acl/src/server/model/RoleModel.ts similarity index 100% rename from packages/plugins/acl/src/server/model/RoleModel.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/model/RoleModel.ts diff --git a/packages/plugins/acl/src/server/model/RoleResourceActionModel.ts b/packages/plugins/@nocobase/plugin-acl/src/server/model/RoleResourceActionModel.ts similarity index 100% rename from packages/plugins/acl/src/server/model/RoleResourceActionModel.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/model/RoleResourceActionModel.ts diff --git a/packages/plugins/acl/src/server/model/RoleResourceModel.ts b/packages/plugins/@nocobase/plugin-acl/src/server/model/RoleResourceModel.ts similarity index 100% rename from packages/plugins/acl/src/server/model/RoleResourceModel.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/model/RoleResourceModel.ts diff --git a/packages/plugins/acl/src/server/server.ts b/packages/plugins/@nocobase/plugin-acl/src/server/server.ts similarity index 100% rename from packages/plugins/acl/src/server/server.ts rename to packages/plugins/@nocobase/plugin-acl/src/server/server.ts index df2e8ec13..e9e522cb2 100644 --- a/packages/plugins/acl/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/server.ts @@ -2,6 +2,7 @@ import { NoPermissionError } from '@nocobase/acl'; import { Context, utils as actionUtils } from '@nocobase/actions'; import { Collection, RelationField, snakeCase } from '@nocobase/database'; import { Plugin } from '@nocobase/server'; +import { Mutex } from 'async-mutex'; import lodash from 'lodash'; import { resolve } from 'path'; import { availableActionResource } from './actions/available-actions'; @@ -12,7 +13,6 @@ import { setCurrentRole } from './middlewares/setCurrentRole'; import { RoleModel } from './model/RoleModel'; import { RoleResourceActionModel } from './model/RoleResourceActionModel'; import { RoleResourceModel } from './model/RoleResourceModel'; -import { Mutex } from 'async-mutex'; export interface AssociationFieldAction { associationActions: string[]; diff --git a/packages/plugins/acl/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-acl/src/swagger/index.ts similarity index 100% rename from packages/plugins/acl/src/swagger/index.ts rename to packages/plugins/@nocobase/plugin-acl/src/swagger/index.ts diff --git a/packages/plugins/api-doc/.npmignore b/packages/plugins/@nocobase/plugin-api-doc/.npmignore similarity index 100% rename from packages/plugins/api-doc/.npmignore rename to packages/plugins/@nocobase/plugin-api-doc/.npmignore diff --git a/packages/plugins/api-doc/LICENSE b/packages/plugins/@nocobase/plugin-api-doc/LICENSE similarity index 100% rename from packages/plugins/api-doc/LICENSE rename to packages/plugins/@nocobase/plugin-api-doc/LICENSE diff --git a/packages/plugins/api-doc/README.md b/packages/plugins/@nocobase/plugin-api-doc/README.md similarity index 100% rename from packages/plugins/api-doc/README.md rename to packages/plugins/@nocobase/plugin-api-doc/README.md diff --git a/packages/plugins/api-doc/README.zh-CN.md b/packages/plugins/@nocobase/plugin-api-doc/README.zh-CN.md similarity index 100% rename from packages/plugins/api-doc/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-api-doc/README.zh-CN.md diff --git a/packages/plugins/api-doc/client.d.ts b/packages/plugins/@nocobase/plugin-api-doc/client.d.ts similarity index 100% rename from packages/plugins/api-doc/client.d.ts rename to packages/plugins/@nocobase/plugin-api-doc/client.d.ts diff --git a/packages/plugins/api-doc/client.js b/packages/plugins/@nocobase/plugin-api-doc/client.js similarity index 100% rename from packages/plugins/api-doc/client.js rename to packages/plugins/@nocobase/plugin-api-doc/client.js diff --git a/packages/plugins/api-doc/package.json b/packages/plugins/@nocobase/plugin-api-doc/package.json similarity index 79% rename from packages/plugins/api-doc/package.json rename to packages/plugins/@nocobase/plugin-api-doc/package.json index f28548375..6b18dfdfa 100644 --- a/packages/plugins/api-doc/package.json +++ b/packages/plugins/@nocobase/plugin-api-doc/package.json @@ -3,7 +3,8 @@ "version": "0.13.0-alpha.10", "displayName": "API documentation", "displayName.zh-CN": "API 文档", - "description": "", + "description": "An OpenAPI documentation generator for NocoBase HTTP API", + "description.zh-CN": "NocoBase HTTP API 的 OpenAPI 文档生成器", "license": "AGPL-3.0", "main": "./dist/server/index.js", "types": "./dist/server/index.d.ts", diff --git a/packages/plugins/api-doc/server.d.ts b/packages/plugins/@nocobase/plugin-api-doc/server.d.ts similarity index 100% rename from packages/plugins/api-doc/server.d.ts rename to packages/plugins/@nocobase/plugin-api-doc/server.d.ts diff --git a/packages/plugins/api-doc/server.js b/packages/plugins/@nocobase/plugin-api-doc/server.js similarity index 100% rename from packages/plugins/api-doc/server.js rename to packages/plugins/@nocobase/plugin-api-doc/server.js diff --git a/packages/plugins/api-doc/src/client/Document.tsx b/packages/plugins/@nocobase/plugin-api-doc/src/client/Document.tsx similarity index 100% rename from packages/plugins/api-doc/src/client/Document.tsx rename to packages/plugins/@nocobase/plugin-api-doc/src/client/Document.tsx diff --git a/packages/plugins/api-doc/src/client/index.tsx b/packages/plugins/@nocobase/plugin-api-doc/src/client/index.tsx similarity index 100% rename from packages/plugins/api-doc/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-api-doc/src/client/index.tsx diff --git a/packages/plugins/api-doc/src/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/index.ts similarity index 100% rename from packages/plugins/api-doc/src/index.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/index.ts diff --git a/packages/plugins/api-doc/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-api-doc/src/locale/en-US.ts similarity index 100% rename from packages/plugins/api-doc/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/locale/en-US.ts diff --git a/packages/plugins/api-doc/src/locale/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/locale/index.ts similarity index 100% rename from packages/plugins/api-doc/src/locale/index.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/locale/index.ts diff --git a/packages/plugins/api-doc/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-api-doc/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/api-doc/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/locale/zh-CN.ts diff --git a/packages/plugins/api-doc/src/server/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/index.ts similarity index 100% rename from packages/plugins/api-doc/src/server/index.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/index.ts diff --git a/packages/plugins/api-doc/src/server/server.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/server.ts similarity index 100% rename from packages/plugins/api-doc/src/server/server.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/server.ts diff --git a/packages/plugins/api-doc/src/server/swagger/base-swagger.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/base-swagger.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/base-swagger.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/base-swagger.ts diff --git a/packages/plugins/api-doc/src/server/swagger/collections/components/field-type-map.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/field-type-map.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/collections/components/field-type-map.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/field-type-map.ts diff --git a/packages/plugins/api-doc/src/server/swagger/collections/components/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/index.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/collections/components/index.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/index.ts diff --git a/packages/plugins/api-doc/src/server/swagger/collections/components/parameters.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/parameters.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/collections/components/parameters.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/parameters.ts diff --git a/packages/plugins/api-doc/src/server/swagger/collections/components/schemas.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/schemas.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/collections/components/schemas.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/components/schemas.ts diff --git a/packages/plugins/api-doc/src/server/swagger/collections/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/index.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/collections/index.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/index.ts diff --git a/packages/plugins/api-doc/src/server/swagger/collections/paths/associations/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/index.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/collections/paths/associations/index.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/index.ts diff --git a/packages/plugins/api-doc/src/server/swagger/collections/paths/associations/multiple-association.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/multiple-association.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/collections/paths/associations/multiple-association.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/multiple-association.ts diff --git a/packages/plugins/api-doc/src/server/swagger/collections/paths/associations/single-association.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/single-association.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/collections/paths/associations/single-association.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/associations/single-association.ts diff --git a/packages/plugins/api-doc/src/server/swagger/collections/paths/collection.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/collection.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/collections/paths/collection.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/collection.ts diff --git a/packages/plugins/api-doc/src/server/swagger/collections/paths/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/index.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/collections/paths/index.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/paths/index.ts diff --git a/packages/plugins/api-doc/src/server/swagger/collections/tags/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/tags/index.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/collections/tags/index.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/collections/tags/index.ts diff --git a/packages/plugins/api-doc/src/server/swagger/constants.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/constants.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/constants.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/constants.ts diff --git a/packages/plugins/api-doc/src/server/swagger/helpers.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/helpers.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/helpers.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/helpers.ts diff --git a/packages/plugins/api-doc/src/server/swagger/index.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/index.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/index.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/index.ts diff --git a/packages/plugins/api-doc/src/server/swagger/loader.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/loader.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/loader.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/loader.ts diff --git a/packages/plugins/api-doc/src/server/swagger/merge.ts b/packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/merge.ts similarity index 100% rename from packages/plugins/api-doc/src/server/swagger/merge.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/server/swagger/merge.ts diff --git a/packages/plugins/api-doc/src/swagger.ts b/packages/plugins/@nocobase/plugin-api-doc/src/swagger.ts similarity index 100% rename from packages/plugins/api-doc/src/swagger.ts rename to packages/plugins/@nocobase/plugin-api-doc/src/swagger.ts diff --git a/packages/plugins/api-keys/.npmignore b/packages/plugins/@nocobase/plugin-api-keys/.npmignore similarity index 100% rename from packages/plugins/api-keys/.npmignore rename to packages/plugins/@nocobase/plugin-api-keys/.npmignore diff --git a/packages/plugins/api-keys/README.md b/packages/plugins/@nocobase/plugin-api-keys/README.md similarity index 100% rename from packages/plugins/api-keys/README.md rename to packages/plugins/@nocobase/plugin-api-keys/README.md diff --git a/packages/plugins/api-keys/README.zh-CN.md b/packages/plugins/@nocobase/plugin-api-keys/README.zh-CN.md similarity index 100% rename from packages/plugins/api-keys/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-api-keys/README.zh-CN.md diff --git a/packages/plugins/data-visualization/client.d.ts b/packages/plugins/@nocobase/plugin-api-keys/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/data-visualization/client.d.ts rename to packages/plugins/@nocobase/plugin-api-keys/client.d.ts diff --git a/packages/plugins/auth/client.js b/packages/plugins/@nocobase/plugin-api-keys/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/auth/client.js rename to packages/plugins/@nocobase/plugin-api-keys/client.js diff --git a/packages/plugins/api-keys/docs/en-US/changelog.md b/packages/plugins/@nocobase/plugin-api-keys/docs/en-US/changelog.md similarity index 100% rename from packages/plugins/api-keys/docs/en-US/changelog.md rename to packages/plugins/@nocobase/plugin-api-keys/docs/en-US/changelog.md diff --git a/packages/plugins/api-keys/docs/en-US/index.md b/packages/plugins/@nocobase/plugin-api-keys/docs/en-US/index.md similarity index 100% rename from packages/plugins/api-keys/docs/en-US/index.md rename to packages/plugins/@nocobase/plugin-api-keys/docs/en-US/index.md diff --git a/packages/plugins/api-keys/docs/en-US/tabs.json b/packages/plugins/@nocobase/plugin-api-keys/docs/en-US/tabs.json similarity index 100% rename from packages/plugins/api-keys/docs/en-US/tabs.json rename to packages/plugins/@nocobase/plugin-api-keys/docs/en-US/tabs.json diff --git a/packages/plugins/api-keys/docs/en-US/usage.md b/packages/plugins/@nocobase/plugin-api-keys/docs/en-US/usage.md similarity index 100% rename from packages/plugins/api-keys/docs/en-US/usage.md rename to packages/plugins/@nocobase/plugin-api-keys/docs/en-US/usage.md diff --git a/packages/plugins/api-keys/docs/zh-CN/changelog.md b/packages/plugins/@nocobase/plugin-api-keys/docs/zh-CN/changelog.md similarity index 100% rename from packages/plugins/api-keys/docs/zh-CN/changelog.md rename to packages/plugins/@nocobase/plugin-api-keys/docs/zh-CN/changelog.md diff --git a/packages/plugins/api-keys/docs/zh-CN/index.md b/packages/plugins/@nocobase/plugin-api-keys/docs/zh-CN/index.md similarity index 100% rename from packages/plugins/api-keys/docs/zh-CN/index.md rename to packages/plugins/@nocobase/plugin-api-keys/docs/zh-CN/index.md diff --git a/packages/plugins/api-keys/docs/zh-CN/tabs.json b/packages/plugins/@nocobase/plugin-api-keys/docs/zh-CN/tabs.json similarity index 100% rename from packages/plugins/api-keys/docs/zh-CN/tabs.json rename to packages/plugins/@nocobase/plugin-api-keys/docs/zh-CN/tabs.json diff --git a/packages/plugins/api-keys/docs/zh-CN/usage.md b/packages/plugins/@nocobase/plugin-api-keys/docs/zh-CN/usage.md similarity index 100% rename from packages/plugins/api-keys/docs/zh-CN/usage.md rename to packages/plugins/@nocobase/plugin-api-keys/docs/zh-CN/usage.md diff --git a/packages/plugins/api-keys/package.json b/packages/plugins/@nocobase/plugin-api-keys/package.json similarity index 79% rename from packages/plugins/api-keys/package.json rename to packages/plugins/@nocobase/plugin-api-keys/package.json index 8d9ec8c71..253e2792b 100644 --- a/packages/plugins/api-keys/package.json +++ b/packages/plugins/@nocobase/plugin-api-keys/package.json @@ -1,9 +1,9 @@ { "name": "@nocobase/plugin-api-keys", "displayName": "API keys", - "displayName.zh-CN": "API 秘钥", - "description": "Allow users to use API key to access NocoBase server API", - "description.zh-CN": "允许用户使用 API key 访问 NocoBase server API", + "displayName.zh-CN": "API 密钥", + "description": "Allows users to use API key to access NocoBase HTTP API", + "description.zh-CN": "允许用户使用 API 密钥访问 NocoBase HTTP API", "version": "0.13.0-alpha.10", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/api-keys/server.d.ts b/packages/plugins/@nocobase/plugin-api-keys/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/api-keys/server.d.ts rename to packages/plugins/@nocobase/plugin-api-keys/server.d.ts diff --git a/packages/plugins/api-keys/server.js b/packages/plugins/@nocobase/plugin-api-keys/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/api-keys/server.js rename to packages/plugins/@nocobase/plugin-api-keys/server.js diff --git a/packages/plugins/api-keys/src/client/Configuration/ExpiresSelect.tsx b/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/ExpiresSelect.tsx similarity index 100% rename from packages/plugins/api-keys/src/client/Configuration/ExpiresSelect.tsx rename to packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/ExpiresSelect.tsx diff --git a/packages/plugins/api-keys/src/client/Configuration/index.tsx b/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/index.tsx similarity index 100% rename from packages/plugins/api-keys/src/client/Configuration/index.tsx rename to packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/index.tsx diff --git a/packages/plugins/api-keys/src/client/Configuration/roles.ts b/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/roles.ts similarity index 100% rename from packages/plugins/api-keys/src/client/Configuration/roles.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/roles.ts diff --git a/packages/plugins/api-keys/src/client/Configuration/schema.tsx b/packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/schema.tsx similarity index 100% rename from packages/plugins/api-keys/src/client/Configuration/schema.tsx rename to packages/plugins/@nocobase/plugin-api-keys/src/client/Configuration/schema.tsx diff --git a/packages/plugins/api-keys/src/client/index.tsx b/packages/plugins/@nocobase/plugin-api-keys/src/client/index.tsx similarity index 100% rename from packages/plugins/api-keys/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-api-keys/src/client/index.tsx diff --git a/packages/plugins/api-keys/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-api-keys/src/client/locale/index.ts similarity index 100% rename from packages/plugins/api-keys/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/client/locale/index.ts diff --git a/packages/plugins/api-keys/src/collections/api-keys.ts b/packages/plugins/@nocobase/plugin-api-keys/src/collections/api-keys.ts similarity index 100% rename from packages/plugins/api-keys/src/collections/api-keys.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/collections/api-keys.ts diff --git a/packages/plugins/api-keys/src/collections/index.ts b/packages/plugins/@nocobase/plugin-api-keys/src/collections/index.ts similarity index 100% rename from packages/plugins/api-keys/src/collections/index.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/collections/index.ts diff --git a/packages/plugins/api-keys/src/constants.ts b/packages/plugins/@nocobase/plugin-api-keys/src/constants.ts similarity index 100% rename from packages/plugins/api-keys/src/constants.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/constants.ts diff --git a/packages/plugins/api-keys/src/index.ts b/packages/plugins/@nocobase/plugin-api-keys/src/index.ts similarity index 100% rename from packages/plugins/api-keys/src/index.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/index.ts diff --git a/packages/plugins/api-keys/src/locale.ts b/packages/plugins/@nocobase/plugin-api-keys/src/locale.ts similarity index 100% rename from packages/plugins/api-keys/src/locale.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/locale.ts diff --git a/packages/plugins/api-keys/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-api-keys/src/locale/en-US.ts similarity index 100% rename from packages/plugins/api-keys/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/locale/en-US.ts diff --git a/packages/plugins/api-keys/src/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-api-keys/src/locale/fr-FR.ts similarity index 100% rename from packages/plugins/api-keys/src/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/locale/fr-FR.ts diff --git a/packages/plugins/api-keys/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-api-keys/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/api-keys/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/locale/zh-CN.ts diff --git a/packages/plugins/api-keys/src/server/__tests__/actions.test.ts b/packages/plugins/@nocobase/plugin-api-keys/src/server/__tests__/actions.test.ts similarity index 100% rename from packages/plugins/api-keys/src/server/__tests__/actions.test.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/server/__tests__/actions.test.ts diff --git a/packages/plugins/api-keys/src/server/actions/api-keys.ts b/packages/plugins/@nocobase/plugin-api-keys/src/server/actions/api-keys.ts similarity index 100% rename from packages/plugins/api-keys/src/server/actions/api-keys.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/server/actions/api-keys.ts diff --git a/packages/plugins/api-keys/src/server/index.ts b/packages/plugins/@nocobase/plugin-api-keys/src/server/index.ts similarity index 100% rename from packages/plugins/api-keys/src/server/index.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/server/index.ts diff --git a/packages/plugins/api-keys/src/server/locale/en-US.ts b/packages/plugins/@nocobase/plugin-api-keys/src/server/locale/en-US.ts similarity index 100% rename from packages/plugins/api-keys/src/server/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/server/locale/en-US.ts diff --git a/packages/plugins/api-keys/src/server/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-api-keys/src/server/locale/fr-FR.ts similarity index 100% rename from packages/plugins/api-keys/src/server/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/server/locale/fr-FR.ts diff --git a/packages/plugins/api-keys/src/server/locale/index.ts b/packages/plugins/@nocobase/plugin-api-keys/src/server/locale/index.ts similarity index 100% rename from packages/plugins/api-keys/src/server/locale/index.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/server/locale/index.ts diff --git a/packages/plugins/api-keys/src/server/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-api-keys/src/server/locale/zh-CN.ts similarity index 100% rename from packages/plugins/api-keys/src/server/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/server/locale/zh-CN.ts diff --git a/packages/plugins/api-keys/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-api-keys/src/server/plugin.ts similarity index 100% rename from packages/plugins/api-keys/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/server/plugin.ts diff --git a/packages/plugins/api-keys/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-api-keys/src/swagger/index.ts similarity index 100% rename from packages/plugins/api-keys/src/swagger/index.ts rename to packages/plugins/@nocobase/plugin-api-keys/src/swagger/index.ts diff --git a/packages/plugins/audit-logs/.npmignore b/packages/plugins/@nocobase/plugin-audit-logs/.npmignore similarity index 100% rename from packages/plugins/audit-logs/.npmignore rename to packages/plugins/@nocobase/plugin-audit-logs/.npmignore diff --git a/packages/plugins/audit-logs/LICENSE b/packages/plugins/@nocobase/plugin-audit-logs/LICENSE similarity index 100% rename from packages/plugins/audit-logs/LICENSE rename to packages/plugins/@nocobase/plugin-audit-logs/LICENSE diff --git a/packages/plugins/audit-logs/README.md b/packages/plugins/@nocobase/plugin-audit-logs/README.md similarity index 100% rename from packages/plugins/audit-logs/README.md rename to packages/plugins/@nocobase/plugin-audit-logs/README.md diff --git a/packages/plugins/audit-logs/README.zh-CN.md b/packages/plugins/@nocobase/plugin-audit-logs/README.zh-CN.md similarity index 100% rename from packages/plugins/audit-logs/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-audit-logs/README.zh-CN.md diff --git a/packages/plugins/audit-logs/client.d.ts b/packages/plugins/@nocobase/plugin-audit-logs/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/audit-logs/client.d.ts rename to packages/plugins/@nocobase/plugin-audit-logs/client.d.ts diff --git a/packages/plugins/audit-logs/client.js b/packages/plugins/@nocobase/plugin-audit-logs/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/audit-logs/client.js rename to packages/plugins/@nocobase/plugin-audit-logs/client.js diff --git a/packages/plugins/audit-logs/package.json b/packages/plugins/@nocobase/plugin-audit-logs/package.json similarity index 100% rename from packages/plugins/audit-logs/package.json rename to packages/plugins/@nocobase/plugin-audit-logs/package.json diff --git a/packages/plugins/audit-logs/server.d.ts b/packages/plugins/@nocobase/plugin-audit-logs/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/audit-logs/server.d.ts rename to packages/plugins/@nocobase/plugin-audit-logs/server.d.ts diff --git a/packages/plugins/audit-logs/server.js b/packages/plugins/@nocobase/plugin-audit-logs/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/audit-logs/server.js rename to packages/plugins/@nocobase/plugin-audit-logs/server.js diff --git a/packages/plugins/audit-logs/src/client/AuditLogsBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsBlockInitializer.tsx similarity index 100% rename from packages/plugins/audit-logs/src/client/AuditLogsBlockInitializer.tsx rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsBlockInitializer.tsx diff --git a/packages/plugins/audit-logs/src/client/AuditLogsBlockProvider.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsBlockProvider.tsx similarity index 100% rename from packages/plugins/audit-logs/src/client/AuditLogsBlockProvider.tsx rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsBlockProvider.tsx diff --git a/packages/plugins/audit-logs/src/client/AuditLogsProvider.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsProvider.tsx similarity index 100% rename from packages/plugins/audit-logs/src/client/AuditLogsProvider.tsx rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsProvider.tsx diff --git a/packages/plugins/audit-logs/src/client/collections.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/collections.tsx similarity index 100% rename from packages/plugins/audit-logs/src/client/collections.tsx rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/collections.tsx diff --git a/packages/plugins/audit-logs/src/client/components/AuditLogsField.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/components/AuditLogsField.tsx similarity index 100% rename from packages/plugins/audit-logs/src/client/components/AuditLogsField.tsx rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/components/AuditLogsField.tsx diff --git a/packages/plugins/audit-logs/src/client/components/AuditLogsValue.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/components/AuditLogsValue.tsx similarity index 100% rename from packages/plugins/audit-logs/src/client/components/AuditLogsValue.tsx rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/components/AuditLogsValue.tsx diff --git a/packages/plugins/audit-logs/src/client/components/AuditLogsViewActionInitializer.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/components/AuditLogsViewActionInitializer.tsx similarity index 100% rename from packages/plugins/audit-logs/src/client/components/AuditLogsViewActionInitializer.tsx rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/components/AuditLogsViewActionInitializer.tsx diff --git a/packages/plugins/audit-logs/src/client/deplicated/AuditLogs.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx similarity index 100% rename from packages/plugins/audit-logs/src/client/deplicated/AuditLogs.tsx rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx diff --git a/packages/plugins/audit-logs/src/client/deplicated/AuditLogsDesigner.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/deplicated/AuditLogsDesigner.tsx similarity index 100% rename from packages/plugins/audit-logs/src/client/deplicated/AuditLogsDesigner.tsx rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/deplicated/AuditLogsDesigner.tsx diff --git a/packages/plugins/audit-logs/src/client/index.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/client/index.ts similarity index 100% rename from packages/plugins/audit-logs/src/client/index.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/index.ts diff --git a/packages/plugins/audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializer.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializer.tsx similarity index 100% rename from packages/plugins/audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializer.tsx rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializer.tsx diff --git a/packages/plugins/audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializers.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializers.tsx similarity index 100% rename from packages/plugins/audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializers.tsx rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializers.tsx diff --git a/packages/plugins/audit-logs/src/client/initializers/AuditLogsTableActionInitializers.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionInitializers.tsx similarity index 99% rename from packages/plugins/audit-logs/src/client/initializers/AuditLogsTableActionInitializers.tsx rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionInitializers.tsx index f613ffd0b..bc7306e1c 100644 --- a/packages/plugins/audit-logs/src/client/initializers/AuditLogsTableActionInitializers.tsx +++ b/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionInitializers.tsx @@ -1,4 +1,3 @@ - // 操作记录表格操作配置 export const AuditLogsTableActionInitializers = { title: "{{t('Configure actions')}}", diff --git a/packages/plugins/audit-logs/src/client/initializers/AuditLogsTableColumnInitializers.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableColumnInitializers.tsx similarity index 100% rename from packages/plugins/audit-logs/src/client/initializers/AuditLogsTableColumnInitializers.tsx rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableColumnInitializers.tsx diff --git a/packages/plugins/audit-logs/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/client/locale/index.ts similarity index 100% rename from packages/plugins/audit-logs/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/locale/index.ts diff --git a/packages/plugins/audit-logs/src/client/utils.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/client/utils.ts similarity index 100% rename from packages/plugins/audit-logs/src/client/utils.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/client/utils.ts diff --git a/packages/plugins/audit-logs/src/index.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/index.ts similarity index 100% rename from packages/plugins/audit-logs/src/index.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/index.ts diff --git a/packages/plugins/audit-logs/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/locale/en-US.ts similarity index 100% rename from packages/plugins/audit-logs/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/locale/en-US.ts diff --git a/packages/plugins/audit-logs/src/locale/es-ES.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/locale/es-ES.ts similarity index 100% rename from packages/plugins/audit-logs/src/locale/es-ES.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/locale/es-ES.ts diff --git a/packages/plugins/audit-logs/src/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/locale/fr-FR.ts similarity index 100% rename from packages/plugins/audit-logs/src/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/locale/fr-FR.ts diff --git a/packages/plugins/audit-logs/src/locale/ja-JP.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/locale/ja-JP.ts similarity index 100% rename from packages/plugins/audit-logs/src/locale/ja-JP.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/locale/ja-JP.ts diff --git a/packages/plugins/audit-logs/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/audit-logs/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/locale/pt-BR.ts diff --git a/packages/plugins/audit-logs/src/locale/ru-RU.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/locale/ru-RU.ts similarity index 100% rename from packages/plugins/audit-logs/src/locale/ru-RU.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/locale/ru-RU.ts diff --git a/packages/plugins/audit-logs/src/locale/tr-TR.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/locale/tr-TR.ts similarity index 100% rename from packages/plugins/audit-logs/src/locale/tr-TR.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/locale/tr-TR.ts diff --git a/packages/plugins/audit-logs/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/audit-logs/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/locale/zh-CN.ts diff --git a/packages/plugins/audit-logs/src/server/__tests__/hook.test.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/__tests__/hook.test.ts similarity index 100% rename from packages/plugins/audit-logs/src/server/__tests__/hook.test.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/server/__tests__/hook.test.ts diff --git a/packages/plugins/audit-logs/src/server/collections/auditChanges.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/collections/auditChanges.ts similarity index 100% rename from packages/plugins/audit-logs/src/server/collections/auditChanges.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/server/collections/auditChanges.ts diff --git a/packages/plugins/audit-logs/src/server/collections/auditLogs.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/collections/auditLogs.ts similarity index 100% rename from packages/plugins/audit-logs/src/server/collections/auditLogs.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/server/collections/auditLogs.ts diff --git a/packages/plugins/audit-logs/src/server/constants.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/constants.ts similarity index 100% rename from packages/plugins/audit-logs/src/server/constants.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/server/constants.ts diff --git a/packages/plugins/audit-logs/src/server/hooks/after-create.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/after-create.ts similarity index 100% rename from packages/plugins/audit-logs/src/server/hooks/after-create.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/after-create.ts diff --git a/packages/plugins/audit-logs/src/server/hooks/after-destroy.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/after-destroy.ts similarity index 100% rename from packages/plugins/audit-logs/src/server/hooks/after-destroy.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/after-destroy.ts diff --git a/packages/plugins/audit-logs/src/server/hooks/after-update.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/after-update.ts similarity index 100% rename from packages/plugins/audit-logs/src/server/hooks/after-update.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/after-update.ts diff --git a/packages/plugins/audit-logs/src/server/hooks/index.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/index.ts similarity index 100% rename from packages/plugins/audit-logs/src/server/hooks/index.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/index.ts diff --git a/packages/plugins/audit-logs/src/server/index.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/index.ts similarity index 100% rename from packages/plugins/audit-logs/src/server/index.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/server/index.ts diff --git a/packages/plugins/audit-logs/src/server/migrations/202206160949-logging.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/migrations/202206160949-logging.ts similarity index 100% rename from packages/plugins/audit-logs/src/server/migrations/202206160949-logging.ts rename to packages/plugins/@nocobase/plugin-audit-logs/src/server/migrations/202206160949-logging.ts diff --git a/packages/plugins/auth/.npmignore b/packages/plugins/@nocobase/plugin-auth/.npmignore similarity index 100% rename from packages/plugins/auth/.npmignore rename to packages/plugins/@nocobase/plugin-auth/.npmignore diff --git a/packages/plugins/auth/README.md b/packages/plugins/@nocobase/plugin-auth/README.md similarity index 100% rename from packages/plugins/auth/README.md rename to packages/plugins/@nocobase/plugin-auth/README.md diff --git a/packages/plugins/auth/client.d.ts b/packages/plugins/@nocobase/plugin-auth/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/auth/client.d.ts rename to packages/plugins/@nocobase/plugin-auth/client.d.ts diff --git a/packages/plugins/data-visualization/client.js b/packages/plugins/@nocobase/plugin-auth/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/data-visualization/client.js rename to packages/plugins/@nocobase/plugin-auth/client.js diff --git a/packages/plugins/auth/package.json b/packages/plugins/@nocobase/plugin-auth/package.json similarity index 100% rename from packages/plugins/auth/package.json rename to packages/plugins/@nocobase/plugin-auth/package.json diff --git a/packages/plugins/auth/server.d.ts b/packages/plugins/@nocobase/plugin-auth/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/auth/server.d.ts rename to packages/plugins/@nocobase/plugin-auth/server.d.ts diff --git a/packages/plugins/auth/server.js b/packages/plugins/@nocobase/plugin-auth/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/auth/server.js rename to packages/plugins/@nocobase/plugin-auth/server.js diff --git a/packages/plugins/auth/src/client/AuthProvider.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/AuthProvider.tsx similarity index 100% rename from packages/plugins/auth/src/client/AuthProvider.tsx rename to packages/plugins/@nocobase/plugin-auth/src/client/AuthProvider.tsx diff --git a/packages/plugins/auth/src/client/basic/Options.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/basic/Options.tsx similarity index 100% rename from packages/plugins/auth/src/client/basic/Options.tsx rename to packages/plugins/@nocobase/plugin-auth/src/client/basic/Options.tsx diff --git a/packages/plugins/auth/src/client/basic/SigninPage.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/basic/SigninPage.tsx similarity index 100% rename from packages/plugins/auth/src/client/basic/SigninPage.tsx rename to packages/plugins/@nocobase/plugin-auth/src/client/basic/SigninPage.tsx diff --git a/packages/plugins/auth/src/client/basic/SignupPage.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/basic/SignupPage.tsx similarity index 100% rename from packages/plugins/auth/src/client/basic/SignupPage.tsx rename to packages/plugins/@nocobase/plugin-auth/src/client/basic/SignupPage.tsx diff --git a/packages/plugins/auth/src/client/index.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/index.tsx similarity index 100% rename from packages/plugins/auth/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-auth/src/client/index.tsx diff --git a/packages/plugins/auth/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-auth/src/client/locale/index.ts similarity index 100% rename from packages/plugins/auth/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-auth/src/client/locale/index.ts diff --git a/packages/plugins/auth/src/client/settings/Authenticator.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/settings/Authenticator.tsx similarity index 100% rename from packages/plugins/auth/src/client/settings/Authenticator.tsx rename to packages/plugins/@nocobase/plugin-auth/src/client/settings/Authenticator.tsx diff --git a/packages/plugins/auth/src/client/settings/Options.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/settings/Options.tsx similarity index 100% rename from packages/plugins/auth/src/client/settings/Options.tsx rename to packages/plugins/@nocobase/plugin-auth/src/client/settings/Options.tsx diff --git a/packages/plugins/auth/src/client/settings/authType.ts b/packages/plugins/@nocobase/plugin-auth/src/client/settings/authType.ts similarity index 100% rename from packages/plugins/auth/src/client/settings/authType.ts rename to packages/plugins/@nocobase/plugin-auth/src/client/settings/authType.ts diff --git a/packages/plugins/auth/src/client/settings/schemas/authenticators.ts b/packages/plugins/@nocobase/plugin-auth/src/client/settings/schemas/authenticators.ts similarity index 100% rename from packages/plugins/auth/src/client/settings/schemas/authenticators.ts rename to packages/plugins/@nocobase/plugin-auth/src/client/settings/schemas/authenticators.ts diff --git a/packages/plugins/auth/src/index.ts b/packages/plugins/@nocobase/plugin-auth/src/index.ts similarity index 100% rename from packages/plugins/auth/src/index.ts rename to packages/plugins/@nocobase/plugin-auth/src/index.ts diff --git a/packages/plugins/auth/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-auth/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/auth/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-auth/src/locale/zh-CN.ts diff --git a/packages/plugins/auth/src/preset.ts b/packages/plugins/@nocobase/plugin-auth/src/preset.ts similarity index 100% rename from packages/plugins/auth/src/preset.ts rename to packages/plugins/@nocobase/plugin-auth/src/preset.ts diff --git a/packages/plugins/auth/src/server/__tests__/actions.test.ts b/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/actions.test.ts similarity index 100% rename from packages/plugins/auth/src/server/__tests__/actions.test.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/__tests__/actions.test.ts diff --git a/packages/plugins/auth/src/server/__tests__/token-blacklist.test.ts b/packages/plugins/@nocobase/plugin-auth/src/server/__tests__/token-blacklist.test.ts similarity index 100% rename from packages/plugins/auth/src/server/__tests__/token-blacklist.test.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/__tests__/token-blacklist.test.ts diff --git a/packages/plugins/auth/src/server/actions/auth.ts b/packages/plugins/@nocobase/plugin-auth/src/server/actions/auth.ts similarity index 100% rename from packages/plugins/auth/src/server/actions/auth.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/actions/auth.ts diff --git a/packages/plugins/auth/src/server/actions/authenticators.ts b/packages/plugins/@nocobase/plugin-auth/src/server/actions/authenticators.ts similarity index 100% rename from packages/plugins/auth/src/server/actions/authenticators.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/actions/authenticators.ts diff --git a/packages/plugins/auth/src/server/basic-auth.ts b/packages/plugins/@nocobase/plugin-auth/src/server/basic-auth.ts similarity index 100% rename from packages/plugins/auth/src/server/basic-auth.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/basic-auth.ts diff --git a/packages/plugins/auth/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-auth/src/server/collections/.gitkeep similarity index 100% rename from packages/plugins/auth/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-auth/src/server/collections/.gitkeep diff --git a/packages/plugins/auth/src/server/collections/authenticators.ts b/packages/plugins/@nocobase/plugin-auth/src/server/collections/authenticators.ts similarity index 100% rename from packages/plugins/auth/src/server/collections/authenticators.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/collections/authenticators.ts diff --git a/packages/plugins/auth/src/server/collections/token-blacklist.ts b/packages/plugins/@nocobase/plugin-auth/src/server/collections/token-blacklist.ts similarity index 100% rename from packages/plugins/auth/src/server/collections/token-blacklist.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/collections/token-blacklist.ts diff --git a/packages/plugins/auth/src/server/collections/users-authenticators.ts b/packages/plugins/@nocobase/plugin-auth/src/server/collections/users-authenticators.ts similarity index 100% rename from packages/plugins/auth/src/server/collections/users-authenticators.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/collections/users-authenticators.ts diff --git a/packages/plugins/auth/src/server/index.ts b/packages/plugins/@nocobase/plugin-auth/src/server/index.ts similarity index 100% rename from packages/plugins/auth/src/server/index.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/index.ts diff --git a/packages/plugins/auth/src/server/locale/en-US.ts b/packages/plugins/@nocobase/plugin-auth/src/server/locale/en-US.ts similarity index 100% rename from packages/plugins/auth/src/server/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/locale/en-US.ts diff --git a/packages/plugins/auth/src/server/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-auth/src/server/locale/fr-FR.ts similarity index 100% rename from packages/plugins/auth/src/server/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/locale/fr-FR.ts diff --git a/packages/plugins/auth/src/server/locale/index.ts b/packages/plugins/@nocobase/plugin-auth/src/server/locale/index.ts similarity index 100% rename from packages/plugins/auth/src/server/locale/index.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/locale/index.ts diff --git a/packages/plugins/auth/src/server/locale/ja-JP.ts b/packages/plugins/@nocobase/plugin-auth/src/server/locale/ja-JP.ts similarity index 100% rename from packages/plugins/auth/src/server/locale/ja-JP.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/locale/ja-JP.ts diff --git a/packages/plugins/auth/src/server/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-auth/src/server/locale/pt-BR.ts similarity index 100% rename from packages/plugins/auth/src/server/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/locale/pt-BR.ts diff --git a/packages/plugins/auth/src/server/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-auth/src/server/locale/zh-CN.ts similarity index 100% rename from packages/plugins/auth/src/server/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/locale/zh-CN.ts diff --git a/packages/plugins/auth/src/server/migrations/20230506152253-basic-authenticator.ts b/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230506152253-basic-authenticator.ts similarity index 100% rename from packages/plugins/auth/src/server/migrations/20230506152253-basic-authenticator.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230506152253-basic-authenticator.ts diff --git a/packages/plugins/auth/src/server/migrations/20230607174500-update-basic.ts b/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230607174500-update-basic.ts similarity index 100% rename from packages/plugins/auth/src/server/migrations/20230607174500-update-basic.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230607174500-update-basic.ts diff --git a/packages/plugins/auth/src/server/model/authenticator.ts b/packages/plugins/@nocobase/plugin-auth/src/server/model/authenticator.ts similarity index 100% rename from packages/plugins/auth/src/server/model/authenticator.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/model/authenticator.ts diff --git a/packages/plugins/auth/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-auth/src/server/plugin.ts similarity index 100% rename from packages/plugins/auth/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/plugin.ts diff --git a/packages/plugins/auth/src/server/token-blacklist.ts b/packages/plugins/@nocobase/plugin-auth/src/server/token-blacklist.ts similarity index 100% rename from packages/plugins/auth/src/server/token-blacklist.ts rename to packages/plugins/@nocobase/plugin-auth/src/server/token-blacklist.ts diff --git a/packages/plugins/auth/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-auth/src/swagger/index.ts similarity index 100% rename from packages/plugins/auth/src/swagger/index.ts rename to packages/plugins/@nocobase/plugin-auth/src/swagger/index.ts diff --git a/packages/plugins/cas/README.md b/packages/plugins/@nocobase/plugin-cas/README.md similarity index 100% rename from packages/plugins/cas/README.md rename to packages/plugins/@nocobase/plugin-cas/README.md diff --git a/packages/plugins/cas/README.zh-CN.md b/packages/plugins/@nocobase/plugin-cas/README.zh-CN.md similarity index 100% rename from packages/plugins/cas/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-cas/README.zh-CN.md diff --git a/packages/plugins/cas/client.d.ts b/packages/plugins/@nocobase/plugin-cas/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/cas/client.d.ts rename to packages/plugins/@nocobase/plugin-cas/client.d.ts diff --git a/packages/plugins/cas/client.js b/packages/plugins/@nocobase/plugin-cas/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/cas/client.js rename to packages/plugins/@nocobase/plugin-cas/client.js diff --git a/packages/plugins/cas/package.json b/packages/plugins/@nocobase/plugin-cas/package.json similarity index 68% rename from packages/plugins/cas/package.json rename to packages/plugins/@nocobase/plugin-cas/package.json index ac0e8bb84..852ce00d5 100644 --- a/packages/plugins/cas/package.json +++ b/packages/plugins/@nocobase/plugin-cas/package.json @@ -1,9 +1,9 @@ { "name": "@nocobase/plugin-cas", - "displayName": "SSO login - CAS", - "displayName.zh-CN": "SSO 登录 - CAS", - "description": "Unified identity authentication.", - "description.zh-CN": "提供CAS登录功能", + "displayName": "CAS auth - SSO login", + "displayName.zh-CN": "CAS 认证 - SSO 登录", + "description": "CAS authentication for NocoBase", + "description.zh-CN": "NocoBase 的 CAS 身份验证", "version": "0.13.0-alpha.10", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/cas/server.d.ts b/packages/plugins/@nocobase/plugin-cas/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/cas/server.d.ts rename to packages/plugins/@nocobase/plugin-cas/server.d.ts diff --git a/packages/plugins/cas/server.js b/packages/plugins/@nocobase/plugin-cas/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/cas/server.js rename to packages/plugins/@nocobase/plugin-cas/server.js diff --git a/packages/plugins/cas/src/client/Options.tsx b/packages/plugins/@nocobase/plugin-cas/src/client/Options.tsx similarity index 100% rename from packages/plugins/cas/src/client/Options.tsx rename to packages/plugins/@nocobase/plugin-cas/src/client/Options.tsx diff --git a/packages/plugins/cas/src/client/SigninPage.tsx b/packages/plugins/@nocobase/plugin-cas/src/client/SigninPage.tsx similarity index 100% rename from packages/plugins/cas/src/client/SigninPage.tsx rename to packages/plugins/@nocobase/plugin-cas/src/client/SigninPage.tsx diff --git a/packages/plugins/cas/src/client/index.tsx b/packages/plugins/@nocobase/plugin-cas/src/client/index.tsx similarity index 100% rename from packages/plugins/cas/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-cas/src/client/index.tsx diff --git a/packages/plugins/cas/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-cas/src/client/locale/index.ts similarity index 100% rename from packages/plugins/cas/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-cas/src/client/locale/index.ts diff --git a/packages/plugins/cas/src/constants.ts b/packages/plugins/@nocobase/plugin-cas/src/constants.ts similarity index 100% rename from packages/plugins/cas/src/constants.ts rename to packages/plugins/@nocobase/plugin-cas/src/constants.ts diff --git a/packages/plugins/cas/src/index.ts b/packages/plugins/@nocobase/plugin-cas/src/index.ts similarity index 100% rename from packages/plugins/cas/src/index.ts rename to packages/plugins/@nocobase/plugin-cas/src/index.ts diff --git a/packages/plugins/cas/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-cas/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/cas/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-cas/src/locale/zh-CN.ts diff --git a/packages/plugins/cas/src/server/actions/login.ts b/packages/plugins/@nocobase/plugin-cas/src/server/actions/login.ts similarity index 100% rename from packages/plugins/cas/src/server/actions/login.ts rename to packages/plugins/@nocobase/plugin-cas/src/server/actions/login.ts diff --git a/packages/plugins/cas/src/server/actions/service.ts b/packages/plugins/@nocobase/plugin-cas/src/server/actions/service.ts similarity index 100% rename from packages/plugins/cas/src/server/actions/service.ts rename to packages/plugins/@nocobase/plugin-cas/src/server/actions/service.ts diff --git a/packages/plugins/cas/src/server/auth.ts b/packages/plugins/@nocobase/plugin-cas/src/server/auth.ts similarity index 100% rename from packages/plugins/cas/src/server/auth.ts rename to packages/plugins/@nocobase/plugin-cas/src/server/auth.ts diff --git a/packages/plugins/cas/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-cas/src/server/collections/.gitkeep similarity index 100% rename from packages/plugins/cas/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-cas/src/server/collections/.gitkeep diff --git a/packages/plugins/cas/src/server/index.ts b/packages/plugins/@nocobase/plugin-cas/src/server/index.ts similarity index 100% rename from packages/plugins/cas/src/server/index.ts rename to packages/plugins/@nocobase/plugin-cas/src/server/index.ts diff --git a/packages/plugins/cas/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-cas/src/server/plugin.ts similarity index 100% rename from packages/plugins/cas/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-cas/src/server/plugin.ts diff --git a/packages/plugins/charts/.npmignore b/packages/plugins/@nocobase/plugin-charts/.npmignore similarity index 100% rename from packages/plugins/charts/.npmignore rename to packages/plugins/@nocobase/plugin-charts/.npmignore diff --git a/packages/plugins/charts/client.d.ts b/packages/plugins/@nocobase/plugin-charts/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/charts/client.d.ts rename to packages/plugins/@nocobase/plugin-charts/client.d.ts diff --git a/packages/plugins/charts/client.js b/packages/plugins/@nocobase/plugin-charts/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/charts/client.js rename to packages/plugins/@nocobase/plugin-charts/client.js diff --git a/packages/plugins/charts/package.json b/packages/plugins/@nocobase/plugin-charts/package.json similarity index 89% rename from packages/plugins/charts/package.json rename to packages/plugins/@nocobase/plugin-charts/package.json index 0e8afe895..4c3c1955d 100644 --- a/packages/plugins/charts/package.json +++ b/packages/plugins/@nocobase/plugin-charts/package.json @@ -1,7 +1,7 @@ { "name": "@nocobase/plugin-charts", - "displayName": "charts", - "displayName.zh-CN": "图表", + "displayName": "Charts(Deprecated)", + "displayName.zh-CN": "图表(废弃)", "description": "Out-of-the-box, feature-rich chart plugins.", "description.zh-CN": "开箱即用、丰富的报表。", "version": "0.13.0-alpha.10", diff --git a/packages/plugins/charts/server.d.ts b/packages/plugins/@nocobase/plugin-charts/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/charts/server.d.ts rename to packages/plugins/@nocobase/plugin-charts/server.d.ts diff --git a/packages/plugins/charts/server.js b/packages/plugins/@nocobase/plugin-charts/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/charts/server.js rename to packages/plugins/@nocobase/plugin-charts/server.js diff --git a/packages/plugins/charts/src/client/ChartBlockEngine.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/ChartBlockEngine.tsx similarity index 100% rename from packages/plugins/charts/src/client/ChartBlockEngine.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/ChartBlockEngine.tsx diff --git a/packages/plugins/charts/src/client/ChartBlockEngineDesigner.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/ChartBlockEngineDesigner.tsx similarity index 100% rename from packages/plugins/charts/src/client/ChartBlockEngineDesigner.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/ChartBlockEngineDesigner.tsx diff --git a/packages/plugins/charts/src/client/ChartBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/ChartBlockInitializer.tsx similarity index 100% rename from packages/plugins/charts/src/client/ChartBlockInitializer.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/ChartBlockInitializer.tsx diff --git a/packages/plugins/charts/src/client/ChartQueryBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/ChartQueryBlockInitializer.tsx similarity index 100% rename from packages/plugins/charts/src/client/ChartQueryBlockInitializer.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/ChartQueryBlockInitializer.tsx diff --git a/packages/plugins/charts/src/client/ChartQueryMetadataProvider.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/ChartQueryMetadataProvider.tsx similarity index 100% rename from packages/plugins/charts/src/client/ChartQueryMetadataProvider.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/ChartQueryMetadataProvider.tsx diff --git a/packages/plugins/charts/src/client/DataSetPreviewTable.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/DataSetPreviewTable.tsx similarity index 100% rename from packages/plugins/charts/src/client/DataSetPreviewTable.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/DataSetPreviewTable.tsx diff --git a/packages/plugins/charts/src/client/Icons.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/Icons.tsx similarity index 100% rename from packages/plugins/charts/src/client/Icons.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/Icons.tsx diff --git a/packages/plugins/charts/src/client/chartRenderComponents/index.ts b/packages/plugins/@nocobase/plugin-charts/src/client/chartRenderComponents/index.ts similarity index 100% rename from packages/plugins/charts/src/client/chartRenderComponents/index.ts rename to packages/plugins/@nocobase/plugin-charts/src/client/chartRenderComponents/index.ts diff --git a/packages/plugins/charts/src/client/hooks/index.ts b/packages/plugins/@nocobase/plugin-charts/src/client/hooks/index.ts similarity index 100% rename from packages/plugins/charts/src/client/hooks/index.ts rename to packages/plugins/@nocobase/plugin-charts/src/client/hooks/index.ts diff --git a/packages/plugins/charts/src/client/index.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/index.tsx similarity index 100% rename from packages/plugins/charts/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/index.tsx diff --git a/packages/plugins/charts/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-charts/src/client/locale/index.ts similarity index 100% rename from packages/plugins/charts/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-charts/src/client/locale/index.ts diff --git a/packages/plugins/charts/src/client/select/CustomSelect.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/select/CustomSelect.tsx similarity index 100% rename from packages/plugins/charts/src/client/select/CustomSelect.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/select/CustomSelect.tsx diff --git a/packages/plugins/charts/src/client/select/ReadPretty.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/select/ReadPretty.tsx similarity index 100% rename from packages/plugins/charts/src/client/select/ReadPretty.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/select/ReadPretty.tsx diff --git a/packages/plugins/charts/src/client/select/index.md b/packages/plugins/@nocobase/plugin-charts/src/client/select/index.md similarity index 100% rename from packages/plugins/charts/src/client/select/index.md rename to packages/plugins/@nocobase/plugin-charts/src/client/select/index.md diff --git a/packages/plugins/charts/src/client/select/index.ts b/packages/plugins/@nocobase/plugin-charts/src/client/select/index.ts similarity index 100% rename from packages/plugins/charts/src/client/select/index.ts rename to packages/plugins/@nocobase/plugin-charts/src/client/select/index.ts diff --git a/packages/plugins/charts/src/client/select/shared.ts b/packages/plugins/@nocobase/plugin-charts/src/client/select/shared.ts similarity index 100% rename from packages/plugins/charts/src/client/select/shared.ts rename to packages/plugins/@nocobase/plugin-charts/src/client/select/shared.ts diff --git a/packages/plugins/charts/src/client/settings/AddNewQuery.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/settings/AddNewQuery.tsx similarity index 100% rename from packages/plugins/charts/src/client/settings/AddNewQuery.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/settings/AddNewQuery.tsx diff --git a/packages/plugins/charts/src/client/settings/ConfigureFields.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/settings/ConfigureFields.tsx similarity index 100% rename from packages/plugins/charts/src/client/settings/ConfigureFields.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/settings/ConfigureFields.tsx diff --git a/packages/plugins/charts/src/client/settings/QueriesTable.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/settings/QueriesTable.tsx similarity index 100% rename from packages/plugins/charts/src/client/settings/QueriesTable.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/settings/QueriesTable.tsx diff --git a/packages/plugins/charts/src/client/settings/queryTypes.ts b/packages/plugins/@nocobase/plugin-charts/src/client/settings/queryTypes.ts similarity index 100% rename from packages/plugins/charts/src/client/settings/queryTypes.ts rename to packages/plugins/@nocobase/plugin-charts/src/client/settings/queryTypes.ts diff --git a/packages/plugins/charts/src/client/settings/schemas/chartsQueries.ts b/packages/plugins/@nocobase/plugin-charts/src/client/settings/schemas/chartsQueries.ts similarity index 100% rename from packages/plugins/charts/src/client/settings/schemas/chartsQueries.ts rename to packages/plugins/@nocobase/plugin-charts/src/client/settings/schemas/chartsQueries.ts diff --git a/packages/plugins/charts/src/client/templates/AreaTemplate.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/templates/AreaTemplate.tsx similarity index 100% rename from packages/plugins/charts/src/client/templates/AreaTemplate.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/templates/AreaTemplate.tsx diff --git a/packages/plugins/charts/src/client/templates/BarTemplate.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/templates/BarTemplate.tsx similarity index 100% rename from packages/plugins/charts/src/client/templates/BarTemplate.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/templates/BarTemplate.tsx diff --git a/packages/plugins/charts/src/client/templates/ColumnTemplate.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/templates/ColumnTemplate.tsx similarity index 100% rename from packages/plugins/charts/src/client/templates/ColumnTemplate.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/templates/ColumnTemplate.tsx diff --git a/packages/plugins/charts/src/client/templates/FunnelTemplate.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/templates/FunnelTemplate.tsx similarity index 100% rename from packages/plugins/charts/src/client/templates/FunnelTemplate.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/templates/FunnelTemplate.tsx diff --git a/packages/plugins/charts/src/client/templates/LineTemplate.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/templates/LineTemplate.tsx similarity index 100% rename from packages/plugins/charts/src/client/templates/LineTemplate.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/templates/LineTemplate.tsx diff --git a/packages/plugins/charts/src/client/templates/PieTemplate.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/templates/PieTemplate.tsx similarity index 100% rename from packages/plugins/charts/src/client/templates/PieTemplate.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/templates/PieTemplate.tsx diff --git a/packages/plugins/charts/src/client/templates/RadarTemplate.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/templates/RadarTemplate.tsx similarity index 100% rename from packages/plugins/charts/src/client/templates/RadarTemplate.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/templates/RadarTemplate.tsx diff --git a/packages/plugins/charts/src/client/templates/ScatterTemplate.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/templates/ScatterTemplate.tsx similarity index 100% rename from packages/plugins/charts/src/client/templates/ScatterTemplate.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/templates/ScatterTemplate.tsx diff --git a/packages/plugins/charts/src/client/templates/TableTemplate.tsx b/packages/plugins/@nocobase/plugin-charts/src/client/templates/TableTemplate.tsx similarity index 100% rename from packages/plugins/charts/src/client/templates/TableTemplate.tsx rename to packages/plugins/@nocobase/plugin-charts/src/client/templates/TableTemplate.tsx diff --git a/packages/plugins/charts/src/client/templates/index.ts b/packages/plugins/@nocobase/plugin-charts/src/client/templates/index.ts similarity index 100% rename from packages/plugins/charts/src/client/templates/index.ts rename to packages/plugins/@nocobase/plugin-charts/src/client/templates/index.ts diff --git a/packages/plugins/charts/src/client/utils.ts b/packages/plugins/@nocobase/plugin-charts/src/client/utils.ts similarity index 100% rename from packages/plugins/charts/src/client/utils.ts rename to packages/plugins/@nocobase/plugin-charts/src/client/utils.ts diff --git a/packages/plugins/charts/src/index.ts b/packages/plugins/@nocobase/plugin-charts/src/index.ts similarity index 100% rename from packages/plugins/charts/src/index.ts rename to packages/plugins/@nocobase/plugin-charts/src/index.ts diff --git a/packages/plugins/charts/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-charts/src/locale/en-US.ts similarity index 100% rename from packages/plugins/charts/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-charts/src/locale/en-US.ts diff --git a/packages/plugins/charts/src/locale/es-ES.ts b/packages/plugins/@nocobase/plugin-charts/src/locale/es-ES.ts similarity index 100% rename from packages/plugins/charts/src/locale/es-ES.ts rename to packages/plugins/@nocobase/plugin-charts/src/locale/es-ES.ts diff --git a/packages/plugins/charts/src/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-charts/src/locale/fr-FR.ts similarity index 100% rename from packages/plugins/charts/src/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-charts/src/locale/fr-FR.ts diff --git a/packages/plugins/charts/src/locale/ja-JP.ts b/packages/plugins/@nocobase/plugin-charts/src/locale/ja-JP.ts similarity index 100% rename from packages/plugins/charts/src/locale/ja-JP.ts rename to packages/plugins/@nocobase/plugin-charts/src/locale/ja-JP.ts diff --git a/packages/plugins/charts/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-charts/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/charts/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-charts/src/locale/pt-BR.ts diff --git a/packages/plugins/charts/src/locale/ru-RU.ts b/packages/plugins/@nocobase/plugin-charts/src/locale/ru-RU.ts similarity index 100% rename from packages/plugins/charts/src/locale/ru-RU.ts rename to packages/plugins/@nocobase/plugin-charts/src/locale/ru-RU.ts diff --git a/packages/plugins/charts/src/locale/tr-TR.ts b/packages/plugins/@nocobase/plugin-charts/src/locale/tr-TR.ts similarity index 100% rename from packages/plugins/charts/src/locale/tr-TR.ts rename to packages/plugins/@nocobase/plugin-charts/src/locale/tr-TR.ts diff --git a/packages/plugins/charts/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-charts/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/charts/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-charts/src/locale/zh-CN.ts diff --git a/packages/plugins/charts/src/server/actions/chartsQueries.ts b/packages/plugins/@nocobase/plugin-charts/src/server/actions/chartsQueries.ts similarity index 100% rename from packages/plugins/charts/src/server/actions/chartsQueries.ts rename to packages/plugins/@nocobase/plugin-charts/src/server/actions/chartsQueries.ts diff --git a/packages/plugins/charts/src/server/actions/index.ts b/packages/plugins/@nocobase/plugin-charts/src/server/actions/index.ts similarity index 100% rename from packages/plugins/charts/src/server/actions/index.ts rename to packages/plugins/@nocobase/plugin-charts/src/server/actions/index.ts diff --git a/packages/plugins/charts/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-charts/src/server/collections/.gitkeep similarity index 100% rename from packages/plugins/charts/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-charts/src/server/collections/.gitkeep diff --git a/packages/plugins/charts/src/server/collections/chartsQueries.ts b/packages/plugins/@nocobase/plugin-charts/src/server/collections/chartsQueries.ts similarity index 100% rename from packages/plugins/charts/src/server/collections/chartsQueries.ts rename to packages/plugins/@nocobase/plugin-charts/src/server/collections/chartsQueries.ts diff --git a/packages/plugins/charts/src/server/index.ts b/packages/plugins/@nocobase/plugin-charts/src/server/index.ts similarity index 100% rename from packages/plugins/charts/src/server/index.ts rename to packages/plugins/@nocobase/plugin-charts/src/server/index.ts diff --git a/packages/plugins/charts/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-charts/src/server/plugin.ts similarity index 100% rename from packages/plugins/charts/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-charts/src/server/plugin.ts diff --git a/packages/plugins/charts/src/server/query.ts b/packages/plugins/@nocobase/plugin-charts/src/server/query.ts similarity index 100% rename from packages/plugins/charts/src/server/query.ts rename to packages/plugins/@nocobase/plugin-charts/src/server/query.ts diff --git a/packages/plugins/charts/src/server/shared/index.ts b/packages/plugins/@nocobase/plugin-charts/src/server/shared/index.ts similarity index 100% rename from packages/plugins/charts/src/server/shared/index.ts rename to packages/plugins/@nocobase/plugin-charts/src/server/shared/index.ts diff --git a/packages/plugins/china-region/.npmignore b/packages/plugins/@nocobase/plugin-china-region/.npmignore similarity index 100% rename from packages/plugins/china-region/.npmignore rename to packages/plugins/@nocobase/plugin-china-region/.npmignore diff --git a/packages/plugins/china-region/LICENSE b/packages/plugins/@nocobase/plugin-china-region/LICENSE similarity index 100% rename from packages/plugins/china-region/LICENSE rename to packages/plugins/@nocobase/plugin-china-region/LICENSE diff --git a/packages/plugins/china-region/README.md b/packages/plugins/@nocobase/plugin-china-region/README.md similarity index 100% rename from packages/plugins/china-region/README.md rename to packages/plugins/@nocobase/plugin-china-region/README.md diff --git a/packages/plugins/china-region/README.zh-CN.md b/packages/plugins/@nocobase/plugin-china-region/README.zh-CN.md similarity index 100% rename from packages/plugins/china-region/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-china-region/README.zh-CN.md diff --git a/packages/plugins/china-region/build.js b/packages/plugins/@nocobase/plugin-china-region/build.js similarity index 100% rename from packages/plugins/china-region/build.js rename to packages/plugins/@nocobase/plugin-china-region/build.js diff --git a/packages/plugins/china-region/client.d.ts b/packages/plugins/@nocobase/plugin-china-region/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/china-region/client.d.ts rename to packages/plugins/@nocobase/plugin-china-region/client.d.ts diff --git a/packages/plugins/china-region/client.js b/packages/plugins/@nocobase/plugin-china-region/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/china-region/client.js rename to packages/plugins/@nocobase/plugin-china-region/client.js diff --git a/packages/plugins/china-region/package.json b/packages/plugins/@nocobase/plugin-china-region/package.json similarity index 80% rename from packages/plugins/china-region/package.json rename to packages/plugins/@nocobase/plugin-china-region/package.json index 51018317a..344039571 100644 --- a/packages/plugins/china-region/package.json +++ b/packages/plugins/@nocobase/plugin-china-region/package.json @@ -3,8 +3,8 @@ "version": "0.13.0-alpha.10", "displayName": "China region", "displayName.zh-CN": "中国行政区", - "description": "China region field", - "description.zh-CN": "拓展的中国行政区字段", + "description": "Provides China region data and field interface", + "description.zh-CN": "提供中国行政区数据和字段(Interface)类型", "main": "./dist/server/index.js", "license": "AGPL-3.0", "devDependencies": { diff --git a/packages/plugins/china-region/server.d.ts b/packages/plugins/@nocobase/plugin-china-region/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/china-region/server.d.ts rename to packages/plugins/@nocobase/plugin-china-region/server.d.ts diff --git a/packages/plugins/china-region/server.js b/packages/plugins/@nocobase/plugin-china-region/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/china-region/server.js rename to packages/plugins/@nocobase/plugin-china-region/server.js diff --git a/packages/plugins/china-region/src/client/ChinaRegionProvider.tsx b/packages/plugins/@nocobase/plugin-china-region/src/client/ChinaRegionProvider.tsx similarity index 100% rename from packages/plugins/china-region/src/client/ChinaRegionProvider.tsx rename to packages/plugins/@nocobase/plugin-china-region/src/client/ChinaRegionProvider.tsx diff --git a/packages/plugins/china-region/src/client/index.tsx b/packages/plugins/@nocobase/plugin-china-region/src/client/index.tsx similarity index 100% rename from packages/plugins/china-region/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-china-region/src/client/index.tsx diff --git a/packages/plugins/china-region/src/index.ts b/packages/plugins/@nocobase/plugin-china-region/src/index.ts similarity index 100% rename from packages/plugins/china-region/src/index.ts rename to packages/plugins/@nocobase/plugin-china-region/src/index.ts diff --git a/packages/plugins/china-region/src/server/__tests__/action.test.ts b/packages/plugins/@nocobase/plugin-china-region/src/server/__tests__/action.test.ts similarity index 100% rename from packages/plugins/china-region/src/server/__tests__/action.test.ts rename to packages/plugins/@nocobase/plugin-china-region/src/server/__tests__/action.test.ts diff --git a/packages/plugins/china-region/src/server/collections/chinaRegions.ts b/packages/plugins/@nocobase/plugin-china-region/src/server/collections/chinaRegions.ts similarity index 100% rename from packages/plugins/china-region/src/server/collections/chinaRegions.ts rename to packages/plugins/@nocobase/plugin-china-region/src/server/collections/chinaRegions.ts diff --git a/packages/plugins/china-region/src/server/index.ts b/packages/plugins/@nocobase/plugin-china-region/src/server/index.ts similarity index 100% rename from packages/plugins/china-region/src/server/index.ts rename to packages/plugins/@nocobase/plugin-china-region/src/server/index.ts diff --git a/packages/plugins/china-region/src/swagger/index.json b/packages/plugins/@nocobase/plugin-china-region/src/swagger/index.json similarity index 100% rename from packages/plugins/china-region/src/swagger/index.json rename to packages/plugins/@nocobase/plugin-china-region/src/swagger/index.json diff --git a/packages/plugins/client/.npmignore b/packages/plugins/@nocobase/plugin-client/.npmignore similarity index 100% rename from packages/plugins/client/.npmignore rename to packages/plugins/@nocobase/plugin-client/.npmignore diff --git a/packages/plugins/client/LICENSE b/packages/plugins/@nocobase/plugin-client/LICENSE similarity index 100% rename from packages/plugins/client/LICENSE rename to packages/plugins/@nocobase/plugin-client/LICENSE diff --git a/packages/plugins/client/README.md b/packages/plugins/@nocobase/plugin-client/README.md similarity index 100% rename from packages/plugins/client/README.md rename to packages/plugins/@nocobase/plugin-client/README.md diff --git a/packages/plugins/client/README.zh-CN.md b/packages/plugins/@nocobase/plugin-client/README.zh-CN.md similarity index 100% rename from packages/plugins/client/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-client/README.zh-CN.md diff --git a/packages/plugins/client/build.js b/packages/plugins/@nocobase/plugin-client/build.js similarity index 100% rename from packages/plugins/client/build.js rename to packages/plugins/@nocobase/plugin-client/build.js diff --git a/packages/plugins/client/client.d.ts b/packages/plugins/@nocobase/plugin-client/client.d.ts similarity index 100% rename from packages/plugins/client/client.d.ts rename to packages/plugins/@nocobase/plugin-client/client.d.ts diff --git a/packages/plugins/client/client.js b/packages/plugins/@nocobase/plugin-client/client.js similarity index 100% rename from packages/plugins/client/client.js rename to packages/plugins/@nocobase/plugin-client/client.js diff --git a/packages/plugins/client/package.json b/packages/plugins/@nocobase/plugin-client/package.json similarity index 80% rename from packages/plugins/client/package.json rename to packages/plugins/@nocobase/plugin-client/package.json index 8e31ce4ff..4dac5086d 100644 --- a/packages/plugins/client/package.json +++ b/packages/plugins/@nocobase/plugin-client/package.json @@ -2,8 +2,8 @@ "name": "@nocobase/plugin-client", "displayName": "WEB client", "displayName.zh-CN": "WEB 客户端", - "description": "", - "description.zh-CN": "", + "description": "Provides a client interface for the NocoBase server", + "description.zh-CN": "为 NocoBase 服务端提供客户端界面", "version": "0.13.0-alpha.10", "main": "./dist/server/index.js", "license": "AGPL-3.0", diff --git a/packages/plugins/client/server.d.ts b/packages/plugins/@nocobase/plugin-client/server.d.ts similarity index 100% rename from packages/plugins/client/server.d.ts rename to packages/plugins/@nocobase/plugin-client/server.d.ts diff --git a/packages/plugins/client/server.js b/packages/plugins/@nocobase/plugin-client/server.js similarity index 100% rename from packages/plugins/client/server.js rename to packages/plugins/@nocobase/plugin-client/server.js diff --git a/packages/plugins/client/src/client/index.ts b/packages/plugins/@nocobase/plugin-client/src/client/index.ts similarity index 85% rename from packages/plugins/client/src/client/index.ts rename to packages/plugins/@nocobase/plugin-client/src/client/index.ts index 1d5cbecba..110db2de1 100644 --- a/packages/plugins/client/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-client/src/client/index.ts @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; class ClientPlugin extends Plugin { - async load() { } + async load() {} } export default ClientPlugin; diff --git a/packages/plugins/client/src/index.ts b/packages/plugins/@nocobase/plugin-client/src/index.ts similarity index 100% rename from packages/plugins/client/src/index.ts rename to packages/plugins/@nocobase/plugin-client/src/index.ts diff --git a/packages/plugins/client/src/server/antd.ts b/packages/plugins/@nocobase/plugin-client/src/server/antd.ts similarity index 100% rename from packages/plugins/client/src/server/antd.ts rename to packages/plugins/@nocobase/plugin-client/src/server/antd.ts diff --git a/packages/plugins/client/src/server/cron.ts b/packages/plugins/@nocobase/plugin-client/src/server/cron.ts similarity index 100% rename from packages/plugins/client/src/server/cron.ts rename to packages/plugins/@nocobase/plugin-client/src/server/cron.ts diff --git a/packages/plugins/client/src/server/cronstrue.ts b/packages/plugins/@nocobase/plugin-client/src/server/cronstrue.ts similarity index 100% rename from packages/plugins/client/src/server/cronstrue.ts rename to packages/plugins/@nocobase/plugin-client/src/server/cronstrue.ts diff --git a/packages/plugins/client/src/server/index.ts b/packages/plugins/@nocobase/plugin-client/src/server/index.ts similarity index 100% rename from packages/plugins/client/src/server/index.ts rename to packages/plugins/@nocobase/plugin-client/src/server/index.ts diff --git a/packages/plugins/client/src/server/migrations/20230620203216-admin-ui-schema-uid.ts b/packages/plugins/@nocobase/plugin-client/src/server/migrations/20230620203216-admin-ui-schema-uid.ts similarity index 100% rename from packages/plugins/client/src/server/migrations/20230620203216-admin-ui-schema-uid.ts rename to packages/plugins/@nocobase/plugin-client/src/server/migrations/20230620203216-admin-ui-schema-uid.ts diff --git a/packages/plugins/client/src/server/server.ts b/packages/plugins/@nocobase/plugin-client/src/server/server.ts similarity index 63% rename from packages/plugins/client/src/server/server.ts rename to packages/plugins/@nocobase/plugin-client/src/server/server.ts index 05f588820..590da0d34 100644 --- a/packages/plugins/client/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-client/src/server/server.ts @@ -1,60 +1,10 @@ -import { Plugin, PluginManager, getPackageClientStaticUrl } from '@nocobase/server'; +import { Plugin, PluginManager, getExposeUrl } from '@nocobase/server'; import fs from 'fs'; import { resolve } from 'path'; import { getAntdLocale } from './antd'; import { getCronLocale } from './cron'; import { getCronstrueLocale } from './cronstrue'; -async function getReadMe(name: string, locale: string) { - const packageName = PluginManager.getPackageName(name); - const dir = resolve(process.cwd(), 'node_modules', packageName); - const files = [resolve(dir, `README.${locale}.md`), resolve(dir, `README.md`)]; - const file = files.find((file) => { - return fs.existsSync(file); - }); - return file ? (await fs.promises.readFile(file)).toString() : ''; -} - -async function getTabs(name: string, locale: string) { - const packageName = PluginManager.getPackageName(name); - const dir = resolve(process.cwd(), 'node_modules', packageName); - const file = resolve(dir, 'docs', locale, 'tabs.json'); - if (!fs.existsSync(file)) { - // TODO: compatible README, remove it in all plugin has tabs.json - return [ - { - title: 'README', - path: '__README__', - }, - ]; - } - return JSON.parse((await fs.promises.readFile(file)).toString()); -} - -interface TabInfoParams { - filterByTk: string; - path: string; - locale: string; -} - -async function getTabInfo({ filterByTk, path, locale }: TabInfoParams) { - const packageName = PluginManager.getPackageName(filterByTk); - const dir = resolve(process.cwd(), 'node_modules', packageName); - if (path === '__README__') { - return await getReadMe(filterByTk, locale); - } - const files = [ - resolve(dir, 'docs', locale, `${path}.md`), - // default - resolve(dir, 'docs', 'en-US', `${path}.md`), - resolve(dir, 'docs', 'zh-CN', `${path}.md`), - ]; - const file = files.find((file) => { - return fs.existsSync(file); - }); - return file ? (await fs.promises.readFile(file)).toString() : ''; -} - async function getLang(ctx) { const SystemSetting = ctx.db.getRepository('systemSettings'); const systemSetting = await SystemSetting.findOne(); @@ -167,6 +117,7 @@ export class ClientPlugin extends Plugin { }, async getPlugins(ctx, next) { const pm = ctx.db.getRepository('applicationPlugins'); + const PLUGIN_CLIENT_ENTRY_FILE = 'dist/client/index.js'; const items = await pm.find({ filter: { enabled: true, @@ -176,11 +127,10 @@ export class ClientPlugin extends Plugin { .map((item) => { try { const packageName = PluginManager.getPackageName(item.name); - require.resolve(`${packageName}/client`); return { ...item.toJSON(), packageName, - url: getPackageClientStaticUrl(packageName, 'index'), + url: getExposeUrl(packageName, PLUGIN_CLIENT_ENTRY_FILE), }; } catch { return false; @@ -199,38 +149,6 @@ export class ClientPlugin extends Plugin { }, }, }); - this.app.resource({ - name: 'plugins', - actions: { - async getInfo(ctx, next) { - const lang = await getLang(ctx); - const { filterByTk } = ctx.action.params; - ctx.body = { - filterByTk, - readMe: await getReadMe(filterByTk, lang), - }; - await next(); - }, - async getTabs(ctx, next) { - const lang = await getLang(ctx); - const { filterByTk } = ctx.action.params; - ctx.body = { - filterByTk, - tabs: await getTabs(filterByTk, lang), - }; - await next(); - }, - async getTabInfo(ctx, next) { - const locale = await getLang(ctx); - const { filterByTk } = ctx.action.params; - ctx.body = { - filterByTk, - content: await getTabInfo({ ...(ctx.action.params as any), locale }), - }; - await next(); - }, - }, - }); } } diff --git a/packages/plugins/client/src/swagger/index.json b/packages/plugins/@nocobase/plugin-client/src/swagger/index.json similarity index 100% rename from packages/plugins/client/src/swagger/index.json rename to packages/plugins/@nocobase/plugin-client/src/swagger/index.json diff --git a/packages/plugins/collection-manager/.npmignore b/packages/plugins/@nocobase/plugin-collection-manager/.npmignore similarity index 100% rename from packages/plugins/collection-manager/.npmignore rename to packages/plugins/@nocobase/plugin-collection-manager/.npmignore diff --git a/packages/plugins/collection-manager/LICENSE b/packages/plugins/@nocobase/plugin-collection-manager/LICENSE similarity index 100% rename from packages/plugins/collection-manager/LICENSE rename to packages/plugins/@nocobase/plugin-collection-manager/LICENSE diff --git a/packages/plugins/collection-manager/README.md b/packages/plugins/@nocobase/plugin-collection-manager/README.md similarity index 100% rename from packages/plugins/collection-manager/README.md rename to packages/plugins/@nocobase/plugin-collection-manager/README.md diff --git a/packages/plugins/collection-manager/README.zh-CN.md b/packages/plugins/@nocobase/plugin-collection-manager/README.zh-CN.md similarity index 100% rename from packages/plugins/collection-manager/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-collection-manager/README.zh-CN.md diff --git a/packages/plugins/collection-manager/client.d.ts b/packages/plugins/@nocobase/plugin-collection-manager/client.d.ts similarity index 100% rename from packages/plugins/collection-manager/client.d.ts rename to packages/plugins/@nocobase/plugin-collection-manager/client.d.ts diff --git a/packages/plugins/collection-manager/client.js b/packages/plugins/@nocobase/plugin-collection-manager/client.js similarity index 100% rename from packages/plugins/collection-manager/client.js rename to packages/plugins/@nocobase/plugin-collection-manager/client.js diff --git a/packages/plugins/collection-manager/package.json b/packages/plugins/@nocobase/plugin-collection-manager/package.json similarity index 100% rename from packages/plugins/collection-manager/package.json rename to packages/plugins/@nocobase/plugin-collection-manager/package.json diff --git a/packages/plugins/collection-manager/server.d.ts b/packages/plugins/@nocobase/plugin-collection-manager/server.d.ts similarity index 100% rename from packages/plugins/collection-manager/server.d.ts rename to packages/plugins/@nocobase/plugin-collection-manager/server.d.ts diff --git a/packages/plugins/collection-manager/server.js b/packages/plugins/@nocobase/plugin-collection-manager/server.js similarity index 100% rename from packages/plugins/collection-manager/server.js rename to packages/plugins/@nocobase/plugin-collection-manager/server.js diff --git a/packages/plugins/collection-manager/src/client/index.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/index.ts similarity index 87% rename from packages/plugins/collection-manager/src/client/index.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/client/index.ts index c7f2bd65e..3913f2beb 100644 --- a/packages/plugins/collection-manager/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/index.ts @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; class CollectionManagerPlugin extends Plugin { - async load() { } + async load() {} } export default CollectionManagerPlugin; diff --git a/packages/plugins/collection-manager/src/index.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/index.ts similarity index 100% rename from packages/plugins/collection-manager/src/index.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/index.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/action.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/action.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/action.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/action.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/associations/reference-integerity-check.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/associations/reference-integerity-check.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/associations/reference-integerity-check.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/associations/reference-integerity-check.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/beforeInitOptions.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/beforeInitOptions.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/beforeInitOptions.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/beforeInitOptions.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/collection-categories.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-categories.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/collection-categories.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-categories.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/collections.repository.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collections.repository.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/collections.repository.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collections.repository.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/field-options/default-value.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/default-value.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/field-options/default-value.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/default-value.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/field-options/indexes.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/indexes.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/field-options/indexes.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/indexes.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/fields.repository.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields.repository.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/fields.repository.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields.repository.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/fields/belongs-to-many.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongs-to-many.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/fields/belongs-to-many.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongs-to-many.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/fields/belongsTo.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongsTo.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/fields/belongsTo.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongsTo.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/fields/hasMany.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasMany.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/fields/hasMany.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasMany.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/fields/hasOne.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasOne.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/fields/hasOne.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasOne.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/fields/reverseField.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/reverseField.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/fields/reverseField.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/reverseField.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/http-api/belongs-to-many.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/belongs-to-many.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/http-api/belongs-to-many.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/belongs-to-many.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/http-api/collections.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/collections.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/http-api/collections.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/collections.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/http-api/find.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/find.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/http-api/find.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/find.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/http-api/inherited-collection.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/inherited-collection.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/http-api/inherited-collection.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/inherited-collection.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/http-api/recreate.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/recreate.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/http-api/recreate.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/recreate.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/http-api/tree.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/tree.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/http-api/tree.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/tree.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/http-api/view-collection.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/view-collection.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/http-api/view-collection.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/view-collection.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/index.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/index.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/index.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/index.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/inherits/inherited-collection.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inherited-collection.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/inherits/inherited-collection.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inherited-collection.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/inherits/inhertied-collection-with-schema.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inhertied-collection-with-schema.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/inherits/inhertied-collection-with-schema.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inhertied-collection-with-schema.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/migrations/20221104151410-update-collections-hidden.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/20221104151410-update-collections-hidden.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/migrations/20221104151410-update-collections-hidden.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/20221104151410-update-collections-hidden.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/migrations/drop-ui-schema-relation.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/drop-ui-schema-relation.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/migrations/drop-ui-schema-relation.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/drop-ui-schema-relation.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/migrations/update-id-to-bigint.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/update-id-to-bigint.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/migrations/update-id-to-bigint.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/update-id-to-bigint.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/reference-integerity.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/reference-integerity.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/reference-integerity.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/reference-integerity.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/remove-collection.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/remove-collection.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/remove-collection.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/remove-collection.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/resources/collections.fields.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.fields.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/resources/collections.fields.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.fields.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/resources/collections.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/resources/collections.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/sync.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/sync.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/sync.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/sync.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/through.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/through.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/through.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/through.test.ts diff --git a/packages/plugins/collection-manager/src/server/__tests__/view/view-collection.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/view/view-collection.test.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/__tests__/view/view-collection.test.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/view/view-collection.test.ts diff --git a/packages/plugins/collection-manager/src/server/collections/collectionCategories.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collectionCategories.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/collections/collectionCategories.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collectionCategories.ts diff --git a/packages/plugins/collection-manager/src/server/collections/collections.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collections.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/collections/collections.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collections.ts diff --git a/packages/plugins/collection-manager/src/server/collections/fields.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/fields.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/collections/fields.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/fields.ts diff --git a/packages/plugins/collection-manager/src/server/hooks/afterCreateForForeignKeyField.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForForeignKeyField.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/hooks/afterCreateForForeignKeyField.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForForeignKeyField.ts diff --git a/packages/plugins/collection-manager/src/server/hooks/afterCreateForReverseField.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForReverseField.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/hooks/afterCreateForReverseField.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForReverseField.ts diff --git a/packages/plugins/collection-manager/src/server/hooks/afterDestroyForForeignKeyField.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterDestroyForForeignKeyField.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/hooks/afterDestroyForForeignKeyField.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterDestroyForForeignKeyField.ts diff --git a/packages/plugins/collection-manager/src/server/hooks/beforeCreateForChildrenCollection.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForChildrenCollection.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/hooks/beforeCreateForChildrenCollection.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForChildrenCollection.ts diff --git a/packages/plugins/collection-manager/src/server/hooks/beforeCreateForReverseField.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForReverseField.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/hooks/beforeCreateForReverseField.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForReverseField.ts diff --git a/packages/plugins/collection-manager/src/server/hooks/beforeCreateForViewCollection.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForViewCollection.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/hooks/beforeCreateForViewCollection.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForViewCollection.ts diff --git a/packages/plugins/collection-manager/src/server/hooks/beforeDestroyForeignKey.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeDestroyForeignKey.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/hooks/beforeDestroyForeignKey.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeDestroyForeignKey.ts diff --git a/packages/plugins/collection-manager/src/server/hooks/beforeInitOptions.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeInitOptions.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/hooks/beforeInitOptions.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeInitOptions.ts diff --git a/packages/plugins/collection-manager/src/server/hooks/index.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/index.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/hooks/index.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/index.ts diff --git a/packages/plugins/collection-manager/src/server/index.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/index.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/index.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/index.ts diff --git a/packages/plugins/collection-manager/src/server/migrations/20220613103214-alert-sub-table.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220613103214-alert-sub-table.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/migrations/20220613103214-alert-sub-table.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220613103214-alert-sub-table.ts diff --git a/packages/plugins/collection-manager/src/server/migrations/20220704225714-drop-foreign-keys.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220704225714-drop-foreign-keys.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/migrations/20220704225714-drop-foreign-keys.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220704225714-drop-foreign-keys.ts diff --git a/packages/plugins/collection-manager/src/server/migrations/20221101111110-update-foreign-fields.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221101111110-update-foreign-fields.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/migrations/20221101111110-update-foreign-fields.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221101111110-update-foreign-fields.ts diff --git a/packages/plugins/collection-manager/src/server/migrations/20221104151410-update-collections-hidden.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221104151410-update-collections-hidden.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/migrations/20221104151410-update-collections-hidden.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221104151410-update-collections-hidden.ts diff --git a/packages/plugins/collection-manager/src/server/migrations/20221121111110-update-fk-type.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111110-update-fk-type.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/migrations/20221121111110-update-fk-type.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111110-update-fk-type.ts diff --git a/packages/plugins/collection-manager/src/server/migrations/20221121111113-update-id-to-bigint.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111113-update-id-to-bigint.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/migrations/20221121111113-update-id-to-bigint.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111113-update-id-to-bigint.ts diff --git a/packages/plugins/collection-manager/src/server/migrations/20221221103220-timestamps.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221221103220-timestamps.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/migrations/20221221103220-timestamps.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221221103220-timestamps.ts diff --git a/packages/plugins/collection-manager/src/server/migrations/20230225111112-drop-ui-schema-relation.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230225111112-drop-ui-schema-relation.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/migrations/20230225111112-drop-ui-schema-relation.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230225111112-drop-ui-schema-relation.ts diff --git a/packages/plugins/collection-manager/src/server/migrations/20230509111114-alert-ui-schema.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230509111114-alert-ui-schema.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/migrations/20230509111114-alert-ui-schema.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230509111114-alert-ui-schema.ts diff --git a/packages/plugins/collection-manager/src/server/migrations/20230623145414-number-step.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230623145414-number-step.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/migrations/20230623145414-number-step.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230623145414-number-step.ts diff --git a/packages/plugins/collection-manager/src/server/migrations/20230704222935-tableoid.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230704222935-tableoid.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/migrations/20230704222935-tableoid.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230704222935-tableoid.ts diff --git a/packages/plugins/collection-manager/src/server/models/collection.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/models/collection.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/models/collection.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/models/collection.ts diff --git a/packages/plugins/collection-manager/src/server/models/field.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/models/field.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/models/field.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/models/field.ts diff --git a/packages/plugins/collection-manager/src/server/models/index.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/models/index.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/models/index.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/models/index.ts diff --git a/packages/plugins/collection-manager/src/server/repositories/collection-repository.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/repositories/collection-repository.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/repositories/collection-repository.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/repositories/collection-repository.ts diff --git a/packages/plugins/collection-manager/src/server/repositories/index.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/repositories/index.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/repositories/index.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/repositories/index.ts diff --git a/packages/plugins/collection-manager/src/server/resourcers/collections.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/collections.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/resourcers/collections.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/collections.ts diff --git a/packages/plugins/collection-manager/src/server/resourcers/views.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/views.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/resourcers/views.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/views.ts diff --git a/packages/plugins/collection-manager/src/server/server.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/server.ts similarity index 100% rename from packages/plugins/collection-manager/src/server/server.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/server/server.ts diff --git a/packages/plugins/collection-manager/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/swagger/index.ts similarity index 100% rename from packages/plugins/collection-manager/src/swagger/index.ts rename to packages/plugins/@nocobase/plugin-collection-manager/src/swagger/index.ts diff --git a/packages/plugins/data-visualization/.npmignore b/packages/plugins/@nocobase/plugin-data-visualization/.npmignore similarity index 100% rename from packages/plugins/data-visualization/.npmignore rename to packages/plugins/@nocobase/plugin-data-visualization/.npmignore diff --git a/packages/plugins/data-visualization/LICENSE b/packages/plugins/@nocobase/plugin-data-visualization/LICENSE similarity index 100% rename from packages/plugins/data-visualization/LICENSE rename to packages/plugins/@nocobase/plugin-data-visualization/LICENSE diff --git a/packages/plugins/data-visualization/README.md b/packages/plugins/@nocobase/plugin-data-visualization/README.md similarity index 100% rename from packages/plugins/data-visualization/README.md rename to packages/plugins/@nocobase/plugin-data-visualization/README.md diff --git a/packages/plugins/localization-management/client.d.ts b/packages/plugins/@nocobase/plugin-data-visualization/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/localization-management/client.d.ts rename to packages/plugins/@nocobase/plugin-data-visualization/client.d.ts diff --git a/packages/plugins/localization-management/client.js b/packages/plugins/@nocobase/plugin-data-visualization/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/localization-management/client.js rename to packages/plugins/@nocobase/plugin-data-visualization/client.js diff --git a/packages/plugins/data-visualization/package.json b/packages/plugins/@nocobase/plugin-data-visualization/package.json similarity index 100% rename from packages/plugins/data-visualization/package.json rename to packages/plugins/@nocobase/plugin-data-visualization/package.json diff --git a/packages/plugins/data-visualization/server.d.ts b/packages/plugins/@nocobase/plugin-data-visualization/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/data-visualization/server.d.ts rename to packages/plugins/@nocobase/plugin-data-visualization/server.d.ts diff --git a/packages/plugins/data-visualization/server.js b/packages/plugins/@nocobase/plugin-data-visualization/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/data-visualization/server.js rename to packages/plugins/@nocobase/plugin-data-visualization/server.js diff --git a/packages/plugins/data-visualization/src/client/Settings.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/Settings.tsx similarity index 100% rename from packages/plugins/data-visualization/src/client/Settings.tsx rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/Settings.tsx diff --git a/packages/plugins/data-visualization/src/client/__tests__/chart-configure.test.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/__tests__/chart-configure.test.tsx similarity index 100% rename from packages/plugins/data-visualization/src/client/__tests__/chart-configure.test.tsx rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/__tests__/chart-configure.test.tsx diff --git a/packages/plugins/data-visualization/src/client/__tests__/chart-library.test.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/__tests__/chart-library.test.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/__tests__/chart-library.test.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/__tests__/chart-library.test.ts diff --git a/packages/plugins/data-visualization/src/client/__tests__/chart-renderer.test.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/__tests__/chart-renderer.test.tsx similarity index 100% rename from packages/plugins/data-visualization/src/client/__tests__/chart-renderer.test.tsx rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/__tests__/chart-renderer.test.tsx diff --git a/packages/plugins/data-visualization/src/client/__tests__/hooks.test.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/__tests__/hooks.test.ts similarity index 99% rename from packages/plugins/data-visualization/src/client/__tests__/hooks.test.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/__tests__/hooks.test.ts index d2db9785b..12e45b09b 100644 --- a/packages/plugins/data-visualization/src/client/__tests__/hooks.test.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/__tests__/hooks.test.ts @@ -63,7 +63,7 @@ describe('hooks', () => { type: 'string', }, ], - }[name]), + })[name], getInterface: (i: string) => { switch (i) { case 'm2o': diff --git a/packages/plugins/data-visualization/src/client/block/ChartBlock.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlock.tsx similarity index 100% rename from packages/plugins/data-visualization/src/client/block/ChartBlock.tsx rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlock.tsx diff --git a/packages/plugins/data-visualization/src/client/block/ChartBlockDesigner.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlockDesigner.tsx similarity index 100% rename from packages/plugins/data-visualization/src/client/block/ChartBlockDesigner.tsx rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlockDesigner.tsx diff --git a/packages/plugins/data-visualization/src/client/block/ChartBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlockInitializer.tsx similarity index 100% rename from packages/plugins/data-visualization/src/client/block/ChartBlockInitializer.tsx rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/block/ChartBlockInitializer.tsx diff --git a/packages/plugins/data-visualization/src/client/block/formatters.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/formatters.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/block/formatters.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/block/formatters.ts diff --git a/packages/plugins/data-visualization/src/client/block/index.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/index.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/block/index.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/block/index.ts diff --git a/packages/plugins/data-visualization/src/client/block/transformers.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/transformers.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/block/transformers.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/block/transformers.ts diff --git a/packages/plugins/data-visualization/src/client/chart/antd/antd.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/antd.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/chart/antd/antd.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/antd.ts diff --git a/packages/plugins/data-visualization/src/client/chart/antd/index.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/index.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/chart/antd/index.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/index.ts diff --git a/packages/plugins/data-visualization/src/client/chart/antd/statistic.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/statistic.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/chart/antd/statistic.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/statistic.ts diff --git a/packages/plugins/data-visualization/src/client/chart/antd/table.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/table.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/chart/antd/table.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/table.ts diff --git a/packages/plugins/data-visualization/src/client/chart/chart.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/chart.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/chart/chart.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/chart.ts diff --git a/packages/plugins/data-visualization/src/client/chart/configs.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/configs.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/chart/configs.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/configs.ts diff --git a/packages/plugins/data-visualization/src/client/chart/g2plot/bar.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/bar.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/chart/g2plot/bar.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/bar.ts diff --git a/packages/plugins/data-visualization/src/client/chart/g2plot/configs.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/configs.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/chart/g2plot/configs.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/configs.ts diff --git a/packages/plugins/data-visualization/src/client/chart/g2plot/dualAxes.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/dualAxes.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/chart/g2plot/dualAxes.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/dualAxes.ts diff --git a/packages/plugins/data-visualization/src/client/chart/g2plot/g2plot.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/g2plot.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/chart/g2plot/g2plot.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/g2plot.ts diff --git a/packages/plugins/data-visualization/src/client/chart/g2plot/index.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/index.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/chart/g2plot/index.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/index.ts diff --git a/packages/plugins/data-visualization/src/client/chart/g2plot/pie.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/pie.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/chart/g2plot/pie.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/pie.ts diff --git a/packages/plugins/data-visualization/src/client/chart/library.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/library.tsx similarity index 100% rename from packages/plugins/data-visualization/src/client/chart/library.tsx rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/library.tsx diff --git a/packages/plugins/data-visualization/src/client/configure/ChartConfigure.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/ChartConfigure.tsx similarity index 100% rename from packages/plugins/data-visualization/src/client/configure/ChartConfigure.tsx rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/ChartConfigure.tsx diff --git a/packages/plugins/data-visualization/src/client/configure/FilterDynamicComponent.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/FilterDynamicComponent.tsx similarity index 100% rename from packages/plugins/data-visualization/src/client/configure/FilterDynamicComponent.tsx rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/FilterDynamicComponent.tsx diff --git a/packages/plugins/data-visualization/src/client/configure/schemas/configure.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/schemas/configure.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/configure/schemas/configure.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/schemas/configure.ts diff --git a/packages/plugins/data-visualization/src/client/hooks/index.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/index.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/hooks/index.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/index.ts diff --git a/packages/plugins/data-visualization/src/client/hooks/query.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/query.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/hooks/query.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/query.ts diff --git a/packages/plugins/data-visualization/src/client/hooks/transformer.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/transformer.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/hooks/transformer.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/transformer.ts diff --git a/packages/plugins/data-visualization/src/client/hooks/useDateVariable.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/useDateVariable.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/hooks/useDateVariable.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/useDateVariable.ts diff --git a/packages/plugins/data-visualization/src/client/hooks/useUserVariable.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/useUserVariable.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/hooks/useUserVariable.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/useUserVariable.ts diff --git a/packages/plugins/data-visualization/src/client/hooks/useVariableOptions.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/useVariableOptions.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/hooks/useVariableOptions.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/useVariableOptions.ts diff --git a/packages/plugins/data-visualization/src/client/index.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/index.tsx similarity index 100% rename from packages/plugins/data-visualization/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/index.tsx diff --git a/packages/plugins/data-visualization/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/locale/index.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/locale/index.ts diff --git a/packages/plugins/data-visualization/src/client/renderer/ChartRenderer.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRenderer.tsx similarity index 100% rename from packages/plugins/data-visualization/src/client/renderer/ChartRenderer.tsx rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRenderer.tsx diff --git a/packages/plugins/data-visualization/src/client/renderer/ChartRendererProvider.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRendererProvider.tsx similarity index 100% rename from packages/plugins/data-visualization/src/client/renderer/ChartRendererProvider.tsx rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRendererProvider.tsx diff --git a/packages/plugins/data-visualization/src/client/renderer/index.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/index.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/renderer/index.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/index.ts diff --git a/packages/plugins/data-visualization/src/client/utils.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/utils.ts similarity index 100% rename from packages/plugins/data-visualization/src/client/utils.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/utils.ts diff --git a/packages/plugins/data-visualization/src/index.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/index.ts similarity index 100% rename from packages/plugins/data-visualization/src/index.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/index.ts diff --git a/packages/plugins/data-visualization/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/locale/en-US.ts similarity index 100% rename from packages/plugins/data-visualization/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/locale/en-US.ts diff --git a/packages/plugins/data-visualization/src/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/locale/fr-FR.ts similarity index 100% rename from packages/plugins/data-visualization/src/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/locale/fr-FR.ts diff --git a/packages/plugins/data-visualization/src/locale/ja-JP.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/locale/ja-JP.ts similarity index 100% rename from packages/plugins/data-visualization/src/locale/ja-JP.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/locale/ja-JP.ts diff --git a/packages/plugins/data-visualization/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/data-visualization/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/locale/pt-BR.ts diff --git a/packages/plugins/data-visualization/src/locale/ru-RU.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/locale/ru-RU.ts similarity index 100% rename from packages/plugins/data-visualization/src/locale/ru-RU.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/locale/ru-RU.ts diff --git a/packages/plugins/data-visualization/src/locale/tr-TR.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/locale/tr-TR.ts similarity index 100% rename from packages/plugins/data-visualization/src/locale/tr-TR.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/locale/tr-TR.ts diff --git a/packages/plugins/data-visualization/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/data-visualization/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/locale/zh-CN.ts diff --git a/packages/plugins/data-visualization/src/server/__tests__/api.test.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/server/__tests__/api.test.ts similarity index 100% rename from packages/plugins/data-visualization/src/server/__tests__/api.test.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/server/__tests__/api.test.ts diff --git a/packages/plugins/data-visualization/src/server/__tests__/formatter.test.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/server/__tests__/formatter.test.ts similarity index 100% rename from packages/plugins/data-visualization/src/server/__tests__/formatter.test.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/server/__tests__/formatter.test.ts diff --git a/packages/plugins/data-visualization/src/server/__tests__/query.test.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/server/__tests__/query.test.ts similarity index 100% rename from packages/plugins/data-visualization/src/server/__tests__/query.test.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/server/__tests__/query.test.ts diff --git a/packages/plugins/data-visualization/src/server/actions/formatter.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/server/actions/formatter.ts similarity index 100% rename from packages/plugins/data-visualization/src/server/actions/formatter.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/server/actions/formatter.ts diff --git a/packages/plugins/data-visualization/src/server/actions/query.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/server/actions/query.ts similarity index 100% rename from packages/plugins/data-visualization/src/server/actions/query.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/server/actions/query.ts diff --git a/packages/plugins/data-visualization/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-data-visualization/src/server/collections/.gitkeep similarity index 100% rename from packages/plugins/data-visualization/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-data-visualization/src/server/collections/.gitkeep diff --git a/packages/plugins/data-visualization/src/server/index.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/server/index.ts similarity index 100% rename from packages/plugins/data-visualization/src/server/index.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/server/index.ts diff --git a/packages/plugins/data-visualization/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/server/plugin.ts similarity index 100% rename from packages/plugins/data-visualization/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/server/plugin.ts diff --git a/packages/plugins/data-visualization/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/swagger/index.ts similarity index 100% rename from packages/plugins/data-visualization/src/swagger/index.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/swagger/index.ts diff --git a/packages/plugins/duplicator/.npmignore b/packages/plugins/@nocobase/plugin-duplicator/.npmignore similarity index 100% rename from packages/plugins/duplicator/.npmignore rename to packages/plugins/@nocobase/plugin-duplicator/.npmignore diff --git a/packages/plugins/duplicator/LICENSE b/packages/plugins/@nocobase/plugin-duplicator/LICENSE similarity index 100% rename from packages/plugins/duplicator/LICENSE rename to packages/plugins/@nocobase/plugin-duplicator/LICENSE diff --git a/packages/plugins/duplicator/README.md b/packages/plugins/@nocobase/plugin-duplicator/README.md similarity index 100% rename from packages/plugins/duplicator/README.md rename to packages/plugins/@nocobase/plugin-duplicator/README.md diff --git a/packages/plugins/duplicator/README.zh-CN.md b/packages/plugins/@nocobase/plugin-duplicator/README.zh-CN.md similarity index 100% rename from packages/plugins/duplicator/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-duplicator/README.zh-CN.md diff --git a/packages/plugins/duplicator/client.d.ts b/packages/plugins/@nocobase/plugin-duplicator/client.d.ts similarity index 100% rename from packages/plugins/duplicator/client.d.ts rename to packages/plugins/@nocobase/plugin-duplicator/client.d.ts diff --git a/packages/plugins/duplicator/client.js b/packages/plugins/@nocobase/plugin-duplicator/client.js similarity index 100% rename from packages/plugins/duplicator/client.js rename to packages/plugins/@nocobase/plugin-duplicator/client.js diff --git a/packages/plugins/duplicator/package.json b/packages/plugins/@nocobase/plugin-duplicator/package.json similarity index 100% rename from packages/plugins/duplicator/package.json rename to packages/plugins/@nocobase/plugin-duplicator/package.json diff --git a/packages/plugins/duplicator/server.d.ts b/packages/plugins/@nocobase/plugin-duplicator/server.d.ts similarity index 100% rename from packages/plugins/duplicator/server.d.ts rename to packages/plugins/@nocobase/plugin-duplicator/server.d.ts diff --git a/packages/plugins/duplicator/server.js b/packages/plugins/@nocobase/plugin-duplicator/server.js similarity index 100% rename from packages/plugins/duplicator/server.js rename to packages/plugins/@nocobase/plugin-duplicator/server.js diff --git a/packages/plugins/duplicator/src/client/DuplicatorProvider.tsx b/packages/plugins/@nocobase/plugin-duplicator/src/client/DuplicatorProvider.tsx similarity index 100% rename from packages/plugins/duplicator/src/client/DuplicatorProvider.tsx rename to packages/plugins/@nocobase/plugin-duplicator/src/client/DuplicatorProvider.tsx diff --git a/packages/plugins/duplicator/src/client/index.tsx b/packages/plugins/@nocobase/plugin-duplicator/src/client/index.tsx similarity index 100% rename from packages/plugins/duplicator/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-duplicator/src/client/index.tsx diff --git a/packages/plugins/duplicator/src/index.ts b/packages/plugins/@nocobase/plugin-duplicator/src/index.ts similarity index 100% rename from packages/plugins/duplicator/src/index.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/index.ts diff --git a/packages/plugins/duplicator/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-duplicator/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/duplicator/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/locale/zh-CN.ts diff --git a/packages/plugins/duplicator/src/server/__tests__/api.test.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/__tests__/api.test.ts similarity index 100% rename from packages/plugins/duplicator/src/server/__tests__/api.test.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/__tests__/api.test.ts diff --git a/packages/plugins/duplicator/src/server/__tests__/collection-group-manager.test.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/__tests__/collection-group-manager.test.ts similarity index 100% rename from packages/plugins/duplicator/src/server/__tests__/collection-group-manager.test.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/__tests__/collection-group-manager.test.ts diff --git a/packages/plugins/duplicator/src/server/__tests__/dump-action.test.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/__tests__/dump-action.test.ts similarity index 100% rename from packages/plugins/duplicator/src/server/__tests__/dump-action.test.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/__tests__/dump-action.test.ts diff --git a/packages/plugins/duplicator/src/server/__tests__/dumper.test.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/__tests__/dumper.test.ts similarity index 100% rename from packages/plugins/duplicator/src/server/__tests__/dumper.test.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/__tests__/dumper.test.ts diff --git a/packages/plugins/duplicator/src/server/__tests__/fixtures/dump.nbdump.fixture b/packages/plugins/@nocobase/plugin-duplicator/src/server/__tests__/fixtures/dump.nbdump.fixture similarity index 100% rename from packages/plugins/duplicator/src/server/__tests__/fixtures/dump.nbdump.fixture rename to packages/plugins/@nocobase/plugin-duplicator/src/server/__tests__/fixtures/dump.nbdump.fixture diff --git a/packages/plugins/duplicator/src/server/__tests__/index.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/__tests__/index.ts similarity index 100% rename from packages/plugins/duplicator/src/server/__tests__/index.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/__tests__/index.ts diff --git a/packages/plugins/duplicator/src/server/actions/dump-action.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/actions/dump-action.ts similarity index 100% rename from packages/plugins/duplicator/src/server/actions/dump-action.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/actions/dump-action.ts diff --git a/packages/plugins/duplicator/src/server/actions/dumpable-collections-action.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/actions/dumpable-collections-action.ts similarity index 100% rename from packages/plugins/duplicator/src/server/actions/dumpable-collections-action.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/actions/dumpable-collections-action.ts diff --git a/packages/plugins/duplicator/src/server/actions/get-app.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/actions/get-app.ts similarity index 100% rename from packages/plugins/duplicator/src/server/actions/get-app.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/actions/get-app.ts diff --git a/packages/plugins/duplicator/src/server/actions/get-dict-action.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/actions/get-dict-action.ts similarity index 100% rename from packages/plugins/duplicator/src/server/actions/get-dict-action.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/actions/get-dict-action.ts diff --git a/packages/plugins/duplicator/src/server/actions/restore-action.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/actions/restore-action.ts similarity index 100% rename from packages/plugins/duplicator/src/server/actions/restore-action.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/actions/restore-action.ts diff --git a/packages/plugins/duplicator/src/server/app-migrator.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/app-migrator.ts similarity index 100% rename from packages/plugins/duplicator/src/server/app-migrator.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/app-migrator.ts diff --git a/packages/plugins/duplicator/src/server/collection-group-manager.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/collection-group-manager.ts similarity index 100% rename from packages/plugins/duplicator/src/server/collection-group-manager.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/collection-group-manager.ts diff --git a/packages/plugins/duplicator/src/server/commands/dump-command.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/commands/dump-command.ts similarity index 100% rename from packages/plugins/duplicator/src/server/commands/dump-command.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/commands/dump-command.ts diff --git a/packages/plugins/duplicator/src/server/commands/inquire-question-builder.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/commands/inquire-question-builder.ts similarity index 100% rename from packages/plugins/duplicator/src/server/commands/inquire-question-builder.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/commands/inquire-question-builder.ts diff --git a/packages/plugins/duplicator/src/server/commands/restore-command.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/commands/restore-command.ts similarity index 100% rename from packages/plugins/duplicator/src/server/commands/restore-command.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/commands/restore-command.ts diff --git a/packages/plugins/duplicator/src/server/dumper.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/dumper.ts similarity index 100% rename from packages/plugins/duplicator/src/server/dumper.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/dumper.ts diff --git a/packages/plugins/duplicator/src/server/field-value-writer.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/field-value-writer.ts similarity index 100% rename from packages/plugins/duplicator/src/server/field-value-writer.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/field-value-writer.ts diff --git a/packages/plugins/duplicator/src/server/index.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/index.ts similarity index 100% rename from packages/plugins/duplicator/src/server/index.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/index.ts diff --git a/packages/plugins/duplicator/src/server/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/locale/zh-CN.ts similarity index 100% rename from packages/plugins/duplicator/src/server/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/locale/zh-CN.ts diff --git a/packages/plugins/duplicator/src/server/restorer.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/restorer.ts similarity index 100% rename from packages/plugins/duplicator/src/server/restorer.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/restorer.ts diff --git a/packages/plugins/duplicator/src/server/server.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/server.ts similarity index 100% rename from packages/plugins/duplicator/src/server/server.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/server.ts diff --git a/packages/plugins/duplicator/src/server/utils.ts b/packages/plugins/@nocobase/plugin-duplicator/src/server/utils.ts similarity index 100% rename from packages/plugins/duplicator/src/server/utils.ts rename to packages/plugins/@nocobase/plugin-duplicator/src/server/utils.ts diff --git a/packages/plugins/error-handler/.npmignore b/packages/plugins/@nocobase/plugin-error-handler/.npmignore similarity index 100% rename from packages/plugins/error-handler/.npmignore rename to packages/plugins/@nocobase/plugin-error-handler/.npmignore diff --git a/packages/plugins/error-handler/LICENSE b/packages/plugins/@nocobase/plugin-error-handler/LICENSE similarity index 100% rename from packages/plugins/error-handler/LICENSE rename to packages/plugins/@nocobase/plugin-error-handler/LICENSE diff --git a/packages/plugins/error-handler/README.md b/packages/plugins/@nocobase/plugin-error-handler/README.md similarity index 100% rename from packages/plugins/error-handler/README.md rename to packages/plugins/@nocobase/plugin-error-handler/README.md diff --git a/packages/plugins/error-handler/README.zh-CN.md b/packages/plugins/@nocobase/plugin-error-handler/README.zh-CN.md similarity index 100% rename from packages/plugins/error-handler/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-error-handler/README.zh-CN.md diff --git a/packages/plugins/error-handler/client.d.ts b/packages/plugins/@nocobase/plugin-error-handler/client.d.ts similarity index 100% rename from packages/plugins/error-handler/client.d.ts rename to packages/plugins/@nocobase/plugin-error-handler/client.d.ts diff --git a/packages/plugins/error-handler/client.js b/packages/plugins/@nocobase/plugin-error-handler/client.js similarity index 100% rename from packages/plugins/error-handler/client.js rename to packages/plugins/@nocobase/plugin-error-handler/client.js diff --git a/packages/plugins/error-handler/package.json b/packages/plugins/@nocobase/plugin-error-handler/package.json similarity index 95% rename from packages/plugins/error-handler/package.json rename to packages/plugins/@nocobase/plugin-error-handler/package.json index 8b0063e06..b26774c54 100644 --- a/packages/plugins/error-handler/package.json +++ b/packages/plugins/@nocobase/plugin-error-handler/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-error-handler", - "displayName": "error handler", + "displayName": "Error handler", "displayName.zh-CN": "错误处理器", "description": "Handling application errors and exceptions", "description.zh-CN": "处理应用程序中的错误和异常", diff --git a/packages/plugins/error-handler/server.d.ts b/packages/plugins/@nocobase/plugin-error-handler/server.d.ts similarity index 100% rename from packages/plugins/error-handler/server.d.ts rename to packages/plugins/@nocobase/plugin-error-handler/server.d.ts diff --git a/packages/plugins/error-handler/server.js b/packages/plugins/@nocobase/plugin-error-handler/server.js similarity index 100% rename from packages/plugins/error-handler/server.js rename to packages/plugins/@nocobase/plugin-error-handler/server.js diff --git a/packages/plugins/error-handler/src/client/index.ts b/packages/plugins/@nocobase/plugin-error-handler/src/client/index.ts similarity index 86% rename from packages/plugins/error-handler/src/client/index.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/client/index.ts index 41503bf1c..057d6ad21 100644 --- a/packages/plugins/error-handler/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-error-handler/src/client/index.ts @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; class ErrorHandlerPlugin extends Plugin { - async load() { } + async load() {} } export default ErrorHandlerPlugin; diff --git a/packages/plugins/error-handler/src/index.ts b/packages/plugins/@nocobase/plugin-error-handler/src/index.ts similarity index 100% rename from packages/plugins/error-handler/src/index.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/index.ts diff --git a/packages/plugins/error-handler/src/locale/en_US.ts b/packages/plugins/@nocobase/plugin-error-handler/src/locale/en_US.ts similarity index 100% rename from packages/plugins/error-handler/src/locale/en_US.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/locale/en_US.ts diff --git a/packages/plugins/error-handler/src/locale/es-ES.ts b/packages/plugins/@nocobase/plugin-error-handler/src/locale/es-ES.ts similarity index 100% rename from packages/plugins/error-handler/src/locale/es-ES.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/locale/es-ES.ts diff --git a/packages/plugins/error-handler/src/locale/fr_FR.ts b/packages/plugins/@nocobase/plugin-error-handler/src/locale/fr_FR.ts similarity index 100% rename from packages/plugins/error-handler/src/locale/fr_FR.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/locale/fr_FR.ts diff --git a/packages/plugins/error-handler/src/locale/ja_JP.ts b/packages/plugins/@nocobase/plugin-error-handler/src/locale/ja_JP.ts similarity index 100% rename from packages/plugins/error-handler/src/locale/ja_JP.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/locale/ja_JP.ts diff --git a/packages/plugins/error-handler/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-error-handler/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/error-handler/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/locale/pt-BR.ts diff --git a/packages/plugins/error-handler/src/locale/zh_CN.ts b/packages/plugins/@nocobase/plugin-error-handler/src/locale/zh_CN.ts similarity index 100% rename from packages/plugins/error-handler/src/locale/zh_CN.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/locale/zh_CN.ts diff --git a/packages/plugins/error-handler/src/server/__tests__/render-error.test.ts b/packages/plugins/@nocobase/plugin-error-handler/src/server/__tests__/render-error.test.ts similarity index 100% rename from packages/plugins/error-handler/src/server/__tests__/render-error.test.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/server/__tests__/render-error.test.ts diff --git a/packages/plugins/error-handler/src/server/error-handler.ts b/packages/plugins/@nocobase/plugin-error-handler/src/server/error-handler.ts similarity index 100% rename from packages/plugins/error-handler/src/server/error-handler.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/server/error-handler.ts diff --git a/packages/plugins/error-handler/src/server/index.ts b/packages/plugins/@nocobase/plugin-error-handler/src/server/index.ts similarity index 100% rename from packages/plugins/error-handler/src/server/index.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/server/index.ts diff --git a/packages/plugins/error-handler/src/server/locale/en_US.ts b/packages/plugins/@nocobase/plugin-error-handler/src/server/locale/en_US.ts similarity index 100% rename from packages/plugins/error-handler/src/server/locale/en_US.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/server/locale/en_US.ts diff --git a/packages/plugins/error-handler/src/server/locale/es-ES.ts b/packages/plugins/@nocobase/plugin-error-handler/src/server/locale/es-ES.ts similarity index 100% rename from packages/plugins/error-handler/src/server/locale/es-ES.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/server/locale/es-ES.ts diff --git a/packages/plugins/error-handler/src/server/locale/fr_FR.ts b/packages/plugins/@nocobase/plugin-error-handler/src/server/locale/fr_FR.ts similarity index 100% rename from packages/plugins/error-handler/src/server/locale/fr_FR.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/server/locale/fr_FR.ts diff --git a/packages/plugins/error-handler/src/server/locale/ja_JP.ts b/packages/plugins/@nocobase/plugin-error-handler/src/server/locale/ja_JP.ts similarity index 100% rename from packages/plugins/error-handler/src/server/locale/ja_JP.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/server/locale/ja_JP.ts diff --git a/packages/plugins/error-handler/src/server/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-error-handler/src/server/locale/pt-BR.ts similarity index 100% rename from packages/plugins/error-handler/src/server/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/server/locale/pt-BR.ts diff --git a/packages/plugins/error-handler/src/server/locale/zh_CN.ts b/packages/plugins/@nocobase/plugin-error-handler/src/server/locale/zh_CN.ts similarity index 100% rename from packages/plugins/error-handler/src/server/locale/zh_CN.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/server/locale/zh_CN.ts diff --git a/packages/plugins/error-handler/src/server/server.ts b/packages/plugins/@nocobase/plugin-error-handler/src/server/server.ts similarity index 100% rename from packages/plugins/error-handler/src/server/server.ts rename to packages/plugins/@nocobase/plugin-error-handler/src/server/server.ts diff --git a/packages/plugins/excel-formula-field/.npmignore b/packages/plugins/@nocobase/plugin-excel-formula-field/.npmignore similarity index 100% rename from packages/plugins/excel-formula-field/.npmignore rename to packages/plugins/@nocobase/plugin-excel-formula-field/.npmignore diff --git a/packages/plugins/excel-formula-field/LICENSE b/packages/plugins/@nocobase/plugin-excel-formula-field/LICENSE similarity index 100% rename from packages/plugins/excel-formula-field/LICENSE rename to packages/plugins/@nocobase/plugin-excel-formula-field/LICENSE diff --git a/packages/plugins/excel-formula-field/README.md b/packages/plugins/@nocobase/plugin-excel-formula-field/README.md similarity index 100% rename from packages/plugins/excel-formula-field/README.md rename to packages/plugins/@nocobase/plugin-excel-formula-field/README.md diff --git a/packages/plugins/excel-formula-field/README.zh-CN.md b/packages/plugins/@nocobase/plugin-excel-formula-field/README.zh-CN.md similarity index 100% rename from packages/plugins/excel-formula-field/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-excel-formula-field/README.zh-CN.md diff --git a/packages/plugins/excel-formula-field/client.d.ts b/packages/plugins/@nocobase/plugin-excel-formula-field/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/excel-formula-field/client.d.ts rename to packages/plugins/@nocobase/plugin-excel-formula-field/client.d.ts diff --git a/packages/plugins/excel-formula-field/client.js b/packages/plugins/@nocobase/plugin-excel-formula-field/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/excel-formula-field/client.js rename to packages/plugins/@nocobase/plugin-excel-formula-field/client.js diff --git a/packages/plugins/excel-formula-field/package.json b/packages/plugins/@nocobase/plugin-excel-formula-field/package.json similarity index 100% rename from packages/plugins/excel-formula-field/package.json rename to packages/plugins/@nocobase/plugin-excel-formula-field/package.json diff --git a/packages/plugins/excel-formula-field/server.d.ts b/packages/plugins/@nocobase/plugin-excel-formula-field/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/excel-formula-field/server.d.ts rename to packages/plugins/@nocobase/plugin-excel-formula-field/server.d.ts diff --git a/packages/plugins/excel-formula-field/server.js b/packages/plugins/@nocobase/plugin-excel-formula-field/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/excel-formula-field/server.js rename to packages/plugins/@nocobase/plugin-excel-formula-field/server.js diff --git a/packages/plugins/excel-formula-field/src/client/ExcelFormula/index.ts b/packages/plugins/@nocobase/plugin-excel-formula-field/src/client/ExcelFormula/index.ts similarity index 100% rename from packages/plugins/excel-formula-field/src/client/ExcelFormula/index.ts rename to packages/plugins/@nocobase/plugin-excel-formula-field/src/client/ExcelFormula/index.ts diff --git a/packages/plugins/excel-formula-field/src/client/ExcelFormulaFieldProvider.tsx b/packages/plugins/@nocobase/plugin-excel-formula-field/src/client/ExcelFormulaFieldProvider.tsx similarity index 100% rename from packages/plugins/excel-formula-field/src/client/ExcelFormulaFieldProvider.tsx rename to packages/plugins/@nocobase/plugin-excel-formula-field/src/client/ExcelFormulaFieldProvider.tsx diff --git a/packages/plugins/excel-formula-field/src/client/excel-formula.ts b/packages/plugins/@nocobase/plugin-excel-formula-field/src/client/excel-formula.ts similarity index 100% rename from packages/plugins/excel-formula-field/src/client/excel-formula.ts rename to packages/plugins/@nocobase/plugin-excel-formula-field/src/client/excel-formula.ts diff --git a/packages/plugins/excel-formula-field/src/client/index.tsx b/packages/plugins/@nocobase/plugin-excel-formula-field/src/client/index.tsx similarity index 100% rename from packages/plugins/excel-formula-field/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-excel-formula-field/src/client/index.tsx diff --git a/packages/plugins/excel-formula-field/src/index.ts b/packages/plugins/@nocobase/plugin-excel-formula-field/src/index.ts similarity index 100% rename from packages/plugins/excel-formula-field/src/index.ts rename to packages/plugins/@nocobase/plugin-excel-formula-field/src/index.ts diff --git a/packages/plugins/excel-formula-field/src/server/excel-formula-field.ts b/packages/plugins/@nocobase/plugin-excel-formula-field/src/server/excel-formula-field.ts similarity index 100% rename from packages/plugins/excel-formula-field/src/server/excel-formula-field.ts rename to packages/plugins/@nocobase/plugin-excel-formula-field/src/server/excel-formula-field.ts diff --git a/packages/plugins/excel-formula-field/src/server/index.ts b/packages/plugins/@nocobase/plugin-excel-formula-field/src/server/index.ts similarity index 100% rename from packages/plugins/excel-formula-field/src/server/index.ts rename to packages/plugins/@nocobase/plugin-excel-formula-field/src/server/index.ts diff --git a/packages/plugins/excel-formula-field/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-excel-formula-field/src/server/plugin.ts similarity index 100% rename from packages/plugins/excel-formula-field/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-excel-formula-field/src/server/plugin.ts diff --git a/packages/plugins/excel-formula-field/src/utils/evaluate.ts b/packages/plugins/@nocobase/plugin-excel-formula-field/src/utils/evaluate.ts similarity index 100% rename from packages/plugins/excel-formula-field/src/utils/evaluate.ts rename to packages/plugins/@nocobase/plugin-excel-formula-field/src/utils/evaluate.ts diff --git a/packages/plugins/export/.npmignore b/packages/plugins/@nocobase/plugin-export/.npmignore similarity index 100% rename from packages/plugins/export/.npmignore rename to packages/plugins/@nocobase/plugin-export/.npmignore diff --git a/packages/plugins/export/LICENSE b/packages/plugins/@nocobase/plugin-export/LICENSE similarity index 100% rename from packages/plugins/export/LICENSE rename to packages/plugins/@nocobase/plugin-export/LICENSE diff --git a/packages/plugins/export/README.md b/packages/plugins/@nocobase/plugin-export/README.md similarity index 100% rename from packages/plugins/export/README.md rename to packages/plugins/@nocobase/plugin-export/README.md diff --git a/packages/plugins/export/README.zh-CN.md b/packages/plugins/@nocobase/plugin-export/README.zh-CN.md similarity index 100% rename from packages/plugins/export/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-export/README.zh-CN.md diff --git a/packages/plugins/export/client.d.ts b/packages/plugins/@nocobase/plugin-export/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/export/client.d.ts rename to packages/plugins/@nocobase/plugin-export/client.d.ts diff --git a/packages/plugins/export/client.js b/packages/plugins/@nocobase/plugin-export/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/export/client.js rename to packages/plugins/@nocobase/plugin-export/client.js diff --git a/packages/plugins/export/package.json b/packages/plugins/@nocobase/plugin-export/package.json similarity index 78% rename from packages/plugins/export/package.json rename to packages/plugins/@nocobase/plugin-export/package.json index dfbef21cc..bf29ad2e8 100644 --- a/packages/plugins/export/package.json +++ b/packages/plugins/@nocobase/plugin-export/package.json @@ -1,9 +1,9 @@ { "name": "@nocobase/plugin-export", - "displayName": "Export", - "displayName.zh-CN": "导出", - "description": "Export collection records to Excel table", - "description.zh-CN": "导出数据表记录为 Excel 表格", + "displayName": "Data export", + "displayName.zh-CN": "数据导出", + "description": "Export data in excel format", + "description.zh-CN": "导出 excel 格式的数据", "version": "0.13.0-alpha.10", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/export/server.d.ts b/packages/plugins/@nocobase/plugin-export/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/export/server.d.ts rename to packages/plugins/@nocobase/plugin-export/server.d.ts diff --git a/packages/plugins/export/server.js b/packages/plugins/@nocobase/plugin-export/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/export/server.js rename to packages/plugins/@nocobase/plugin-export/server.js diff --git a/packages/plugins/export/src/client/ExportActionInitializer.tsx b/packages/plugins/@nocobase/plugin-export/src/client/ExportActionInitializer.tsx similarity index 100% rename from packages/plugins/export/src/client/ExportActionInitializer.tsx rename to packages/plugins/@nocobase/plugin-export/src/client/ExportActionInitializer.tsx diff --git a/packages/plugins/export/src/client/ExportDesigner.tsx b/packages/plugins/@nocobase/plugin-export/src/client/ExportDesigner.tsx similarity index 100% rename from packages/plugins/export/src/client/ExportDesigner.tsx rename to packages/plugins/@nocobase/plugin-export/src/client/ExportDesigner.tsx diff --git a/packages/plugins/export/src/client/ExportInitializerProvider.tsx b/packages/plugins/@nocobase/plugin-export/src/client/ExportInitializerProvider.tsx similarity index 100% rename from packages/plugins/export/src/client/ExportInitializerProvider.tsx rename to packages/plugins/@nocobase/plugin-export/src/client/ExportInitializerProvider.tsx diff --git a/packages/plugins/export/src/client/ExportPluginProvider.tsx b/packages/plugins/@nocobase/plugin-export/src/client/ExportPluginProvider.tsx similarity index 100% rename from packages/plugins/export/src/client/ExportPluginProvider.tsx rename to packages/plugins/@nocobase/plugin-export/src/client/ExportPluginProvider.tsx diff --git a/packages/plugins/export/src/client/index.ts b/packages/plugins/@nocobase/plugin-export/src/client/index.ts similarity index 100% rename from packages/plugins/export/src/client/index.ts rename to packages/plugins/@nocobase/plugin-export/src/client/index.ts diff --git a/packages/plugins/export/src/client/useExportAction.ts b/packages/plugins/@nocobase/plugin-export/src/client/useExportAction.ts similarity index 100% rename from packages/plugins/export/src/client/useExportAction.ts rename to packages/plugins/@nocobase/plugin-export/src/client/useExportAction.ts diff --git a/packages/plugins/export/src/client/useFields.ts b/packages/plugins/@nocobase/plugin-export/src/client/useFields.ts similarity index 100% rename from packages/plugins/export/src/client/useFields.ts rename to packages/plugins/@nocobase/plugin-export/src/client/useFields.ts diff --git a/packages/plugins/export/src/client/useShared.ts b/packages/plugins/@nocobase/plugin-export/src/client/useShared.ts similarity index 100% rename from packages/plugins/export/src/client/useShared.ts rename to packages/plugins/@nocobase/plugin-export/src/client/useShared.ts diff --git a/packages/plugins/export/src/index.ts b/packages/plugins/@nocobase/plugin-export/src/index.ts similarity index 100% rename from packages/plugins/export/src/index.ts rename to packages/plugins/@nocobase/plugin-export/src/index.ts diff --git a/packages/plugins/export/src/server/__tests__/utils/utils.test.ts b/packages/plugins/@nocobase/plugin-export/src/server/__tests__/utils/utils.test.ts similarity index 100% rename from packages/plugins/export/src/server/__tests__/utils/utils.test.ts rename to packages/plugins/@nocobase/plugin-export/src/server/__tests__/utils/utils.test.ts diff --git a/packages/plugins/export/src/server/actions/.gitkeep b/packages/plugins/@nocobase/plugin-export/src/server/actions/.gitkeep similarity index 100% rename from packages/plugins/export/src/server/actions/.gitkeep rename to packages/plugins/@nocobase/plugin-export/src/server/actions/.gitkeep diff --git a/packages/plugins/export/src/server/actions/export-xlsx.ts b/packages/plugins/@nocobase/plugin-export/src/server/actions/export-xlsx.ts similarity index 100% rename from packages/plugins/export/src/server/actions/export-xlsx.ts rename to packages/plugins/@nocobase/plugin-export/src/server/actions/export-xlsx.ts diff --git a/packages/plugins/export/src/server/actions/index.ts b/packages/plugins/@nocobase/plugin-export/src/server/actions/index.ts similarity index 100% rename from packages/plugins/export/src/server/actions/index.ts rename to packages/plugins/@nocobase/plugin-export/src/server/actions/index.ts diff --git a/packages/plugins/export/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-export/src/server/collections/.gitkeep similarity index 100% rename from packages/plugins/export/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-export/src/server/collections/.gitkeep diff --git a/packages/plugins/export/src/server/index.ts b/packages/plugins/@nocobase/plugin-export/src/server/index.ts similarity index 100% rename from packages/plugins/export/src/server/index.ts rename to packages/plugins/@nocobase/plugin-export/src/server/index.ts diff --git a/packages/plugins/export/src/server/models/.gitkeep b/packages/plugins/@nocobase/plugin-export/src/server/models/.gitkeep similarity index 100% rename from packages/plugins/export/src/server/models/.gitkeep rename to packages/plugins/@nocobase/plugin-export/src/server/models/.gitkeep diff --git a/packages/plugins/export/src/server/renders/index.ts b/packages/plugins/@nocobase/plugin-export/src/server/renders/index.ts similarity index 100% rename from packages/plugins/export/src/server/renders/index.ts rename to packages/plugins/@nocobase/plugin-export/src/server/renders/index.ts diff --git a/packages/plugins/export/src/server/renders/renders.ts b/packages/plugins/@nocobase/plugin-export/src/server/renders/renders.ts similarity index 100% rename from packages/plugins/export/src/server/renders/renders.ts rename to packages/plugins/@nocobase/plugin-export/src/server/renders/renders.ts diff --git a/packages/plugins/export/src/server/repositories/.gitkeep b/packages/plugins/@nocobase/plugin-export/src/server/repositories/.gitkeep similarity index 100% rename from packages/plugins/export/src/server/repositories/.gitkeep rename to packages/plugins/@nocobase/plugin-export/src/server/repositories/.gitkeep diff --git a/packages/plugins/export/src/server/utils/columns2Appends.ts b/packages/plugins/@nocobase/plugin-export/src/server/utils/columns2Appends.ts similarity index 100% rename from packages/plugins/export/src/server/utils/columns2Appends.ts rename to packages/plugins/@nocobase/plugin-export/src/server/utils/columns2Appends.ts diff --git a/packages/plugins/export/src/server/utils/index.ts b/packages/plugins/@nocobase/plugin-export/src/server/utils/index.ts similarity index 100% rename from packages/plugins/export/src/server/utils/index.ts rename to packages/plugins/@nocobase/plugin-export/src/server/utils/index.ts diff --git a/packages/plugins/export/src/swagger/index.json b/packages/plugins/@nocobase/plugin-export/src/swagger/index.json similarity index 100% rename from packages/plugins/export/src/swagger/index.json rename to packages/plugins/@nocobase/plugin-export/src/swagger/index.json diff --git a/packages/plugins/file-manager/.npmignore b/packages/plugins/@nocobase/plugin-file-manager/.npmignore similarity index 100% rename from packages/plugins/file-manager/.npmignore rename to packages/plugins/@nocobase/plugin-file-manager/.npmignore diff --git a/packages/plugins/file-manager/LICENSE b/packages/plugins/@nocobase/plugin-file-manager/LICENSE similarity index 100% rename from packages/plugins/file-manager/LICENSE rename to packages/plugins/@nocobase/plugin-file-manager/LICENSE diff --git a/packages/plugins/file-manager/README.md b/packages/plugins/@nocobase/plugin-file-manager/README.md similarity index 100% rename from packages/plugins/file-manager/README.md rename to packages/plugins/@nocobase/plugin-file-manager/README.md diff --git a/packages/plugins/file-manager/README.zh-CN.md b/packages/plugins/@nocobase/plugin-file-manager/README.zh-CN.md similarity index 100% rename from packages/plugins/file-manager/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-file-manager/README.zh-CN.md diff --git a/packages/plugins/file-manager/client.d.ts b/packages/plugins/@nocobase/plugin-file-manager/client.d.ts similarity index 100% rename from packages/plugins/file-manager/client.d.ts rename to packages/plugins/@nocobase/plugin-file-manager/client.d.ts diff --git a/packages/plugins/file-manager/client.js b/packages/plugins/@nocobase/plugin-file-manager/client.js similarity index 100% rename from packages/plugins/file-manager/client.js rename to packages/plugins/@nocobase/plugin-file-manager/client.js diff --git a/packages/plugins/file-manager/package.json b/packages/plugins/@nocobase/plugin-file-manager/package.json similarity index 90% rename from packages/plugins/file-manager/package.json rename to packages/plugins/@nocobase/plugin-file-manager/package.json index c19eefb83..39a8b2fd4 100644 --- a/packages/plugins/file-manager/package.json +++ b/packages/plugins/@nocobase/plugin-file-manager/package.json @@ -3,7 +3,7 @@ "version": "0.13.0-alpha.10", "displayName": "File manager", "displayName.zh-CN": "文件管理器", - "description": "file management plugin.", + "description": "Provides file storage services, and extended the file collection template and the attachment field", "description.zh-CN": "提供文件存储服务,并拓展了文件表模板和附件字段", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/file-manager/server.d.ts b/packages/plugins/@nocobase/plugin-file-manager/server.d.ts similarity index 100% rename from packages/plugins/file-manager/server.d.ts rename to packages/plugins/@nocobase/plugin-file-manager/server.d.ts diff --git a/packages/plugins/file-manager/server.js b/packages/plugins/@nocobase/plugin-file-manager/server.js similarity index 100% rename from packages/plugins/file-manager/server.js rename to packages/plugins/@nocobase/plugin-file-manager/server.js diff --git a/packages/plugins/file-manager/src/client/FileManagerProvider.tsx b/packages/plugins/@nocobase/plugin-file-manager/src/client/FileManagerProvider.tsx similarity index 100% rename from packages/plugins/file-manager/src/client/FileManagerProvider.tsx rename to packages/plugins/@nocobase/plugin-file-manager/src/client/FileManagerProvider.tsx diff --git a/packages/plugins/file-manager/src/client/FileStorage.tsx b/packages/plugins/@nocobase/plugin-file-manager/src/client/FileStorage.tsx similarity index 100% rename from packages/plugins/file-manager/src/client/FileStorage.tsx rename to packages/plugins/@nocobase/plugin-file-manager/src/client/FileStorage.tsx diff --git a/packages/plugins/file-manager/src/client/StorageOptions.tsx b/packages/plugins/@nocobase/plugin-file-manager/src/client/StorageOptions.tsx similarity index 100% rename from packages/plugins/file-manager/src/client/StorageOptions.tsx rename to packages/plugins/@nocobase/plugin-file-manager/src/client/StorageOptions.tsx diff --git a/packages/plugins/file-manager/src/client/hooks/index.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/hooks/index.ts similarity index 100% rename from packages/plugins/file-manager/src/client/hooks/index.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/client/hooks/index.ts diff --git a/packages/plugins/file-manager/src/client/hooks/useUploadFiles.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/hooks/useUploadFiles.ts similarity index 100% rename from packages/plugins/file-manager/src/client/hooks/useUploadFiles.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/client/hooks/useUploadFiles.ts diff --git a/packages/plugins/file-manager/src/client/index.tsx b/packages/plugins/@nocobase/plugin-file-manager/src/client/index.tsx similarity index 100% rename from packages/plugins/file-manager/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-file-manager/src/client/index.tsx diff --git a/packages/plugins/file-manager/src/client/initializers/UploadActionInitializer.tsx b/packages/plugins/@nocobase/plugin-file-manager/src/client/initializers/UploadActionInitializer.tsx similarity index 100% rename from packages/plugins/file-manager/src/client/initializers/UploadActionInitializer.tsx rename to packages/plugins/@nocobase/plugin-file-manager/src/client/initializers/UploadActionInitializer.tsx diff --git a/packages/plugins/file-manager/src/client/initializers/index.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/initializers/index.ts similarity index 100% rename from packages/plugins/file-manager/src/client/initializers/index.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/client/initializers/index.ts diff --git a/packages/plugins/file-manager/src/client/interfaces/attachment.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/interfaces/attachment.ts similarity index 100% rename from packages/plugins/file-manager/src/client/interfaces/attachment.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/client/interfaces/attachment.ts diff --git a/packages/plugins/file-manager/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/locale/index.ts similarity index 100% rename from packages/plugins/file-manager/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/client/locale/index.ts diff --git a/packages/plugins/file-manager/src/client/schemas/storage.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/schemas/storage.ts similarity index 100% rename from packages/plugins/file-manager/src/client/schemas/storage.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/client/schemas/storage.ts diff --git a/packages/plugins/file-manager/src/client/templates/file.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/templates/file.ts similarity index 100% rename from packages/plugins/file-manager/src/client/templates/file.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/client/templates/file.ts diff --git a/packages/plugins/file-manager/src/client/templates/index.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/templates/index.ts similarity index 100% rename from packages/plugins/file-manager/src/client/templates/index.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/client/templates/index.ts diff --git a/packages/plugins/file-manager/src/index.ts b/packages/plugins/@nocobase/plugin-file-manager/src/index.ts similarity index 100% rename from packages/plugins/file-manager/src/index.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/index.ts diff --git a/packages/plugins/file-manager/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-file-manager/src/locale/en-US.ts similarity index 100% rename from packages/plugins/file-manager/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/locale/en-US.ts diff --git a/packages/plugins/file-manager/src/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-file-manager/src/locale/fr-FR.ts similarity index 100% rename from packages/plugins/file-manager/src/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/locale/fr-FR.ts diff --git a/packages/plugins/file-manager/src/locale/ja-JP.ts b/packages/plugins/@nocobase/plugin-file-manager/src/locale/ja-JP.ts similarity index 100% rename from packages/plugins/file-manager/src/locale/ja-JP.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/locale/ja-JP.ts diff --git a/packages/plugins/file-manager/src/locale/ru-RU.ts b/packages/plugins/@nocobase/plugin-file-manager/src/locale/ru-RU.ts similarity index 100% rename from packages/plugins/file-manager/src/locale/ru-RU.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/locale/ru-RU.ts diff --git a/packages/plugins/file-manager/src/locale/tr-TR.ts b/packages/plugins/@nocobase/plugin-file-manager/src/locale/tr-TR.ts similarity index 100% rename from packages/plugins/file-manager/src/locale/tr-TR.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/locale/tr-TR.ts diff --git a/packages/plugins/file-manager/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-file-manager/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/file-manager/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/locale/zh-CN.ts diff --git a/packages/plugins/file-manager/src/server/__tests__/action.test.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/action.test.ts similarity index 100% rename from packages/plugins/file-manager/src/server/__tests__/action.test.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/action.test.ts diff --git a/packages/plugins/file-manager/src/server/__tests__/attachment.test.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/attachment.test.ts similarity index 100% rename from packages/plugins/file-manager/src/server/__tests__/attachment.test.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/attachment.test.ts diff --git a/packages/plugins/file-manager/src/server/__tests__/files/image.jpg b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/files/image.jpg similarity index 100% rename from packages/plugins/file-manager/src/server/__tests__/files/image.jpg rename to packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/files/image.jpg diff --git a/packages/plugins/file-manager/src/server/__tests__/files/image.png b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/files/image.png similarity index 100% rename from packages/plugins/file-manager/src/server/__tests__/files/image.png rename to packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/files/image.png diff --git a/packages/plugins/file-manager/src/server/__tests__/files/text.txt b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/files/text.txt similarity index 100% rename from packages/plugins/file-manager/src/server/__tests__/files/text.txt rename to packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/files/text.txt diff --git a/packages/plugins/file-manager/src/server/__tests__/index.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/index.ts similarity index 100% rename from packages/plugins/file-manager/src/server/__tests__/index.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/index.ts diff --git a/packages/plugins/file-manager/src/server/__tests__/storages/ali-oss.test.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/ali-oss.test.ts similarity index 100% rename from packages/plugins/file-manager/src/server/__tests__/storages/ali-oss.test.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/ali-oss.test.ts diff --git a/packages/plugins/file-manager/src/server/__tests__/storages/s3.test.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/s3.test.ts similarity index 100% rename from packages/plugins/file-manager/src/server/__tests__/storages/s3.test.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/s3.test.ts diff --git a/packages/plugins/file-manager/src/server/__tests__/storages/tx-cos.test.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/tx-cos.test.ts similarity index 100% rename from packages/plugins/file-manager/src/server/__tests__/storages/tx-cos.test.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/storages/tx-cos.test.ts diff --git a/packages/plugins/file-manager/src/server/__tests__/tables/users.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/tables/users.ts similarity index 100% rename from packages/plugins/file-manager/src/server/__tests__/tables/users.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/__tests__/tables/users.ts diff --git a/packages/plugins/file-manager/src/server/actions/attachments.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/actions/attachments.ts similarity index 100% rename from packages/plugins/file-manager/src/server/actions/attachments.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/actions/attachments.ts diff --git a/packages/plugins/file-manager/src/server/actions/index.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/actions/index.ts similarity index 100% rename from packages/plugins/file-manager/src/server/actions/index.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/actions/index.ts diff --git a/packages/plugins/file-manager/src/server/collections/attachments.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/collections/attachments.ts similarity index 100% rename from packages/plugins/file-manager/src/server/collections/attachments.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/collections/attachments.ts diff --git a/packages/plugins/file-manager/src/server/collections/storages.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/collections/storages.ts similarity index 100% rename from packages/plugins/file-manager/src/server/collections/storages.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/collections/storages.ts diff --git a/packages/plugins/file-manager/src/server/constants.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/constants.ts similarity index 100% rename from packages/plugins/file-manager/src/server/constants.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/constants.ts diff --git a/packages/plugins/file-manager/src/server/index.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/index.ts similarity index 100% rename from packages/plugins/file-manager/src/server/index.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/index.ts diff --git a/packages/plugins/file-manager/src/server/migrations/20230831160742-fix-attachment-field.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/migrations/20230831160742-fix-attachment-field.ts similarity index 100% rename from packages/plugins/file-manager/src/server/migrations/20230831160742-fix-attachment-field.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/migrations/20230831160742-fix-attachment-field.ts diff --git a/packages/plugins/file-manager/src/server/rules/index.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/rules/index.ts similarity index 100% rename from packages/plugins/file-manager/src/server/rules/index.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/rules/index.ts diff --git a/packages/plugins/file-manager/src/server/rules/mimetype.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/rules/mimetype.ts similarity index 100% rename from packages/plugins/file-manager/src/server/rules/mimetype.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/rules/mimetype.ts diff --git a/packages/plugins/file-manager/src/server/server.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/server.ts similarity index 100% rename from packages/plugins/file-manager/src/server/server.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/server.ts diff --git a/packages/plugins/file-manager/src/server/storages/ali-oss.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/storages/ali-oss.ts similarity index 100% rename from packages/plugins/file-manager/src/server/storages/ali-oss.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/storages/ali-oss.ts diff --git a/packages/plugins/file-manager/src/server/storages/index.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/storages/index.ts similarity index 100% rename from packages/plugins/file-manager/src/server/storages/index.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/storages/index.ts diff --git a/packages/plugins/file-manager/src/server/storages/local.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/storages/local.ts similarity index 100% rename from packages/plugins/file-manager/src/server/storages/local.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/storages/local.ts diff --git a/packages/plugins/file-manager/src/server/storages/s3.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/storages/s3.ts similarity index 100% rename from packages/plugins/file-manager/src/server/storages/s3.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/storages/s3.ts diff --git a/packages/plugins/file-manager/src/server/storages/tx-cos.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/storages/tx-cos.ts similarity index 100% rename from packages/plugins/file-manager/src/server/storages/tx-cos.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/storages/tx-cos.ts diff --git a/packages/plugins/file-manager/src/server/utils.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/utils.ts similarity index 100% rename from packages/plugins/file-manager/src/server/utils.ts rename to packages/plugins/@nocobase/plugin-file-manager/src/server/utils.ts diff --git a/packages/plugins/file-manager/src/swagger/index.json b/packages/plugins/@nocobase/plugin-file-manager/src/swagger/index.json similarity index 100% rename from packages/plugins/file-manager/src/swagger/index.json rename to packages/plugins/@nocobase/plugin-file-manager/src/swagger/index.json diff --git a/packages/plugins/formula-field/.npmignore b/packages/plugins/@nocobase/plugin-formula-field/.npmignore similarity index 100% rename from packages/plugins/formula-field/.npmignore rename to packages/plugins/@nocobase/plugin-formula-field/.npmignore diff --git a/packages/plugins/formula-field/LICENSE b/packages/plugins/@nocobase/plugin-formula-field/LICENSE similarity index 100% rename from packages/plugins/formula-field/LICENSE rename to packages/plugins/@nocobase/plugin-formula-field/LICENSE diff --git a/packages/plugins/formula-field/README.md b/packages/plugins/@nocobase/plugin-formula-field/README.md similarity index 100% rename from packages/plugins/formula-field/README.md rename to packages/plugins/@nocobase/plugin-formula-field/README.md diff --git a/packages/plugins/formula-field/README.zh-CN.md b/packages/plugins/@nocobase/plugin-formula-field/README.zh-CN.md similarity index 100% rename from packages/plugins/formula-field/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-formula-field/README.zh-CN.md diff --git a/packages/plugins/formula-field/client.d.ts b/packages/plugins/@nocobase/plugin-formula-field/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/formula-field/client.d.ts rename to packages/plugins/@nocobase/plugin-formula-field/client.d.ts diff --git a/packages/plugins/formula-field/client.js b/packages/plugins/@nocobase/plugin-formula-field/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/formula-field/client.js rename to packages/plugins/@nocobase/plugin-formula-field/client.js diff --git a/packages/plugins/formula-field/package.json b/packages/plugins/@nocobase/plugin-formula-field/package.json similarity index 59% rename from packages/plugins/formula-field/package.json rename to packages/plugins/@nocobase/plugin-formula-field/package.json index 522ca4e01..aa312dfa2 100644 --- a/packages/plugins/formula-field/package.json +++ b/packages/plugins/@nocobase/plugin-formula-field/package.json @@ -1,9 +1,9 @@ { "name": "@nocobase/plugin-formula-field", - "displayName": "formula-field", - "displayName.zh-CN": "字段", - "description": "formula-field", - "description.zh-CN": "字段。", + "displayName": "Formula field", + "displayName.zh-CN": "公式字段", + "description": "You can configure and store calculation results between multi-field values of the same record, supporting both mathjs and excel functions engines.", + "description.zh-CN": "可以配置并存储同一条记录的多字段值之间的计算结果,支持 mathjs 和 excel functions 两种引擎", "version": "0.13.0-alpha.10", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/formula-field/server.d.ts b/packages/plugins/@nocobase/plugin-formula-field/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/formula-field/server.d.ts rename to packages/plugins/@nocobase/plugin-formula-field/server.d.ts diff --git a/packages/plugins/formula-field/server.js b/packages/plugins/@nocobase/plugin-formula-field/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/formula-field/server.js rename to packages/plugins/@nocobase/plugin-formula-field/server.js diff --git a/packages/plugins/formula-field/src/client/FormulaFieldProvider.tsx b/packages/plugins/@nocobase/plugin-formula-field/src/client/FormulaFieldProvider.tsx similarity index 100% rename from packages/plugins/formula-field/src/client/FormulaFieldProvider.tsx rename to packages/plugins/@nocobase/plugin-formula-field/src/client/FormulaFieldProvider.tsx diff --git a/packages/plugins/formula-field/src/client/components/Formula/Expression.tsx b/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Expression.tsx similarity index 100% rename from packages/plugins/formula-field/src/client/components/Formula/Expression.tsx rename to packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Expression.tsx diff --git a/packages/plugins/formula-field/src/client/components/Formula/Result.tsx b/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Result.tsx similarity index 100% rename from packages/plugins/formula-field/src/client/components/Formula/Result.tsx rename to packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Result.tsx diff --git a/packages/plugins/formula-field/src/client/components/Formula/demos/demo2.tsx b/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/demos/demo2.tsx similarity index 100% rename from packages/plugins/formula-field/src/client/components/Formula/demos/demo2.tsx rename to packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/demos/demo2.tsx diff --git a/packages/plugins/formula-field/src/client/components/Formula/index.md b/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/index.md similarity index 100% rename from packages/plugins/formula-field/src/client/components/Formula/index.md rename to packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/index.md diff --git a/packages/plugins/formula-field/src/client/components/Formula/index.tsx b/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/index.tsx similarity index 100% rename from packages/plugins/formula-field/src/client/components/Formula/index.tsx rename to packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/index.tsx diff --git a/packages/plugins/formula-field/src/client/components/index.ts b/packages/plugins/@nocobase/plugin-formula-field/src/client/components/index.ts similarity index 100% rename from packages/plugins/formula-field/src/client/components/index.ts rename to packages/plugins/@nocobase/plugin-formula-field/src/client/components/index.ts diff --git a/packages/plugins/formula-field/src/client/index.tsx b/packages/plugins/@nocobase/plugin-formula-field/src/client/index.tsx similarity index 100% rename from packages/plugins/formula-field/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-formula-field/src/client/index.tsx diff --git a/packages/plugins/formula-field/src/client/interfaces/formula.tsx b/packages/plugins/@nocobase/plugin-formula-field/src/client/interfaces/formula.tsx similarity index 100% rename from packages/plugins/formula-field/src/client/interfaces/formula.tsx rename to packages/plugins/@nocobase/plugin-formula-field/src/client/interfaces/formula.tsx diff --git a/packages/plugins/formula-field/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-formula-field/src/client/locale/index.ts similarity index 100% rename from packages/plugins/formula-field/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-formula-field/src/client/locale/index.ts diff --git a/packages/plugins/formula-field/src/index.ts b/packages/plugins/@nocobase/plugin-formula-field/src/index.ts similarity index 100% rename from packages/plugins/formula-field/src/index.ts rename to packages/plugins/@nocobase/plugin-formula-field/src/index.ts diff --git a/packages/plugins/formula-field/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-formula-field/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/formula-field/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-formula-field/src/locale/zh-CN.ts diff --git a/packages/plugins/formula-field/src/server/__tests__/formula-field.test.ts b/packages/plugins/@nocobase/plugin-formula-field/src/server/__tests__/formula-field.test.ts similarity index 100% rename from packages/plugins/formula-field/src/server/__tests__/formula-field.test.ts rename to packages/plugins/@nocobase/plugin-formula-field/src/server/__tests__/formula-field.test.ts diff --git a/packages/plugins/formula-field/src/server/formula-field.ts b/packages/plugins/@nocobase/plugin-formula-field/src/server/formula-field.ts similarity index 100% rename from packages/plugins/formula-field/src/server/formula-field.ts rename to packages/plugins/@nocobase/plugin-formula-field/src/server/formula-field.ts diff --git a/packages/plugins/formula-field/src/server/index.ts b/packages/plugins/@nocobase/plugin-formula-field/src/server/index.ts similarity index 100% rename from packages/plugins/formula-field/src/server/index.ts rename to packages/plugins/@nocobase/plugin-formula-field/src/server/index.ts diff --git a/packages/plugins/formula-field/src/server/migrations/20230213161904-alter-field.ts b/packages/plugins/@nocobase/plugin-formula-field/src/server/migrations/20230213161904-alter-field.ts similarity index 100% rename from packages/plugins/formula-field/src/server/migrations/20230213161904-alter-field.ts rename to packages/plugins/@nocobase/plugin-formula-field/src/server/migrations/20230213161904-alter-field.ts diff --git a/packages/plugins/formula-field/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-formula-field/src/server/plugin.ts similarity index 100% rename from packages/plugins/formula-field/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-formula-field/src/server/plugin.ts diff --git a/packages/plugins/formula-field/src/utils/index.ts b/packages/plugins/@nocobase/plugin-formula-field/src/utils/index.ts similarity index 100% rename from packages/plugins/formula-field/src/utils/index.ts rename to packages/plugins/@nocobase/plugin-formula-field/src/utils/index.ts diff --git a/packages/plugins/graph-collection-manager/.npmignore b/packages/plugins/@nocobase/plugin-graph-collection-manager/.npmignore similarity index 100% rename from packages/plugins/graph-collection-manager/.npmignore rename to packages/plugins/@nocobase/plugin-graph-collection-manager/.npmignore diff --git a/packages/plugins/graph-collection-manager/LICENSE b/packages/plugins/@nocobase/plugin-graph-collection-manager/LICENSE similarity index 100% rename from packages/plugins/graph-collection-manager/LICENSE rename to packages/plugins/@nocobase/plugin-graph-collection-manager/LICENSE diff --git a/packages/plugins/graph-collection-manager/README.md b/packages/plugins/@nocobase/plugin-graph-collection-manager/README.md similarity index 100% rename from packages/plugins/graph-collection-manager/README.md rename to packages/plugins/@nocobase/plugin-graph-collection-manager/README.md diff --git a/packages/plugins/graph-collection-manager/README.zh-CN.md b/packages/plugins/@nocobase/plugin-graph-collection-manager/README.zh-CN.md similarity index 100% rename from packages/plugins/graph-collection-manager/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-graph-collection-manager/README.zh-CN.md diff --git a/packages/plugins/graph-collection-manager/client.d.ts b/packages/plugins/@nocobase/plugin-graph-collection-manager/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/graph-collection-manager/client.d.ts rename to packages/plugins/@nocobase/plugin-graph-collection-manager/client.d.ts diff --git a/packages/plugins/graph-collection-manager/client.js b/packages/plugins/@nocobase/plugin-graph-collection-manager/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/graph-collection-manager/client.js rename to packages/plugins/@nocobase/plugin-graph-collection-manager/client.js diff --git a/packages/plugins/graph-collection-manager/package.json b/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json similarity index 82% rename from packages/plugins/graph-collection-manager/package.json rename to packages/plugins/@nocobase/plugin-graph-collection-manager/package.json index d61525949..41b91b868 100644 --- a/packages/plugins/graph-collection-manager/package.json +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json @@ -1,9 +1,9 @@ { "name": "@nocobase/plugin-graph-collection-manager", - "displayName": "graph collection manager", - "displayName.zh-CN": "数据库可视化管理", - "description": "database collection manage", - "description.zh-CN": "数据库管理。", + "displayName": "Graph collection manager", + "displayName.zh-CN": "可视化的数据表管理", + "description": "An ER diagram-like tool", + "description.zh-CN": "类似 ER 图的工具", "version": "0.13.0-alpha.10", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/graph-collection-manager/server.d.ts b/packages/plugins/@nocobase/plugin-graph-collection-manager/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/graph-collection-manager/server.d.ts rename to packages/plugins/@nocobase/plugin-graph-collection-manager/server.d.ts diff --git a/packages/plugins/graph-collection-manager/server.js b/packages/plugins/@nocobase/plugin-graph-collection-manager/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/graph-collection-manager/server.js rename to packages/plugins/@nocobase/plugin-graph-collection-manager/server.js diff --git a/packages/plugins/graph-collection-manager/src/client/GraphCollectionProvider.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphCollectionProvider.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/GraphCollectionProvider.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphCollectionProvider.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/GraphCollectionShortcut.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphCollectionShortcut.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/GraphCollectionShortcut.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphCollectionShortcut.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/GraphDrawPage.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphDrawPage.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/GraphDrawPage.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphDrawPage.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/action-hooks.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/action-hooks.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/action-hooks.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/action-hooks.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/AddCollectionAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/AddCollectionAction.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/AddCollectionAction.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/AddCollectionAction.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/AddFieldAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/AddFieldAction.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/AddFieldAction.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/AddFieldAction.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/CollectionNodeProvder.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/CollectionNodeProvder.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/CollectionNodeProvder.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/CollectionNodeProvder.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/ConnectAssociationAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectAssociationAction.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/ConnectAssociationAction.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectAssociationAction.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/ConnectChildAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectChildAction.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/ConnectChildAction.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectChildAction.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/ConnectParentAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectParentAction.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/ConnectParentAction.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectParentAction.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/ConnectorAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectorAction.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/ConnectorAction.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ConnectorAction.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/DirectionAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/DirectionAction.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/DirectionAction.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/DirectionAction.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/EditCollectionAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/EditCollectionAction.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/EditCollectionAction.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/EditCollectionAction.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/EditFieldAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/EditFieldAction.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/EditFieldAction.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/EditFieldAction.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/Entity.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/Entity.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/Entity.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/Entity.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/FieldSummary.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/FieldSummary.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/FieldSummary.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/FieldSummary.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/FullScreenAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/FullScreenAction.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/FullScreenAction.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/FullScreenAction.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/LocateCollectionAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/LocateCollectionAction.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/LocateCollectionAction.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/LocateCollectionAction.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/OverrideFieldAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/OverrideFieldAction.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/OverrideFieldAction.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/OverrideFieldAction.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/SelectCollectionsAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/SelectCollectionsAction.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/SelectCollectionsAction.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/SelectCollectionsAction.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/ViewFieldAction.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ViewFieldAction.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/ViewFieldAction.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ViewFieldAction.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/components/ViewNode.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ViewNode.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/components/ViewNode.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/ViewNode.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/index.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/index.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/index.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/locale/index.ts similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/locale/index.ts diff --git a/packages/plugins/graph-collection-manager/src/client/style.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/style.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/style.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/style.tsx diff --git a/packages/plugins/graph-collection-manager/src/client/utils.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/utils.tsx similarity index 100% rename from packages/plugins/graph-collection-manager/src/client/utils.tsx rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/utils.tsx diff --git a/packages/plugins/graph-collection-manager/src/index.ts b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/index.ts similarity index 100% rename from packages/plugins/graph-collection-manager/src/index.ts rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/index.ts diff --git a/packages/plugins/graph-collection-manager/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/locale/en-US.ts similarity index 100% rename from packages/plugins/graph-collection-manager/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/locale/en-US.ts diff --git a/packages/plugins/graph-collection-manager/src/locale/es-ES.ts b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/locale/es-ES.ts similarity index 100% rename from packages/plugins/graph-collection-manager/src/locale/es-ES.ts rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/locale/es-ES.ts diff --git a/packages/plugins/graph-collection-manager/src/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/locale/fr-FR.ts similarity index 100% rename from packages/plugins/graph-collection-manager/src/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/locale/fr-FR.ts diff --git a/packages/plugins/graph-collection-manager/src/locale/ja-JP.ts b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/locale/ja-JP.ts similarity index 100% rename from packages/plugins/graph-collection-manager/src/locale/ja-JP.ts rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/locale/ja-JP.ts diff --git a/packages/plugins/graph-collection-manager/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/graph-collection-manager/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/locale/pt-BR.ts diff --git a/packages/plugins/graph-collection-manager/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/graph-collection-manager/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/locale/zh-CN.ts diff --git a/packages/plugins/graph-collection-manager/src/server/actions/.gitkeep b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/actions/.gitkeep similarity index 100% rename from packages/plugins/graph-collection-manager/src/server/actions/.gitkeep rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/actions/.gitkeep diff --git a/packages/plugins/graph-collection-manager/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/collections/.gitkeep similarity index 100% rename from packages/plugins/graph-collection-manager/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/collections/.gitkeep diff --git a/packages/plugins/graph-collection-manager/src/server/collections/graphPositions.ts b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/collections/graphPositions.ts similarity index 100% rename from packages/plugins/graph-collection-manager/src/server/collections/graphPositions.ts rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/collections/graphPositions.ts diff --git a/packages/plugins/graph-collection-manager/src/server/index.ts b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/index.ts similarity index 100% rename from packages/plugins/graph-collection-manager/src/server/index.ts rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/index.ts diff --git a/packages/plugins/graph-collection-manager/src/server/models/.gitkeep b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/models/.gitkeep similarity index 100% rename from packages/plugins/graph-collection-manager/src/server/models/.gitkeep rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/models/.gitkeep diff --git a/packages/plugins/graph-collection-manager/src/server/repositories/.gitkeep b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/repositories/.gitkeep similarity index 100% rename from packages/plugins/graph-collection-manager/src/server/repositories/.gitkeep rename to packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/repositories/.gitkeep diff --git a/packages/plugins/iframe-block/.npmignore b/packages/plugins/@nocobase/plugin-iframe-block/.npmignore similarity index 100% rename from packages/plugins/iframe-block/.npmignore rename to packages/plugins/@nocobase/plugin-iframe-block/.npmignore diff --git a/packages/plugins/iframe-block/LICENSE b/packages/plugins/@nocobase/plugin-iframe-block/LICENSE similarity index 100% rename from packages/plugins/iframe-block/LICENSE rename to packages/plugins/@nocobase/plugin-iframe-block/LICENSE diff --git a/packages/plugins/iframe-block/README.md b/packages/plugins/@nocobase/plugin-iframe-block/README.md similarity index 100% rename from packages/plugins/iframe-block/README.md rename to packages/plugins/@nocobase/plugin-iframe-block/README.md diff --git a/packages/plugins/iframe-block/README.zh-CN.md b/packages/plugins/@nocobase/plugin-iframe-block/README.zh-CN.md similarity index 100% rename from packages/plugins/iframe-block/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-iframe-block/README.zh-CN.md diff --git a/packages/plugins/iframe-block/client.d.ts b/packages/plugins/@nocobase/plugin-iframe-block/client.d.ts similarity index 100% rename from packages/plugins/iframe-block/client.d.ts rename to packages/plugins/@nocobase/plugin-iframe-block/client.d.ts diff --git a/packages/plugins/iframe-block/client.js b/packages/plugins/@nocobase/plugin-iframe-block/client.js similarity index 100% rename from packages/plugins/iframe-block/client.js rename to packages/plugins/@nocobase/plugin-iframe-block/client.js diff --git a/packages/plugins/iframe-block/package.json b/packages/plugins/@nocobase/plugin-iframe-block/package.json similarity index 79% rename from packages/plugins/iframe-block/package.json rename to packages/plugins/@nocobase/plugin-iframe-block/package.json index 472af1be9..3115ff53f 100644 --- a/packages/plugins/iframe-block/package.json +++ b/packages/plugins/@nocobase/plugin-iframe-block/package.json @@ -2,8 +2,8 @@ "name": "@nocobase/plugin-iframe-block", "displayName": "iframe", "displayName.zh-CN": "iframe", - "description": "create and manage IFrame blocks on the page for embedding and displaying external web pages or content.", - "description.zh-CN": "在页面上创建和管理iframe,用于嵌入和展示外部网页或内容。", + "description": "Create an iframe block on the page to embed and display external web pages or content", + "description.zh-CN": "在页面上创建和管理iframe,用于嵌入和展示外部网页或内容", "version": "0.13.0-alpha.10", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/iframe-block/server.d.ts b/packages/plugins/@nocobase/plugin-iframe-block/server.d.ts similarity index 100% rename from packages/plugins/iframe-block/server.d.ts rename to packages/plugins/@nocobase/plugin-iframe-block/server.d.ts diff --git a/packages/plugins/iframe-block/server.js b/packages/plugins/@nocobase/plugin-iframe-block/server.js similarity index 100% rename from packages/plugins/iframe-block/server.js rename to packages/plugins/@nocobase/plugin-iframe-block/server.js diff --git a/packages/plugins/iframe-block/src/client/Iframe.Designer.tsx b/packages/plugins/@nocobase/plugin-iframe-block/src/client/Iframe.Designer.tsx similarity index 100% rename from packages/plugins/iframe-block/src/client/Iframe.Designer.tsx rename to packages/plugins/@nocobase/plugin-iframe-block/src/client/Iframe.Designer.tsx diff --git a/packages/plugins/iframe-block/src/client/Iframe.tsx b/packages/plugins/@nocobase/plugin-iframe-block/src/client/Iframe.tsx similarity index 100% rename from packages/plugins/iframe-block/src/client/Iframe.tsx rename to packages/plugins/@nocobase/plugin-iframe-block/src/client/Iframe.tsx diff --git a/packages/plugins/iframe-block/src/client/IframeBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-iframe-block/src/client/IframeBlockInitializer.tsx similarity index 100% rename from packages/plugins/iframe-block/src/client/IframeBlockInitializer.tsx rename to packages/plugins/@nocobase/plugin-iframe-block/src/client/IframeBlockInitializer.tsx diff --git a/packages/plugins/iframe-block/src/client/IframeBlockInitializerProvider.tsx b/packages/plugins/@nocobase/plugin-iframe-block/src/client/IframeBlockInitializerProvider.tsx similarity index 100% rename from packages/plugins/iframe-block/src/client/IframeBlockInitializerProvider.tsx rename to packages/plugins/@nocobase/plugin-iframe-block/src/client/IframeBlockInitializerProvider.tsx diff --git a/packages/plugins/iframe-block/src/client/IframeBlockProvider.tsx b/packages/plugins/@nocobase/plugin-iframe-block/src/client/IframeBlockProvider.tsx similarity index 100% rename from packages/plugins/iframe-block/src/client/IframeBlockProvider.tsx rename to packages/plugins/@nocobase/plugin-iframe-block/src/client/IframeBlockProvider.tsx diff --git a/packages/plugins/iframe-block/src/client/index.ts b/packages/plugins/@nocobase/plugin-iframe-block/src/client/index.ts similarity index 100% rename from packages/plugins/iframe-block/src/client/index.ts rename to packages/plugins/@nocobase/plugin-iframe-block/src/client/index.ts diff --git a/packages/plugins/iframe-block/src/index.ts b/packages/plugins/@nocobase/plugin-iframe-block/src/index.ts similarity index 100% rename from packages/plugins/iframe-block/src/index.ts rename to packages/plugins/@nocobase/plugin-iframe-block/src/index.ts diff --git a/packages/plugins/iframe-block/src/server/actions/index.ts b/packages/plugins/@nocobase/plugin-iframe-block/src/server/actions/index.ts similarity index 100% rename from packages/plugins/iframe-block/src/server/actions/index.ts rename to packages/plugins/@nocobase/plugin-iframe-block/src/server/actions/index.ts diff --git a/packages/plugins/iframe-block/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-iframe-block/src/server/collections/.gitkeep similarity index 100% rename from packages/plugins/iframe-block/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-iframe-block/src/server/collections/.gitkeep diff --git a/packages/plugins/iframe-block/src/server/collections/iframe-html.ts b/packages/plugins/@nocobase/plugin-iframe-block/src/server/collections/iframe-html.ts similarity index 100% rename from packages/plugins/iframe-block/src/server/collections/iframe-html.ts rename to packages/plugins/@nocobase/plugin-iframe-block/src/server/collections/iframe-html.ts diff --git a/packages/plugins/iframe-block/src/server/index.ts b/packages/plugins/@nocobase/plugin-iframe-block/src/server/index.ts similarity index 100% rename from packages/plugins/iframe-block/src/server/index.ts rename to packages/plugins/@nocobase/plugin-iframe-block/src/server/index.ts diff --git a/packages/plugins/iframe-block/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-iframe-block/src/server/plugin.ts similarity index 100% rename from packages/plugins/iframe-block/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-iframe-block/src/server/plugin.ts diff --git a/packages/plugins/iframe-block/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-iframe-block/src/swagger/index.ts similarity index 100% rename from packages/plugins/iframe-block/src/swagger/index.ts rename to packages/plugins/@nocobase/plugin-iframe-block/src/swagger/index.ts diff --git a/packages/plugins/import/.npmignore b/packages/plugins/@nocobase/plugin-import/.npmignore similarity index 100% rename from packages/plugins/import/.npmignore rename to packages/plugins/@nocobase/plugin-import/.npmignore diff --git a/packages/plugins/import/LICENSE b/packages/plugins/@nocobase/plugin-import/LICENSE similarity index 100% rename from packages/plugins/import/LICENSE rename to packages/plugins/@nocobase/plugin-import/LICENSE diff --git a/packages/plugins/import/README.md b/packages/plugins/@nocobase/plugin-import/README.md similarity index 100% rename from packages/plugins/import/README.md rename to packages/plugins/@nocobase/plugin-import/README.md diff --git a/packages/plugins/import/README.zh-CN.md b/packages/plugins/@nocobase/plugin-import/README.zh-CN.md similarity index 100% rename from packages/plugins/import/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-import/README.zh-CN.md diff --git a/packages/plugins/import/client.d.ts b/packages/plugins/@nocobase/plugin-import/client.d.ts similarity index 100% rename from packages/plugins/import/client.d.ts rename to packages/plugins/@nocobase/plugin-import/client.d.ts diff --git a/packages/plugins/import/client.js b/packages/plugins/@nocobase/plugin-import/client.js similarity index 100% rename from packages/plugins/import/client.js rename to packages/plugins/@nocobase/plugin-import/client.js diff --git a/packages/plugins/import/package.json b/packages/plugins/@nocobase/plugin-import/package.json similarity index 80% rename from packages/plugins/import/package.json rename to packages/plugins/@nocobase/plugin-import/package.json index c20530093..0f38afb0f 100644 --- a/packages/plugins/import/package.json +++ b/packages/plugins/@nocobase/plugin-import/package.json @@ -1,9 +1,9 @@ { "name": "@nocobase/plugin-import", - "displayName": "import", - "displayName.zh-CN": "导入", - "description": "import data.", - "description.zh-CN": "导入数据。", + "displayName": "Data import", + "displayName.zh-CN": "数据导入", + "description": "Import data according to the excel template provided", + "description.zh-CN": "根据提供的 excel 模板导入数据", "version": "0.13.0-alpha.10", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/import/server.d.ts b/packages/plugins/@nocobase/plugin-import/server.d.ts similarity index 100% rename from packages/plugins/import/server.d.ts rename to packages/plugins/@nocobase/plugin-import/server.d.ts diff --git a/packages/plugins/import/server.js b/packages/plugins/@nocobase/plugin-import/server.js similarity index 100% rename from packages/plugins/import/server.js rename to packages/plugins/@nocobase/plugin-import/server.js diff --git a/packages/plugins/import/src/client/ImportActionInitializer.tsx b/packages/plugins/@nocobase/plugin-import/src/client/ImportActionInitializer.tsx similarity index 100% rename from packages/plugins/import/src/client/ImportActionInitializer.tsx rename to packages/plugins/@nocobase/plugin-import/src/client/ImportActionInitializer.tsx diff --git a/packages/plugins/import/src/client/ImportDesigner.tsx b/packages/plugins/@nocobase/plugin-import/src/client/ImportDesigner.tsx similarity index 100% rename from packages/plugins/import/src/client/ImportDesigner.tsx rename to packages/plugins/@nocobase/plugin-import/src/client/ImportDesigner.tsx diff --git a/packages/plugins/import/src/client/ImportInitializerProvider.tsx b/packages/plugins/@nocobase/plugin-import/src/client/ImportInitializerProvider.tsx similarity index 100% rename from packages/plugins/import/src/client/ImportInitializerProvider.tsx rename to packages/plugins/@nocobase/plugin-import/src/client/ImportInitializerProvider.tsx diff --git a/packages/plugins/import/src/client/ImportModal.tsx b/packages/plugins/@nocobase/plugin-import/src/client/ImportModal.tsx similarity index 100% rename from packages/plugins/import/src/client/ImportModal.tsx rename to packages/plugins/@nocobase/plugin-import/src/client/ImportModal.tsx diff --git a/packages/plugins/import/src/client/ImportPluginProvider.tsx b/packages/plugins/@nocobase/plugin-import/src/client/ImportPluginProvider.tsx similarity index 100% rename from packages/plugins/import/src/client/ImportPluginProvider.tsx rename to packages/plugins/@nocobase/plugin-import/src/client/ImportPluginProvider.tsx diff --git a/packages/plugins/import/src/client/constants.ts b/packages/plugins/@nocobase/plugin-import/src/client/constants.ts similarity index 100% rename from packages/plugins/import/src/client/constants.ts rename to packages/plugins/@nocobase/plugin-import/src/client/constants.ts diff --git a/packages/plugins/import/src/client/context.ts b/packages/plugins/@nocobase/plugin-import/src/client/context.ts similarity index 100% rename from packages/plugins/import/src/client/context.ts rename to packages/plugins/@nocobase/plugin-import/src/client/context.ts diff --git a/packages/plugins/import/src/client/index.ts b/packages/plugins/@nocobase/plugin-import/src/client/index.ts similarity index 100% rename from packages/plugins/import/src/client/index.ts rename to packages/plugins/@nocobase/plugin-import/src/client/index.ts diff --git a/packages/plugins/import/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-import/src/client/locale/index.ts similarity index 100% rename from packages/plugins/import/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-import/src/client/locale/index.ts diff --git a/packages/plugins/import/src/client/useFields.ts b/packages/plugins/@nocobase/plugin-import/src/client/useFields.ts similarity index 100% rename from packages/plugins/import/src/client/useFields.ts rename to packages/plugins/@nocobase/plugin-import/src/client/useFields.ts diff --git a/packages/plugins/import/src/client/useImportAction.ts b/packages/plugins/@nocobase/plugin-import/src/client/useImportAction.ts similarity index 100% rename from packages/plugins/import/src/client/useImportAction.ts rename to packages/plugins/@nocobase/plugin-import/src/client/useImportAction.ts diff --git a/packages/plugins/import/src/client/useShared.ts b/packages/plugins/@nocobase/plugin-import/src/client/useShared.ts similarity index 100% rename from packages/plugins/import/src/client/useShared.ts rename to packages/plugins/@nocobase/plugin-import/src/client/useShared.ts diff --git a/packages/plugins/import/src/index.ts b/packages/plugins/@nocobase/plugin-import/src/index.ts similarity index 100% rename from packages/plugins/import/src/index.ts rename to packages/plugins/@nocobase/plugin-import/src/index.ts diff --git a/packages/plugins/import/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-import/src/locale/en-US.ts similarity index 97% rename from packages/plugins/import/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-import/src/locale/en-US.ts index 6685e551e..2cc45cb88 100644 --- a/packages/plugins/import/src/locale/en-US.ts +++ b/packages/plugins/@nocobase/plugin-import/src/locale/en-US.ts @@ -10,7 +10,7 @@ export default { 'Step 2: Upload Excel': 'Step 2: Upload Excel', 'Download tip': '- Download the template and fill in the data according to the format \r\n - Import only the first worksheet \r\n - Support single import of up to 10,000 rows of data \r\n - Do not change the header of the template to prevent import failure', - 'Upload placeholder': 'Drag and drop the file here or click to upload, file size should not exceed 10M', + 'Upload placeholder': 'Drag and drop the file here or click to upload, file size should not exceed 30M', 'Excel data importing': 'Excel data importing', 'Import done, total success have {{successCount}} , total failure have {{failureCount}}': 'Import is complete, with a total of {{successCount}} successful and {{failureCount}} failed', diff --git a/packages/plugins/import/src/locale/es-ES.ts b/packages/plugins/@nocobase/plugin-import/src/locale/es-ES.ts similarity index 100% rename from packages/plugins/import/src/locale/es-ES.ts rename to packages/plugins/@nocobase/plugin-import/src/locale/es-ES.ts diff --git a/packages/plugins/import/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-import/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/import/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-import/src/locale/pt-BR.ts diff --git a/packages/plugins/import/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-import/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/import/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-import/src/locale/zh-CN.ts diff --git a/packages/plugins/import/src/server/actions/.gitkeep b/packages/plugins/@nocobase/plugin-import/src/server/actions/.gitkeep similarity index 100% rename from packages/plugins/import/src/server/actions/.gitkeep rename to packages/plugins/@nocobase/plugin-import/src/server/actions/.gitkeep diff --git a/packages/plugins/import/src/server/actions/downloadXlsxTemplate.ts b/packages/plugins/@nocobase/plugin-import/src/server/actions/downloadXlsxTemplate.ts similarity index 100% rename from packages/plugins/import/src/server/actions/downloadXlsxTemplate.ts rename to packages/plugins/@nocobase/plugin-import/src/server/actions/downloadXlsxTemplate.ts diff --git a/packages/plugins/import/src/server/actions/importXlsx.ts b/packages/plugins/@nocobase/plugin-import/src/server/actions/importXlsx.ts similarity index 100% rename from packages/plugins/import/src/server/actions/importXlsx.ts rename to packages/plugins/@nocobase/plugin-import/src/server/actions/importXlsx.ts diff --git a/packages/plugins/import/src/server/actions/index.ts b/packages/plugins/@nocobase/plugin-import/src/server/actions/index.ts similarity index 100% rename from packages/plugins/import/src/server/actions/index.ts rename to packages/plugins/@nocobase/plugin-import/src/server/actions/index.ts diff --git a/packages/plugins/import/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-import/src/server/collections/.gitkeep similarity index 100% rename from packages/plugins/import/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-import/src/server/collections/.gitkeep diff --git a/packages/plugins/import/src/server/index.ts b/packages/plugins/@nocobase/plugin-import/src/server/index.ts similarity index 100% rename from packages/plugins/import/src/server/index.ts rename to packages/plugins/@nocobase/plugin-import/src/server/index.ts diff --git a/packages/plugins/import/src/server/locale/en-US.ts b/packages/plugins/@nocobase/plugin-import/src/server/locale/en-US.ts similarity index 100% rename from packages/plugins/import/src/server/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-import/src/server/locale/en-US.ts diff --git a/packages/plugins/import/src/server/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-import/src/server/locale/fr-FR.ts similarity index 100% rename from packages/plugins/import/src/server/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-import/src/server/locale/fr-FR.ts diff --git a/packages/plugins/import/src/server/locale/index.ts b/packages/plugins/@nocobase/plugin-import/src/server/locale/index.ts similarity index 100% rename from packages/plugins/import/src/server/locale/index.ts rename to packages/plugins/@nocobase/plugin-import/src/server/locale/index.ts diff --git a/packages/plugins/import/src/server/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-import/src/server/locale/zh-CN.ts similarity index 100% rename from packages/plugins/import/src/server/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-import/src/server/locale/zh-CN.ts diff --git a/packages/plugins/import/src/server/middleware/index.ts b/packages/plugins/@nocobase/plugin-import/src/server/middleware/index.ts similarity index 100% rename from packages/plugins/import/src/server/middleware/index.ts rename to packages/plugins/@nocobase/plugin-import/src/server/middleware/index.ts diff --git a/packages/plugins/import/src/server/models/.gitkeep b/packages/plugins/@nocobase/plugin-import/src/server/models/.gitkeep similarity index 100% rename from packages/plugins/import/src/server/models/.gitkeep rename to packages/plugins/@nocobase/plugin-import/src/server/models/.gitkeep diff --git a/packages/plugins/import/src/server/repositories/.gitkeep b/packages/plugins/@nocobase/plugin-import/src/server/repositories/.gitkeep similarity index 100% rename from packages/plugins/import/src/server/repositories/.gitkeep rename to packages/plugins/@nocobase/plugin-import/src/server/repositories/.gitkeep diff --git a/packages/plugins/import/src/server/utils/index.ts b/packages/plugins/@nocobase/plugin-import/src/server/utils/index.ts similarity index 100% rename from packages/plugins/import/src/server/utils/index.ts rename to packages/plugins/@nocobase/plugin-import/src/server/utils/index.ts diff --git a/packages/plugins/import/src/server/utils/transform.ts b/packages/plugins/@nocobase/plugin-import/src/server/utils/transform.ts similarity index 100% rename from packages/plugins/import/src/server/utils/transform.ts rename to packages/plugins/@nocobase/plugin-import/src/server/utils/transform.ts diff --git a/packages/plugins/import/src/swagger/index.json b/packages/plugins/@nocobase/plugin-import/src/swagger/index.json similarity index 100% rename from packages/plugins/import/src/swagger/index.json rename to packages/plugins/@nocobase/plugin-import/src/swagger/index.json diff --git a/packages/plugins/localization-management/.npmignore b/packages/plugins/@nocobase/plugin-localization-management/.npmignore similarity index 100% rename from packages/plugins/localization-management/.npmignore rename to packages/plugins/@nocobase/plugin-localization-management/.npmignore diff --git a/packages/plugins/localization-management/README.md b/packages/plugins/@nocobase/plugin-localization-management/README.md similarity index 100% rename from packages/plugins/localization-management/README.md rename to packages/plugins/@nocobase/plugin-localization-management/README.md diff --git a/packages/plugins/theme-editor/client.d.ts b/packages/plugins/@nocobase/plugin-localization-management/client.d.ts similarity index 100% rename from packages/plugins/theme-editor/client.d.ts rename to packages/plugins/@nocobase/plugin-localization-management/client.d.ts diff --git a/packages/plugins/sms-auth/client.js b/packages/plugins/@nocobase/plugin-localization-management/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/sms-auth/client.js rename to packages/plugins/@nocobase/plugin-localization-management/client.js diff --git a/packages/plugins/localization-management/package.json b/packages/plugins/@nocobase/plugin-localization-management/package.json similarity index 100% rename from packages/plugins/localization-management/package.json rename to packages/plugins/@nocobase/plugin-localization-management/package.json diff --git a/packages/plugins/localization-management/server.d.ts b/packages/plugins/@nocobase/plugin-localization-management/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/localization-management/server.d.ts rename to packages/plugins/@nocobase/plugin-localization-management/server.d.ts diff --git a/packages/plugins/localization-management/server.js b/packages/plugins/@nocobase/plugin-localization-management/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/localization-management/server.js rename to packages/plugins/@nocobase/plugin-localization-management/server.js diff --git a/packages/plugins/localization-management/src/client/Localization.tsx b/packages/plugins/@nocobase/plugin-localization-management/src/client/Localization.tsx similarity index 100% rename from packages/plugins/localization-management/src/client/Localization.tsx rename to packages/plugins/@nocobase/plugin-localization-management/src/client/Localization.tsx diff --git a/packages/plugins/localization-management/src/client/index.tsx b/packages/plugins/@nocobase/plugin-localization-management/src/client/index.tsx similarity index 100% rename from packages/plugins/localization-management/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-localization-management/src/client/index.tsx diff --git a/packages/plugins/localization-management/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-localization-management/src/client/locale/index.ts similarity index 100% rename from packages/plugins/localization-management/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-localization-management/src/client/locale/index.ts diff --git a/packages/plugins/localization-management/src/client/schemas/localization.tsx b/packages/plugins/@nocobase/plugin-localization-management/src/client/schemas/localization.tsx similarity index 100% rename from packages/plugins/localization-management/src/client/schemas/localization.tsx rename to packages/plugins/@nocobase/plugin-localization-management/src/client/schemas/localization.tsx diff --git a/packages/plugins/localization-management/src/index.ts b/packages/plugins/@nocobase/plugin-localization-management/src/index.ts similarity index 100% rename from packages/plugins/localization-management/src/index.ts rename to packages/plugins/@nocobase/plugin-localization-management/src/index.ts diff --git a/packages/plugins/localization-management/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-localization-management/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/localization-management/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-localization-management/src/locale/zh-CN.ts diff --git a/packages/plugins/localization-management/src/server/__tests__/actions.test.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/actions.test.ts similarity index 100% rename from packages/plugins/localization-management/src/server/__tests__/actions.test.ts rename to packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/actions.test.ts diff --git a/packages/plugins/localization-management/src/server/__tests__/resources.test.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/resources.test.ts similarity index 100% rename from packages/plugins/localization-management/src/server/__tests__/resources.test.ts rename to packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/resources.test.ts diff --git a/packages/plugins/localization-management/src/server/actions/localization.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localization.ts similarity index 100% rename from packages/plugins/localization-management/src/server/actions/localization.ts rename to packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localization.ts diff --git a/packages/plugins/localization-management/src/server/actions/localizationTexts.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localizationTexts.ts similarity index 100% rename from packages/plugins/localization-management/src/server/actions/localizationTexts.ts rename to packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localizationTexts.ts diff --git a/packages/plugins/localization-management/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-localization-management/src/server/collections/.gitkeep similarity index 100% rename from packages/plugins/localization-management/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-localization-management/src/server/collections/.gitkeep diff --git a/packages/plugins/localization-management/src/server/collections/localization-texts.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-texts.ts similarity index 100% rename from packages/plugins/localization-management/src/server/collections/localization-texts.ts rename to packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-texts.ts diff --git a/packages/plugins/localization-management/src/server/collections/localization-translations.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-translations.ts similarity index 100% rename from packages/plugins/localization-management/src/server/collections/localization-translations.ts rename to packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-translations.ts diff --git a/packages/plugins/localization-management/src/server/constans.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/constans.ts similarity index 100% rename from packages/plugins/localization-management/src/server/constans.ts rename to packages/plugins/@nocobase/plugin-localization-management/src/server/constans.ts diff --git a/packages/plugins/localization-management/src/server/index.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/index.ts similarity index 100% rename from packages/plugins/localization-management/src/server/index.ts rename to packages/plugins/@nocobase/plugin-localization-management/src/server/index.ts diff --git a/packages/plugins/localization-management/src/server/migrations/20230706200900-roles-add-translation.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/migrations/20230706200900-roles-add-translation.ts similarity index 100% rename from packages/plugins/localization-management/src/server/migrations/20230706200900-roles-add-translation.ts rename to packages/plugins/@nocobase/plugin-localization-management/src/server/migrations/20230706200900-roles-add-translation.ts diff --git a/packages/plugins/localization-management/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/plugin.ts similarity index 100% rename from packages/plugins/localization-management/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-localization-management/src/server/plugin.ts diff --git a/packages/plugins/localization-management/src/server/resources.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/resources.ts similarity index 100% rename from packages/plugins/localization-management/src/server/resources.ts rename to packages/plugins/@nocobase/plugin-localization-management/src/server/resources.ts diff --git a/packages/plugins/localization-management/src/server/utils.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/utils.ts similarity index 100% rename from packages/plugins/localization-management/src/server/utils.ts rename to packages/plugins/@nocobase/plugin-localization-management/src/server/utils.ts diff --git a/packages/plugins/localization-management/src/swagger/index.json b/packages/plugins/@nocobase/plugin-localization-management/src/swagger/index.json similarity index 100% rename from packages/plugins/localization-management/src/swagger/index.json rename to packages/plugins/@nocobase/plugin-localization-management/src/swagger/index.json diff --git a/packages/plugins/map/.npmignore b/packages/plugins/@nocobase/plugin-map/.npmignore similarity index 100% rename from packages/plugins/map/.npmignore rename to packages/plugins/@nocobase/plugin-map/.npmignore diff --git a/packages/plugins/map/LICENSE b/packages/plugins/@nocobase/plugin-map/LICENSE similarity index 100% rename from packages/plugins/map/LICENSE rename to packages/plugins/@nocobase/plugin-map/LICENSE diff --git a/packages/plugins/map/README.md b/packages/plugins/@nocobase/plugin-map/README.md similarity index 100% rename from packages/plugins/map/README.md rename to packages/plugins/@nocobase/plugin-map/README.md diff --git a/packages/plugins/map/README.zh-CN.md b/packages/plugins/@nocobase/plugin-map/README.zh-CN.md similarity index 100% rename from packages/plugins/map/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-map/README.zh-CN.md diff --git a/packages/plugins/map/client.d.ts b/packages/plugins/@nocobase/plugin-map/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/map/client.d.ts rename to packages/plugins/@nocobase/plugin-map/client.d.ts diff --git a/packages/plugins/map/client.js b/packages/plugins/@nocobase/plugin-map/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/map/client.js rename to packages/plugins/@nocobase/plugin-map/client.js diff --git a/packages/plugins/map/docs/en-US/changelog.md b/packages/plugins/@nocobase/plugin-map/docs/en-US/changelog.md similarity index 100% rename from packages/plugins/map/docs/en-US/changelog.md rename to packages/plugins/@nocobase/plugin-map/docs/en-US/changelog.md diff --git a/packages/plugins/map/docs/en-US/index.md b/packages/plugins/@nocobase/plugin-map/docs/en-US/index.md similarity index 100% rename from packages/plugins/map/docs/en-US/index.md rename to packages/plugins/@nocobase/plugin-map/docs/en-US/index.md diff --git a/packages/plugins/map/docs/en-US/installation.md b/packages/plugins/@nocobase/plugin-map/docs/en-US/installation.md similarity index 100% rename from packages/plugins/map/docs/en-US/installation.md rename to packages/plugins/@nocobase/plugin-map/docs/en-US/installation.md diff --git a/packages/plugins/map/docs/en-US/tabs.json b/packages/plugins/@nocobase/plugin-map/docs/en-US/tabs.json similarity index 100% rename from packages/plugins/map/docs/en-US/tabs.json rename to packages/plugins/@nocobase/plugin-map/docs/en-US/tabs.json diff --git a/packages/plugins/map/docs/en-US/usage.md b/packages/plugins/@nocobase/plugin-map/docs/en-US/usage.md similarity index 100% rename from packages/plugins/map/docs/en-US/usage.md rename to packages/plugins/@nocobase/plugin-map/docs/en-US/usage.md diff --git a/packages/plugins/map/docs/zh-CN/changelog.md b/packages/plugins/@nocobase/plugin-map/docs/zh-CN/changelog.md similarity index 100% rename from packages/plugins/map/docs/zh-CN/changelog.md rename to packages/plugins/@nocobase/plugin-map/docs/zh-CN/changelog.md diff --git a/packages/plugins/map/docs/zh-CN/index.md b/packages/plugins/@nocobase/plugin-map/docs/zh-CN/index.md similarity index 100% rename from packages/plugins/map/docs/zh-CN/index.md rename to packages/plugins/@nocobase/plugin-map/docs/zh-CN/index.md diff --git a/packages/plugins/map/docs/zh-CN/installation.md b/packages/plugins/@nocobase/plugin-map/docs/zh-CN/installation.md similarity index 100% rename from packages/plugins/map/docs/zh-CN/installation.md rename to packages/plugins/@nocobase/plugin-map/docs/zh-CN/installation.md diff --git a/packages/plugins/map/docs/zh-CN/tabs.json b/packages/plugins/@nocobase/plugin-map/docs/zh-CN/tabs.json similarity index 100% rename from packages/plugins/map/docs/zh-CN/tabs.json rename to packages/plugins/@nocobase/plugin-map/docs/zh-CN/tabs.json diff --git a/packages/plugins/map/docs/zh-CN/usage.md b/packages/plugins/@nocobase/plugin-map/docs/zh-CN/usage.md similarity index 100% rename from packages/plugins/map/docs/zh-CN/usage.md rename to packages/plugins/@nocobase/plugin-map/docs/zh-CN/usage.md diff --git a/packages/plugins/map/package.json b/packages/plugins/@nocobase/plugin-map/package.json similarity index 95% rename from packages/plugins/map/package.json rename to packages/plugins/@nocobase/plugin-map/package.json index 0c693d2e6..1e13f8c24 100644 --- a/packages/plugins/map/package.json +++ b/packages/plugins/@nocobase/plugin-map/package.json @@ -3,7 +3,7 @@ "displayName": "Map", "displayName.zh-CN": "地图", "version": "0.13.0-alpha.10", - "description": "Provide map fields and blocks", + "description": "Provides map fields and blocks", "description.zh-CN": "提供地图字段和区块", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/map/server.d.ts b/packages/plugins/@nocobase/plugin-map/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/map/server.d.ts rename to packages/plugins/@nocobase/plugin-map/server.d.ts diff --git a/packages/plugins/map/server.js b/packages/plugins/@nocobase/plugin-map/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/map/server.js rename to packages/plugins/@nocobase/plugin-map/server.js diff --git a/packages/plugins/map/src/client/block/MapActionInitializers.tsx b/packages/plugins/@nocobase/plugin-map/src/client/block/MapActionInitializers.tsx similarity index 100% rename from packages/plugins/map/src/client/block/MapActionInitializers.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/block/MapActionInitializers.tsx diff --git a/packages/plugins/map/src/client/block/MapBlock.tsx b/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlock.tsx similarity index 100% rename from packages/plugins/map/src/client/block/MapBlock.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/block/MapBlock.tsx diff --git a/packages/plugins/map/src/client/block/MapBlockDesigner.tsx b/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockDesigner.tsx similarity index 100% rename from packages/plugins/map/src/client/block/MapBlockDesigner.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockDesigner.tsx diff --git a/packages/plugins/map/src/client/block/MapBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockInitializer.tsx similarity index 100% rename from packages/plugins/map/src/client/block/MapBlockInitializer.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockInitializer.tsx diff --git a/packages/plugins/map/src/client/block/MapBlockProvider.tsx b/packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockProvider.tsx similarity index 100% rename from packages/plugins/map/src/client/block/MapBlockProvider.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/block/MapBlockProvider.tsx diff --git a/packages/plugins/map/src/client/block/index.tsx b/packages/plugins/@nocobase/plugin-map/src/client/block/index.tsx similarity index 100% rename from packages/plugins/map/src/client/block/index.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/block/index.tsx diff --git a/packages/plugins/map/src/client/block/utils.ts b/packages/plugins/@nocobase/plugin-map/src/client/block/utils.ts similarity index 100% rename from packages/plugins/map/src/client/block/utils.ts rename to packages/plugins/@nocobase/plugin-map/src/client/block/utils.ts diff --git a/packages/plugins/map/src/client/components/AMap/Block.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Block.tsx similarity index 100% rename from packages/plugins/map/src/client/components/AMap/Block.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Block.tsx diff --git a/packages/plugins/map/src/client/components/AMap/Map.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Map.tsx similarity index 100% rename from packages/plugins/map/src/client/components/AMap/Map.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Map.tsx diff --git a/packages/plugins/map/src/client/components/AMap/Search.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Search.tsx similarity index 100% rename from packages/plugins/map/src/client/components/AMap/Search.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/components/AMap/Search.tsx diff --git a/packages/plugins/map/src/client/components/AMap/index.ts b/packages/plugins/@nocobase/plugin-map/src/client/components/AMap/index.ts similarity index 100% rename from packages/plugins/map/src/client/components/AMap/index.ts rename to packages/plugins/@nocobase/plugin-map/src/client/components/AMap/index.ts diff --git a/packages/plugins/map/src/client/components/Configuration.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/Configuration.tsx similarity index 100% rename from packages/plugins/map/src/client/components/Configuration.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/components/Configuration.tsx diff --git a/packages/plugins/map/src/client/components/Designer.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/Designer.tsx similarity index 100% rename from packages/plugins/map/src/client/components/Designer.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/components/Designer.tsx diff --git a/packages/plugins/map/src/client/components/GoogleMaps/Block.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Block.tsx similarity index 100% rename from packages/plugins/map/src/client/components/GoogleMaps/Block.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Block.tsx diff --git a/packages/plugins/map/src/client/components/GoogleMaps/Map.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Map.tsx similarity index 100% rename from packages/plugins/map/src/client/components/GoogleMaps/Map.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Map.tsx diff --git a/packages/plugins/map/src/client/components/GoogleMaps/Search.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Search.tsx similarity index 100% rename from packages/plugins/map/src/client/components/GoogleMaps/Search.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/Search.tsx diff --git a/packages/plugins/map/src/client/components/GoogleMaps/index.ts b/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/index.ts similarity index 100% rename from packages/plugins/map/src/client/components/GoogleMaps/index.ts rename to packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/index.ts diff --git a/packages/plugins/map/src/client/components/GoogleMaps/utils.ts b/packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/utils.ts similarity index 100% rename from packages/plugins/map/src/client/components/GoogleMaps/utils.ts rename to packages/plugins/@nocobase/plugin-map/src/client/components/GoogleMaps/utils.ts diff --git a/packages/plugins/map/src/client/components/Map.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/Map.tsx similarity index 100% rename from packages/plugins/map/src/client/components/Map.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/components/Map.tsx diff --git a/packages/plugins/map/src/client/components/MapBlock.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/MapBlock.tsx similarity index 100% rename from packages/plugins/map/src/client/components/MapBlock.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/components/MapBlock.tsx diff --git a/packages/plugins/map/src/client/components/MapComponent.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/MapComponent.tsx similarity index 100% rename from packages/plugins/map/src/client/components/MapComponent.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/components/MapComponent.tsx diff --git a/packages/plugins/map/src/client/components/ReadPretty.tsx b/packages/plugins/@nocobase/plugin-map/src/client/components/ReadPretty.tsx similarity index 100% rename from packages/plugins/map/src/client/components/ReadPretty.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/components/ReadPretty.tsx diff --git a/packages/plugins/map/src/client/components/index.ts b/packages/plugins/@nocobase/plugin-map/src/client/components/index.ts similarity index 100% rename from packages/plugins/map/src/client/components/index.ts rename to packages/plugins/@nocobase/plugin-map/src/client/components/index.ts diff --git a/packages/plugins/map/src/client/constants.ts b/packages/plugins/@nocobase/plugin-map/src/client/constants.ts similarity index 100% rename from packages/plugins/map/src/client/constants.ts rename to packages/plugins/@nocobase/plugin-map/src/client/constants.ts diff --git a/packages/plugins/map/src/client/fields/circle.ts b/packages/plugins/@nocobase/plugin-map/src/client/fields/circle.ts similarity index 100% rename from packages/plugins/map/src/client/fields/circle.ts rename to packages/plugins/@nocobase/plugin-map/src/client/fields/circle.ts diff --git a/packages/plugins/map/src/client/fields/index.ts b/packages/plugins/@nocobase/plugin-map/src/client/fields/index.ts similarity index 100% rename from packages/plugins/map/src/client/fields/index.ts rename to packages/plugins/@nocobase/plugin-map/src/client/fields/index.ts diff --git a/packages/plugins/map/src/client/fields/lineString.ts b/packages/plugins/@nocobase/plugin-map/src/client/fields/lineString.ts similarity index 100% rename from packages/plugins/map/src/client/fields/lineString.ts rename to packages/plugins/@nocobase/plugin-map/src/client/fields/lineString.ts diff --git a/packages/plugins/map/src/client/fields/point.ts b/packages/plugins/@nocobase/plugin-map/src/client/fields/point.ts similarity index 100% rename from packages/plugins/map/src/client/fields/point.ts rename to packages/plugins/@nocobase/plugin-map/src/client/fields/point.ts diff --git a/packages/plugins/map/src/client/fields/polygon.ts b/packages/plugins/@nocobase/plugin-map/src/client/fields/polygon.ts similarity index 100% rename from packages/plugins/map/src/client/fields/polygon.ts rename to packages/plugins/@nocobase/plugin-map/src/client/fields/polygon.ts diff --git a/packages/plugins/map/src/client/fields/schema.ts b/packages/plugins/@nocobase/plugin-map/src/client/fields/schema.ts similarity index 100% rename from packages/plugins/map/src/client/fields/schema.ts rename to packages/plugins/@nocobase/plugin-map/src/client/fields/schema.ts diff --git a/packages/plugins/map/src/client/hooks/index.ts b/packages/plugins/@nocobase/plugin-map/src/client/hooks/index.ts similarity index 100% rename from packages/plugins/map/src/client/hooks/index.ts rename to packages/plugins/@nocobase/plugin-map/src/client/hooks/index.ts diff --git a/packages/plugins/map/src/client/hooks/useMapConfiguration.ts b/packages/plugins/@nocobase/plugin-map/src/client/hooks/useMapConfiguration.ts similarity index 100% rename from packages/plugins/map/src/client/hooks/useMapConfiguration.ts rename to packages/plugins/@nocobase/plugin-map/src/client/hooks/useMapConfiguration.ts diff --git a/packages/plugins/map/src/client/index.tsx b/packages/plugins/@nocobase/plugin-map/src/client/index.tsx similarity index 100% rename from packages/plugins/map/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/index.tsx diff --git a/packages/plugins/map/src/client/initialize.tsx b/packages/plugins/@nocobase/plugin-map/src/client/initialize.tsx similarity index 100% rename from packages/plugins/map/src/client/initialize.tsx rename to packages/plugins/@nocobase/plugin-map/src/client/initialize.tsx diff --git a/packages/plugins/map/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-map/src/client/locale/index.ts similarity index 100% rename from packages/plugins/map/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-map/src/client/locale/index.ts diff --git a/packages/plugins/map/src/client/types.ts b/packages/plugins/@nocobase/plugin-map/src/client/types.ts similarity index 100% rename from packages/plugins/map/src/client/types.ts rename to packages/plugins/@nocobase/plugin-map/src/client/types.ts diff --git a/packages/plugins/map/src/client/utils.ts b/packages/plugins/@nocobase/plugin-map/src/client/utils.ts similarity index 100% rename from packages/plugins/map/src/client/utils.ts rename to packages/plugins/@nocobase/plugin-map/src/client/utils.ts diff --git a/packages/plugins/map/src/index.ts b/packages/plugins/@nocobase/plugin-map/src/index.ts similarity index 100% rename from packages/plugins/map/src/index.ts rename to packages/plugins/@nocobase/plugin-map/src/index.ts diff --git a/packages/plugins/map/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-map/src/locale/en-US.ts similarity index 100% rename from packages/plugins/map/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-map/src/locale/en-US.ts diff --git a/packages/plugins/map/src/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-map/src/locale/fr-FR.ts similarity index 100% rename from packages/plugins/map/src/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-map/src/locale/fr-FR.ts diff --git a/packages/plugins/map/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-map/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/map/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-map/src/locale/pt-BR.ts diff --git a/packages/plugins/map/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-map/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/map/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-map/src/locale/zh-CN.ts diff --git a/packages/plugins/map/src/server/__tests__/fields.test.ts b/packages/plugins/@nocobase/plugin-map/src/server/__tests__/fields.test.ts similarity index 100% rename from packages/plugins/map/src/server/__tests__/fields.test.ts rename to packages/plugins/@nocobase/plugin-map/src/server/__tests__/fields.test.ts diff --git a/packages/plugins/map/src/server/actions/index.ts b/packages/plugins/@nocobase/plugin-map/src/server/actions/index.ts similarity index 100% rename from packages/plugins/map/src/server/actions/index.ts rename to packages/plugins/@nocobase/plugin-map/src/server/actions/index.ts diff --git a/packages/plugins/map/src/server/collections/mapConfiguration.ts b/packages/plugins/@nocobase/plugin-map/src/server/collections/mapConfiguration.ts similarity index 100% rename from packages/plugins/map/src/server/collections/mapConfiguration.ts rename to packages/plugins/@nocobase/plugin-map/src/server/collections/mapConfiguration.ts diff --git a/packages/plugins/map/src/server/constants.ts b/packages/plugins/@nocobase/plugin-map/src/server/constants.ts similarity index 100% rename from packages/plugins/map/src/server/constants.ts rename to packages/plugins/@nocobase/plugin-map/src/server/constants.ts diff --git a/packages/plugins/map/src/server/fields/.gitkeep b/packages/plugins/@nocobase/plugin-map/src/server/fields/.gitkeep similarity index 100% rename from packages/plugins/map/src/server/fields/.gitkeep rename to packages/plugins/@nocobase/plugin-map/src/server/fields/.gitkeep diff --git a/packages/plugins/map/src/server/fields/circle.ts b/packages/plugins/@nocobase/plugin-map/src/server/fields/circle.ts similarity index 100% rename from packages/plugins/map/src/server/fields/circle.ts rename to packages/plugins/@nocobase/plugin-map/src/server/fields/circle.ts diff --git a/packages/plugins/map/src/server/fields/index.ts b/packages/plugins/@nocobase/plugin-map/src/server/fields/index.ts similarity index 100% rename from packages/plugins/map/src/server/fields/index.ts rename to packages/plugins/@nocobase/plugin-map/src/server/fields/index.ts diff --git a/packages/plugins/map/src/server/fields/lineString.ts b/packages/plugins/@nocobase/plugin-map/src/server/fields/lineString.ts similarity index 100% rename from packages/plugins/map/src/server/fields/lineString.ts rename to packages/plugins/@nocobase/plugin-map/src/server/fields/lineString.ts diff --git a/packages/plugins/map/src/server/fields/point.ts b/packages/plugins/@nocobase/plugin-map/src/server/fields/point.ts similarity index 100% rename from packages/plugins/map/src/server/fields/point.ts rename to packages/plugins/@nocobase/plugin-map/src/server/fields/point.ts diff --git a/packages/plugins/map/src/server/fields/polygon.ts b/packages/plugins/@nocobase/plugin-map/src/server/fields/polygon.ts similarity index 100% rename from packages/plugins/map/src/server/fields/polygon.ts rename to packages/plugins/@nocobase/plugin-map/src/server/fields/polygon.ts diff --git a/packages/plugins/map/src/server/helpers/index.ts b/packages/plugins/@nocobase/plugin-map/src/server/helpers/index.ts similarity index 100% rename from packages/plugins/map/src/server/helpers/index.ts rename to packages/plugins/@nocobase/plugin-map/src/server/helpers/index.ts diff --git a/packages/plugins/map/src/server/index.ts b/packages/plugins/@nocobase/plugin-map/src/server/index.ts similarity index 100% rename from packages/plugins/map/src/server/index.ts rename to packages/plugins/@nocobase/plugin-map/src/server/index.ts diff --git a/packages/plugins/map/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-map/src/server/plugin.ts similarity index 100% rename from packages/plugins/map/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-map/src/server/plugin.ts diff --git a/packages/plugins/map/src/server/value-parsers/index.ts b/packages/plugins/@nocobase/plugin-map/src/server/value-parsers/index.ts similarity index 100% rename from packages/plugins/map/src/server/value-parsers/index.ts rename to packages/plugins/@nocobase/plugin-map/src/server/value-parsers/index.ts diff --git a/packages/plugins/map/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-map/src/swagger/index.ts similarity index 100% rename from packages/plugins/map/src/swagger/index.ts rename to packages/plugins/@nocobase/plugin-map/src/swagger/index.ts diff --git a/packages/plugins/math-formula-field/.npmignore b/packages/plugins/@nocobase/plugin-math-formula-field/.npmignore similarity index 100% rename from packages/plugins/math-formula-field/.npmignore rename to packages/plugins/@nocobase/plugin-math-formula-field/.npmignore diff --git a/packages/plugins/math-formula-field/LICENSE b/packages/plugins/@nocobase/plugin-math-formula-field/LICENSE similarity index 100% rename from packages/plugins/math-formula-field/LICENSE rename to packages/plugins/@nocobase/plugin-math-formula-field/LICENSE diff --git a/packages/plugins/math-formula-field/README.md b/packages/plugins/@nocobase/plugin-math-formula-field/README.md similarity index 100% rename from packages/plugins/math-formula-field/README.md rename to packages/plugins/@nocobase/plugin-math-formula-field/README.md diff --git a/packages/plugins/math-formula-field/README.zh-CN.md b/packages/plugins/@nocobase/plugin-math-formula-field/README.zh-CN.md similarity index 100% rename from packages/plugins/math-formula-field/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-math-formula-field/README.zh-CN.md diff --git a/packages/plugins/math-formula-field/client.d.ts b/packages/plugins/@nocobase/plugin-math-formula-field/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/math-formula-field/client.d.ts rename to packages/plugins/@nocobase/plugin-math-formula-field/client.d.ts diff --git a/packages/plugins/math-formula-field/client.js b/packages/plugins/@nocobase/plugin-math-formula-field/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/math-formula-field/client.js rename to packages/plugins/@nocobase/plugin-math-formula-field/client.js diff --git a/packages/plugins/math-formula-field/package.json b/packages/plugins/@nocobase/plugin-math-formula-field/package.json similarity index 100% rename from packages/plugins/math-formula-field/package.json rename to packages/plugins/@nocobase/plugin-math-formula-field/package.json diff --git a/packages/plugins/math-formula-field/server.d.ts b/packages/plugins/@nocobase/plugin-math-formula-field/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/math-formula-field/server.d.ts rename to packages/plugins/@nocobase/plugin-math-formula-field/server.d.ts diff --git a/packages/plugins/math-formula-field/server.js b/packages/plugins/@nocobase/plugin-math-formula-field/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/math-formula-field/server.js rename to packages/plugins/@nocobase/plugin-math-formula-field/server.js diff --git a/packages/plugins/math-formula-field/src/client/MathFormula/index.tsx b/packages/plugins/@nocobase/plugin-math-formula-field/src/client/MathFormula/index.tsx similarity index 100% rename from packages/plugins/math-formula-field/src/client/MathFormula/index.tsx rename to packages/plugins/@nocobase/plugin-math-formula-field/src/client/MathFormula/index.tsx diff --git a/packages/plugins/math-formula-field/src/client/MathFormulaFieldProvider.tsx b/packages/plugins/@nocobase/plugin-math-formula-field/src/client/MathFormulaFieldProvider.tsx similarity index 100% rename from packages/plugins/math-formula-field/src/client/MathFormulaFieldProvider.tsx rename to packages/plugins/@nocobase/plugin-math-formula-field/src/client/MathFormulaFieldProvider.tsx diff --git a/packages/plugins/math-formula-field/src/client/index.tsx b/packages/plugins/@nocobase/plugin-math-formula-field/src/client/index.tsx similarity index 100% rename from packages/plugins/math-formula-field/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-math-formula-field/src/client/index.tsx diff --git a/packages/plugins/math-formula-field/src/client/math-formula.tsx b/packages/plugins/@nocobase/plugin-math-formula-field/src/client/math-formula.tsx similarity index 100% rename from packages/plugins/math-formula-field/src/client/math-formula.tsx rename to packages/plugins/@nocobase/plugin-math-formula-field/src/client/math-formula.tsx diff --git a/packages/plugins/math-formula-field/src/index.ts b/packages/plugins/@nocobase/plugin-math-formula-field/src/index.ts similarity index 100% rename from packages/plugins/math-formula-field/src/index.ts rename to packages/plugins/@nocobase/plugin-math-formula-field/src/index.ts diff --git a/packages/plugins/math-formula-field/src/server/__tests__/formula-field.test.ts b/packages/plugins/@nocobase/plugin-math-formula-field/src/server/__tests__/formula-field.test.ts similarity index 100% rename from packages/plugins/math-formula-field/src/server/__tests__/formula-field.test.ts rename to packages/plugins/@nocobase/plugin-math-formula-field/src/server/__tests__/formula-field.test.ts diff --git a/packages/plugins/math-formula-field/src/server/index.ts b/packages/plugins/@nocobase/plugin-math-formula-field/src/server/index.ts similarity index 100% rename from packages/plugins/math-formula-field/src/server/index.ts rename to packages/plugins/@nocobase/plugin-math-formula-field/src/server/index.ts diff --git a/packages/plugins/math-formula-field/src/server/math-formula-field.ts b/packages/plugins/@nocobase/plugin-math-formula-field/src/server/math-formula-field.ts similarity index 100% rename from packages/plugins/math-formula-field/src/server/math-formula-field.ts rename to packages/plugins/@nocobase/plugin-math-formula-field/src/server/math-formula-field.ts diff --git a/packages/plugins/math-formula-field/src/server/migrations/20230110103214-alert-field.ts b/packages/plugins/@nocobase/plugin-math-formula-field/src/server/migrations/20230110103214-alert-field.ts similarity index 100% rename from packages/plugins/math-formula-field/src/server/migrations/20230110103214-alert-field.ts rename to packages/plugins/@nocobase/plugin-math-formula-field/src/server/migrations/20230110103214-alert-field.ts diff --git a/packages/plugins/math-formula-field/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-math-formula-field/src/server/plugin.ts similarity index 100% rename from packages/plugins/math-formula-field/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-math-formula-field/src/server/plugin.ts diff --git a/packages/plugins/math-formula-field/src/utils/evaluate.ts b/packages/plugins/@nocobase/plugin-math-formula-field/src/utils/evaluate.ts similarity index 100% rename from packages/plugins/math-formula-field/src/utils/evaluate.ts rename to packages/plugins/@nocobase/plugin-math-formula-field/src/utils/evaluate.ts diff --git a/packages/plugins/mobile-client/.npmignore b/packages/plugins/@nocobase/plugin-mobile-client/.npmignore similarity index 100% rename from packages/plugins/mobile-client/.npmignore rename to packages/plugins/@nocobase/plugin-mobile-client/.npmignore diff --git a/packages/plugins/mobile-client/client.d.ts b/packages/plugins/@nocobase/plugin-mobile-client/client.d.ts similarity index 100% rename from packages/plugins/mobile-client/client.d.ts rename to packages/plugins/@nocobase/plugin-mobile-client/client.d.ts diff --git a/packages/plugins/mobile-client/client.js b/packages/plugins/@nocobase/plugin-mobile-client/client.js similarity index 100% rename from packages/plugins/mobile-client/client.js rename to packages/plugins/@nocobase/plugin-mobile-client/client.js diff --git a/packages/plugins/mobile-client/docs/en-US/index.md b/packages/plugins/@nocobase/plugin-mobile-client/docs/en-US/index.md similarity index 100% rename from packages/plugins/mobile-client/docs/en-US/index.md rename to packages/plugins/@nocobase/plugin-mobile-client/docs/en-US/index.md diff --git a/packages/plugins/mobile-client/docs/en-US/installation.md b/packages/plugins/@nocobase/plugin-mobile-client/docs/en-US/installation.md similarity index 100% rename from packages/plugins/mobile-client/docs/en-US/installation.md rename to packages/plugins/@nocobase/plugin-mobile-client/docs/en-US/installation.md diff --git a/packages/plugins/mobile-client/docs/en-US/tabs.json b/packages/plugins/@nocobase/plugin-mobile-client/docs/en-US/tabs.json similarity index 100% rename from packages/plugins/mobile-client/docs/en-US/tabs.json rename to packages/plugins/@nocobase/plugin-mobile-client/docs/en-US/tabs.json diff --git a/packages/plugins/mobile-client/docs/en-US/usage.md b/packages/plugins/@nocobase/plugin-mobile-client/docs/en-US/usage.md similarity index 100% rename from packages/plugins/mobile-client/docs/en-US/usage.md rename to packages/plugins/@nocobase/plugin-mobile-client/docs/en-US/usage.md diff --git a/packages/plugins/mobile-client/docs/zh-CN/index.md b/packages/plugins/@nocobase/plugin-mobile-client/docs/zh-CN/index.md similarity index 100% rename from packages/plugins/mobile-client/docs/zh-CN/index.md rename to packages/plugins/@nocobase/plugin-mobile-client/docs/zh-CN/index.md diff --git a/packages/plugins/mobile-client/docs/zh-CN/installation.md b/packages/plugins/@nocobase/plugin-mobile-client/docs/zh-CN/installation.md similarity index 100% rename from packages/plugins/mobile-client/docs/zh-CN/installation.md rename to packages/plugins/@nocobase/plugin-mobile-client/docs/zh-CN/installation.md diff --git a/packages/plugins/mobile-client/docs/zh-CN/tabs.json b/packages/plugins/@nocobase/plugin-mobile-client/docs/zh-CN/tabs.json similarity index 100% rename from packages/plugins/mobile-client/docs/zh-CN/tabs.json rename to packages/plugins/@nocobase/plugin-mobile-client/docs/zh-CN/tabs.json diff --git a/packages/plugins/mobile-client/docs/zh-CN/usage.md b/packages/plugins/@nocobase/plugin-mobile-client/docs/zh-CN/usage.md similarity index 100% rename from packages/plugins/mobile-client/docs/zh-CN/usage.md rename to packages/plugins/@nocobase/plugin-mobile-client/docs/zh-CN/usage.md diff --git a/packages/plugins/mobile-client/package.json b/packages/plugins/@nocobase/plugin-mobile-client/package.json similarity index 82% rename from packages/plugins/mobile-client/package.json rename to packages/plugins/@nocobase/plugin-mobile-client/package.json index 360c0dc9b..63e1d11bd 100644 --- a/packages/plugins/mobile-client/package.json +++ b/packages/plugins/@nocobase/plugin-mobile-client/package.json @@ -2,10 +2,10 @@ "name": "@nocobase/plugin-mobile-client", "version": "0.13.0-alpha.10", "main": "./dist/server/index.js", - "displayName": "Mobile-client", + "displayName": "Mobile client", "displayName.zh-CN": "移动端", - "description": "Provide mobile client access", - "description.zh-CN": "提供移动端访问", + "description": "Provides the ability to configure mobile pages", + "description.zh-CN": "提供移动端页面配置的能力", "devDependencies": { "@ant-design/icons": "5.x", "@formily/antd-v5": "1.x", diff --git a/packages/plugins/mobile-client/server.d.ts b/packages/plugins/@nocobase/plugin-mobile-client/server.d.ts similarity index 100% rename from packages/plugins/mobile-client/server.d.ts rename to packages/plugins/@nocobase/plugin-mobile-client/server.d.ts diff --git a/packages/plugins/mobile-client/server.js b/packages/plugins/@nocobase/plugin-mobile-client/server.js similarity index 100% rename from packages/plugins/mobile-client/server.js rename to packages/plugins/@nocobase/plugin-mobile-client/server.js diff --git a/packages/plugins/mobile-client/src/client/MobileClientProvider.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/MobileClientProvider.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/MobileClientProvider.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/MobileClientProvider.tsx diff --git a/packages/plugins/mobile-client/src/client/configuration/App.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/configuration/App.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/configuration/App.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/configuration/App.tsx diff --git a/packages/plugins/mobile-client/src/client/configuration/Interface.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/configuration/Interface.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/configuration/Interface.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/configuration/Interface.tsx diff --git a/packages/plugins/mobile-client/src/client/configuration/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/configuration/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/configuration/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/configuration/index.ts diff --git a/packages/plugins/mobile-client/src/client/core/bridge/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/bridge/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/bridge/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/bridge/index.ts diff --git a/packages/plugins/mobile-client/src/client/core/bridge/injects.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/bridge/injects.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/bridge/injects.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/bridge/injects.ts diff --git a/packages/plugins/mobile-client/src/client/core/bridge/native-call.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/bridge/native-call.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/bridge/native-call.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/bridge/native-call.ts diff --git a/packages/plugins/mobile-client/src/client/core/index.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/index.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/core/index.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/index.tsx diff --git a/packages/plugins/mobile-client/src/client/core/schema/common/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/common/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/common/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/common/index.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/common/page.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/common/page.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/common/page.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/common/page.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/container/Container.Designer.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/container/Container.Designer.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/container/Container.Designer.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/container/Container.Designer.tsx diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/container/Container.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/container/Container.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/container/Container.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/container/Container.tsx diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/container/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/container/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/container/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/container/index.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/container/style.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/container/style.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/container/style.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/container/style.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/header/Header.Designer.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/header/Header.Designer.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/header/Header.Designer.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/header/Header.Designer.tsx diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/header/Header.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/header/Header.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/header/Header.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/header/Header.tsx diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/header/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/header/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/header/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/header/index.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/index.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/menu/Menu.Designer.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.Designer.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/menu/Menu.Designer.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.Designer.tsx diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/menu/Menu.Item.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.Item.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/menu/Menu.Item.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.Item.tsx diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/menu/Menu.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/menu/Menu.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/menu/Menu.tsx diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/menu/MenuBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/menu/MenuBlockInitializer.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/menu/MenuBlockInitializer.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/menu/MenuBlockInitializer.tsx diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/menu/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/menu/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/menu/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/menu/index.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/menu/schema.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/menu/schema.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/menu/schema.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/menu/schema.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/menu/style.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/menu/style.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/menu/style.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/menu/style.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/page/Page.Designer.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/page/Page.Designer.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/page/Page.Designer.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/page/Page.Designer.tsx diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/page/Page.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/page/Page.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/page/Page.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/page/Page.tsx diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/page/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/page/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/page/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/page/index.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/page/style.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/page/style.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/page/style.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/page/style.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/settings/Settings.Designer.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.Designer.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/settings/Settings.Designer.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.Designer.tsx diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/settings/Settings.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/settings/Settings.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.tsx diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/settings/SettingsBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/settings/SettingsBlockInitializer.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/settings/SettingsBlockInitializer.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/settings/SettingsBlockInitializer.tsx diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/settings/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/settings/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/settings/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/settings/index.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/tab-bar/TabBar.Item.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/tab-bar/TabBar.Item.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/tab-bar/TabBar.Item.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/tab-bar/TabBar.Item.tsx diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/tab-bar/TabBar.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/tab-bar/TabBar.tsx similarity index 96% rename from packages/plugins/mobile-client/src/client/core/schema/components/tab-bar/TabBar.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/tab-bar/TabBar.tsx index bed886348..19167b56b 100644 --- a/packages/plugins/mobile-client/src/client/core/schema/components/tab-bar/TabBar.tsx +++ b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/tab-bar/TabBar.tsx @@ -68,11 +68,9 @@ export const InternalTabBar: React.FC = (props) => { navigate(`/mobile/${key}`); }} safeArea - className={cx( - css` - width: 100%; - `, - )} + className={cx(css` + width: 100%; + `)} > {fieldSchema.mapProperties((schema, name) => { const cp = schema['x-component-props']; diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/tab-bar/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/tab-bar/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/tab-bar/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/tab-bar/index.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/components/tab-bar/schema.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/tab-bar/schema.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/components/tab-bar/schema.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/tab-bar/schema.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/helpers/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/helpers/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/helpers/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/helpers/index.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/hooks/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/hooks/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/hooks/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/hooks/index.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/hooks/useSchemaPatch.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/hooks/useSchemaPatch.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/hooks/useSchemaPatch.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/hooks/useSchemaPatch.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/index.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/initializers/BlockInitializers.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/initializers/BlockInitializers.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/initializers/BlockInitializers.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/initializers/BlockInitializers.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/initializers/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/initializers/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/initializers/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/initializers/index.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/scopes/grid-card.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/scopes/grid-card.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/scopes/grid-card.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/scopes/grid-card.ts diff --git a/packages/plugins/mobile-client/src/client/core/schema/scopes/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/scopes/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/core/schema/scopes/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/scopes/index.ts diff --git a/packages/plugins/mobile-client/src/client/devices/iOS6.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/devices/iOS6.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/devices/iOS6.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/devices/iOS6.tsx diff --git a/packages/plugins/mobile-client/src/client/devices/index.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/devices/index.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/devices/index.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/devices/index.tsx diff --git a/packages/plugins/mobile-client/src/client/index.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/index.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/index.tsx diff --git a/packages/plugins/mobile-client/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/locale/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/locale/index.ts diff --git a/packages/plugins/mobile-client/src/client/router/Application.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/router/Application.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/router/Application.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/router/Application.tsx diff --git a/packages/plugins/mobile-client/src/client/router/InterfaceProvider.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/router/InterfaceProvider.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/router/InterfaceProvider.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/router/InterfaceProvider.tsx diff --git a/packages/plugins/mobile-client/src/client/router/InterfaceRouter.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/router/InterfaceRouter.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/router/InterfaceRouter.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/router/InterfaceRouter.tsx diff --git a/packages/plugins/mobile-client/src/client/router/OpenInNewTab.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/router/OpenInNewTab.tsx similarity index 100% rename from packages/plugins/mobile-client/src/client/router/OpenInNewTab.tsx rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/router/OpenInNewTab.tsx diff --git a/packages/plugins/mobile-client/src/client/router/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/router/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/client/router/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/client/router/index.ts diff --git a/packages/plugins/mobile-client/src/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/index.ts diff --git a/packages/plugins/mobile-client/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/locale/en-US.ts similarity index 100% rename from packages/plugins/mobile-client/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/locale/en-US.ts diff --git a/packages/plugins/mobile-client/src/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/locale/fr-FR.ts similarity index 100% rename from packages/plugins/mobile-client/src/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/locale/fr-FR.ts diff --git a/packages/plugins/mobile-client/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/mobile-client/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/locale/zh-CN.ts diff --git a/packages/plugins/mobile-client/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-mobile-client/src/server/collections/.gitkeep similarity index 100% rename from packages/plugins/mobile-client/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-mobile-client/src/server/collections/.gitkeep diff --git a/packages/plugins/mobile-client/src/server/index.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/server/index.ts similarity index 100% rename from packages/plugins/mobile-client/src/server/index.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/server/index.ts diff --git a/packages/plugins/mobile-client/src/server/migrations/20230620203218-mobile-ui-schema-uid.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/server/migrations/20230620203218-mobile-ui-schema-uid.ts similarity index 100% rename from packages/plugins/mobile-client/src/server/migrations/20230620203218-mobile-ui-schema-uid.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/server/migrations/20230620203218-mobile-ui-schema-uid.ts diff --git a/packages/plugins/mobile-client/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/server/plugin.ts similarity index 100% rename from packages/plugins/mobile-client/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/server/plugin.ts diff --git a/packages/plugins/mobile-client/src/server/routes.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/server/routes.ts similarity index 100% rename from packages/plugins/mobile-client/src/server/routes.ts rename to packages/plugins/@nocobase/plugin-mobile-client/src/server/routes.ts diff --git a/packages/plugins/multi-app-manager/.npmignore b/packages/plugins/@nocobase/plugin-multi-app-manager/.npmignore similarity index 100% rename from packages/plugins/multi-app-manager/.npmignore rename to packages/plugins/@nocobase/plugin-multi-app-manager/.npmignore diff --git a/packages/plugins/multi-app-manager/LICENSE b/packages/plugins/@nocobase/plugin-multi-app-manager/LICENSE similarity index 100% rename from packages/plugins/multi-app-manager/LICENSE rename to packages/plugins/@nocobase/plugin-multi-app-manager/LICENSE diff --git a/packages/plugins/multi-app-manager/README.md b/packages/plugins/@nocobase/plugin-multi-app-manager/README.md similarity index 100% rename from packages/plugins/multi-app-manager/README.md rename to packages/plugins/@nocobase/plugin-multi-app-manager/README.md diff --git a/packages/plugins/multi-app-manager/README.zh-CN.md b/packages/plugins/@nocobase/plugin-multi-app-manager/README.zh-CN.md similarity index 100% rename from packages/plugins/multi-app-manager/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-multi-app-manager/README.zh-CN.md diff --git a/packages/plugins/multi-app-manager/client.d.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/multi-app-manager/client.d.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/client.d.ts diff --git a/packages/plugins/multi-app-manager/client.js b/packages/plugins/@nocobase/plugin-multi-app-manager/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/multi-app-manager/client.js rename to packages/plugins/@nocobase/plugin-multi-app-manager/client.js diff --git a/packages/plugins/multi-app-manager/package.json b/packages/plugins/@nocobase/plugin-multi-app-manager/package.json similarity index 73% rename from packages/plugins/multi-app-manager/package.json rename to packages/plugins/@nocobase/plugin-multi-app-manager/package.json index 73e38cf18..b6190a01c 100644 --- a/packages/plugins/multi-app-manager/package.json +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/package.json @@ -1,9 +1,9 @@ { "name": "@nocobase/plugin-multi-app-manager", - "displayName": "multi app manager", - "displayName.zh-CN": "多应用管理", - "description": "manage app", - "description.zh-CN": "管理应用", + "displayName": "Multi-app manager", + "displayName.zh-CN": "多应用管理器", + "description": "Dynamically create multiple apps without separate deployments", + "description.zh-CN": "无需单独部署即可动态创建多个应用", "version": "0.13.0-alpha.10", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/multi-app-manager/server.d.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/multi-app-manager/server.d.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/server.d.ts diff --git a/packages/plugins/multi-app-manager/server.js b/packages/plugins/@nocobase/plugin-multi-app-manager/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/multi-app-manager/server.js rename to packages/plugins/@nocobase/plugin-multi-app-manager/server.js diff --git a/packages/plugins/multi-app-manager/src/client/AppManager.tsx b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/AppManager.tsx similarity index 100% rename from packages/plugins/multi-app-manager/src/client/AppManager.tsx rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/client/AppManager.tsx diff --git a/packages/plugins/multi-app-manager/src/client/AppNameInput.tsx b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/AppNameInput.tsx similarity index 100% rename from packages/plugins/multi-app-manager/src/client/AppNameInput.tsx rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/client/AppNameInput.tsx diff --git a/packages/plugins/multi-app-manager/src/client/MultiAppManagerProvider.tsx b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/MultiAppManagerProvider.tsx similarity index 99% rename from packages/plugins/multi-app-manager/src/client/MultiAppManagerProvider.tsx rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/client/MultiAppManagerProvider.tsx index 221fb00d8..c26ead9f5 100644 --- a/packages/plugins/multi-app-manager/src/client/MultiAppManagerProvider.tsx +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/MultiAppManagerProvider.tsx @@ -57,7 +57,6 @@ const MultiAppManager = () => { ); }; - export const MultiAppManagerProvider = (props) => { const { t } = usePluginUtils(); return ( diff --git a/packages/plugins/multi-app-manager/src/client/Settings.tsx b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/Settings.tsx similarity index 100% rename from packages/plugins/multi-app-manager/src/client/Settings.tsx rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/client/Settings.tsx diff --git a/packages/plugins/multi-app-manager/src/client/index.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/index.ts similarity index 100% rename from packages/plugins/multi-app-manager/src/client/index.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/client/index.ts diff --git a/packages/plugins/multi-app-manager/src/client/settings/schemas/applications.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/settings/schemas/applications.ts similarity index 100% rename from packages/plugins/multi-app-manager/src/client/settings/schemas/applications.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/client/settings/schemas/applications.ts diff --git a/packages/plugins/multi-app-manager/src/client/utils.tsx b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/utils.tsx similarity index 100% rename from packages/plugins/multi-app-manager/src/client/utils.tsx rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/client/utils.tsx diff --git a/packages/plugins/multi-app-manager/src/index.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/index.ts similarity index 100% rename from packages/plugins/multi-app-manager/src/index.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/index.ts diff --git a/packages/plugins/multi-app-manager/src/locale/es-ES.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/locale/es-ES.ts similarity index 100% rename from packages/plugins/multi-app-manager/src/locale/es-ES.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/locale/es-ES.ts diff --git a/packages/plugins/multi-app-manager/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/multi-app-manager/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/locale/pt-BR.ts diff --git a/packages/plugins/multi-app-manager/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/multi-app-manager/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/locale/zh-CN.ts diff --git a/packages/plugins/multi-app-manager/src/server/__tests__/gateway.test.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/gateway.test.ts similarity index 100% rename from packages/plugins/multi-app-manager/src/server/__tests__/gateway.test.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/gateway.test.ts diff --git a/packages/plugins/multi-app-manager/src/server/__tests__/mock-get-schema.test.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/mock-get-schema.test.ts similarity index 100% rename from packages/plugins/multi-app-manager/src/server/__tests__/mock-get-schema.test.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/mock-get-schema.test.ts diff --git a/packages/plugins/multi-app-manager/src/server/__tests__/multiple-apps.test.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts similarity index 100% rename from packages/plugins/multi-app-manager/src/server/__tests__/multiple-apps.test.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts diff --git a/packages/plugins/multi-app-manager/src/server/collections/applications.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/collections/applications.ts similarity index 100% rename from packages/plugins/multi-app-manager/src/server/collections/applications.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/server/collections/applications.ts diff --git a/packages/plugins/multi-app-manager/src/server/index.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/index.ts similarity index 100% rename from packages/plugins/multi-app-manager/src/server/index.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/server/index.ts diff --git a/packages/plugins/multi-app-manager/src/server/models/application.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/models/application.ts similarity index 100% rename from packages/plugins/multi-app-manager/src/server/models/application.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/server/models/application.ts diff --git a/packages/plugins/multi-app-manager/src/server/server.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/server.ts similarity index 100% rename from packages/plugins/multi-app-manager/src/server/server.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/server/server.ts diff --git a/packages/plugins/multi-app-manager/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/swagger/index.ts similarity index 100% rename from packages/plugins/multi-app-manager/src/swagger/index.ts rename to packages/plugins/@nocobase/plugin-multi-app-manager/src/swagger/index.ts diff --git a/packages/plugins/multi-app-share-collection/.npmignore b/packages/plugins/@nocobase/plugin-multi-app-share-collection/.npmignore similarity index 100% rename from packages/plugins/multi-app-share-collection/.npmignore rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/.npmignore diff --git a/packages/plugins/multi-app-share-collection/client.d.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/multi-app-share-collection/client.d.ts rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/client.d.ts diff --git a/packages/plugins/multi-app-share-collection/client.js b/packages/plugins/@nocobase/plugin-multi-app-share-collection/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/multi-app-share-collection/client.js rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/client.js diff --git a/packages/plugins/multi-app-share-collection/package.json b/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json similarity index 76% rename from packages/plugins/multi-app-share-collection/package.json rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json index 1be868b4f..478994c31 100644 --- a/packages/plugins/multi-app-share-collection/package.json +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json @@ -1,9 +1,9 @@ { "name": "@nocobase/plugin-multi-app-share-collection", - "displayName": "multi app share collection", - "displayName.zh-CN": "多应用数据共享", - "description": "multi app share collection", - "description.zh-CN": "多应用数据共享", + "displayName": "Multi-app share collection", + "displayName.zh-CN": "多应用数据表共享", + "description": "", + "description.zh-CN": "", "version": "0.13.0-alpha.10", "main": "./dist/server/index.js", "devDependencies": { diff --git a/packages/plugins/multi-app-share-collection/server.d.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/multi-app-share-collection/server.d.ts rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/server.d.ts diff --git a/packages/plugins/multi-app-share-collection/server.js b/packages/plugins/@nocobase/plugin-multi-app-share-collection/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/multi-app-share-collection/server.js rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/server.js diff --git a/packages/plugins/multi-app-share-collection/src/client/MultiAppShareCollectionProvider.tsx b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/MultiAppShareCollectionProvider.tsx similarity index 100% rename from packages/plugins/multi-app-share-collection/src/client/MultiAppShareCollectionProvider.tsx rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/MultiAppShareCollectionProvider.tsx diff --git a/packages/plugins/multi-app-share-collection/src/client/TableTransfer.tsx b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/TableTransfer.tsx similarity index 100% rename from packages/plugins/multi-app-share-collection/src/client/TableTransfer.tsx rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/TableTransfer.tsx diff --git a/packages/plugins/multi-app-share-collection/src/client/index.tsx b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/index.tsx similarity index 100% rename from packages/plugins/multi-app-share-collection/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/index.tsx diff --git a/packages/plugins/multi-app-share-collection/src/client/utils.tsx b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/utils.tsx similarity index 100% rename from packages/plugins/multi-app-share-collection/src/client/utils.tsx rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/utils.tsx diff --git a/packages/plugins/multi-app-share-collection/src/index.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/index.ts similarity index 100% rename from packages/plugins/multi-app-share-collection/src/index.ts rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/index.ts diff --git a/packages/plugins/multi-app-share-collection/src/locale/es-ES.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/locale/es-ES.ts similarity index 100% rename from packages/plugins/multi-app-share-collection/src/locale/es-ES.ts rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/locale/es-ES.ts diff --git a/packages/plugins/multi-app-share-collection/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/multi-app-share-collection/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/locale/pt-BR.ts diff --git a/packages/plugins/multi-app-share-collection/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/multi-app-share-collection/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/locale/zh-CN.ts diff --git a/packages/plugins/multi-app-share-collection/src/server/__tests__/collection-sync.test.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/collection-sync.test.ts similarity index 100% rename from packages/plugins/multi-app-share-collection/src/server/__tests__/collection-sync.test.ts rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/collection-sync.test.ts diff --git a/packages/plugins/multi-app-share-collection/src/server/__tests__/index.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/index.ts similarity index 100% rename from packages/plugins/multi-app-share-collection/src/server/__tests__/index.ts rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/index.ts diff --git a/packages/plugins/multi-app-share-collection/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/collections/.gitkeep similarity index 100% rename from packages/plugins/multi-app-share-collection/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/collections/.gitkeep diff --git a/packages/plugins/multi-app-share-collection/src/server/collections/applications.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/collections/applications.ts similarity index 100% rename from packages/plugins/multi-app-share-collection/src/server/collections/applications.ts rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/collections/applications.ts diff --git a/packages/plugins/multi-app-share-collection/src/server/collections/collections.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/collections/collections.ts similarity index 100% rename from packages/plugins/multi-app-share-collection/src/server/collections/collections.ts rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/collections/collections.ts diff --git a/packages/plugins/multi-app-share-collection/src/server/index.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/index.ts similarity index 100% rename from packages/plugins/multi-app-share-collection/src/server/index.ts rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/index.ts diff --git a/packages/plugins/multi-app-share-collection/src/server/migrations/20230319111111-update-apps-collections.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/migrations/20230319111111-update-apps-collections.ts similarity index 100% rename from packages/plugins/multi-app-share-collection/src/server/migrations/20230319111111-update-apps-collections.ts rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/migrations/20230319111111-update-apps-collections.ts diff --git a/packages/plugins/multi-app-share-collection/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/plugin.ts similarity index 100% rename from packages/plugins/multi-app-share-collection/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/plugin.ts diff --git a/packages/plugins/notifications/.npmignore b/packages/plugins/@nocobase/plugin-notifications/.npmignore similarity index 100% rename from packages/plugins/notifications/.npmignore rename to packages/plugins/@nocobase/plugin-notifications/.npmignore diff --git a/packages/plugins/notifications/LICENSE b/packages/plugins/@nocobase/plugin-notifications/LICENSE similarity index 100% rename from packages/plugins/notifications/LICENSE rename to packages/plugins/@nocobase/plugin-notifications/LICENSE diff --git a/packages/plugins/notifications/README.md b/packages/plugins/@nocobase/plugin-notifications/README.md similarity index 100% rename from packages/plugins/notifications/README.md rename to packages/plugins/@nocobase/plugin-notifications/README.md diff --git a/packages/plugins/notifications/README.zh-CN.md b/packages/plugins/@nocobase/plugin-notifications/README.zh-CN.md similarity index 100% rename from packages/plugins/notifications/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-notifications/README.zh-CN.md diff --git a/packages/plugins/notifications/client.d.ts b/packages/plugins/@nocobase/plugin-notifications/client.d.ts similarity index 100% rename from packages/plugins/notifications/client.d.ts rename to packages/plugins/@nocobase/plugin-notifications/client.d.ts diff --git a/packages/plugins/notifications/client.js b/packages/plugins/@nocobase/plugin-notifications/client.js similarity index 100% rename from packages/plugins/notifications/client.js rename to packages/plugins/@nocobase/plugin-notifications/client.js diff --git a/packages/plugins/notifications/package.json b/packages/plugins/@nocobase/plugin-notifications/package.json similarity index 100% rename from packages/plugins/notifications/package.json rename to packages/plugins/@nocobase/plugin-notifications/package.json diff --git a/packages/plugins/notifications/server.d.ts b/packages/plugins/@nocobase/plugin-notifications/server.d.ts similarity index 100% rename from packages/plugins/notifications/server.d.ts rename to packages/plugins/@nocobase/plugin-notifications/server.d.ts diff --git a/packages/plugins/notifications/server.js b/packages/plugins/@nocobase/plugin-notifications/server.js similarity index 100% rename from packages/plugins/notifications/server.js rename to packages/plugins/@nocobase/plugin-notifications/server.js diff --git a/packages/plugins/notifications/src/client/index.ts b/packages/plugins/@nocobase/plugin-notifications/src/client/index.ts similarity index 86% rename from packages/plugins/notifications/src/client/index.ts rename to packages/plugins/@nocobase/plugin-notifications/src/client/index.ts index d04148020..ea8c0651c 100644 --- a/packages/plugins/notifications/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-notifications/src/client/index.ts @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; class NotificationPlugin extends Plugin { - async load() { } + async load() {} } export default NotificationPlugin; diff --git a/packages/plugins/notifications/src/index.ts b/packages/plugins/@nocobase/plugin-notifications/src/index.ts similarity index 100% rename from packages/plugins/notifications/src/index.ts rename to packages/plugins/@nocobase/plugin-notifications/src/index.ts diff --git a/packages/plugins/notifications/src/server/__tests__/notifications.test.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/__tests__/notifications.test.ts similarity index 100% rename from packages/plugins/notifications/src/server/__tests__/notifications.test.ts rename to packages/plugins/@nocobase/plugin-notifications/src/server/__tests__/notifications.test.ts diff --git a/packages/plugins/notifications/src/server/collections/notification_logs.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/collections/notification_logs.ts similarity index 100% rename from packages/plugins/notifications/src/server/collections/notification_logs.ts rename to packages/plugins/@nocobase/plugin-notifications/src/server/collections/notification_logs.ts diff --git a/packages/plugins/notifications/src/server/collections/notification_services.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/collections/notification_services.ts similarity index 100% rename from packages/plugins/notifications/src/server/collections/notification_services.ts rename to packages/plugins/@nocobase/plugin-notifications/src/server/collections/notification_services.ts diff --git a/packages/plugins/notifications/src/server/collections/notifications.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/collections/notifications.ts similarity index 100% rename from packages/plugins/notifications/src/server/collections/notifications.ts rename to packages/plugins/@nocobase/plugin-notifications/src/server/collections/notifications.ts diff --git a/packages/plugins/notifications/src/server/index.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/index.ts similarity index 100% rename from packages/plugins/notifications/src/server/index.ts rename to packages/plugins/@nocobase/plugin-notifications/src/server/index.ts diff --git a/packages/plugins/notifications/src/server/models/Notification.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/models/Notification.ts similarity index 100% rename from packages/plugins/notifications/src/server/models/Notification.ts rename to packages/plugins/@nocobase/plugin-notifications/src/server/models/Notification.ts diff --git a/packages/plugins/notifications/src/server/models/NotificationLog.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/models/NotificationLog.ts similarity index 100% rename from packages/plugins/notifications/src/server/models/NotificationLog.ts rename to packages/plugins/@nocobase/plugin-notifications/src/server/models/NotificationLog.ts diff --git a/packages/plugins/notifications/src/server/models/NotificationService.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/models/NotificationService.ts similarity index 100% rename from packages/plugins/notifications/src/server/models/NotificationService.ts rename to packages/plugins/@nocobase/plugin-notifications/src/server/models/NotificationService.ts diff --git a/packages/plugins/notifications/src/server/models/index.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/models/index.ts similarity index 100% rename from packages/plugins/notifications/src/server/models/index.ts rename to packages/plugins/@nocobase/plugin-notifications/src/server/models/index.ts diff --git a/packages/plugins/notifications/src/server/server.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/server.ts similarity index 100% rename from packages/plugins/notifications/src/server/server.ts rename to packages/plugins/@nocobase/plugin-notifications/src/server/server.ts diff --git a/packages/plugins/oidc/.npmignore b/packages/plugins/@nocobase/plugin-oidc/.npmignore similarity index 100% rename from packages/plugins/oidc/.npmignore rename to packages/plugins/@nocobase/plugin-oidc/.npmignore diff --git a/packages/plugins/oidc/LICENSE b/packages/plugins/@nocobase/plugin-oidc/LICENSE similarity index 100% rename from packages/plugins/oidc/LICENSE rename to packages/plugins/@nocobase/plugin-oidc/LICENSE diff --git a/packages/plugins/oidc/README.md b/packages/plugins/@nocobase/plugin-oidc/README.md similarity index 100% rename from packages/plugins/oidc/README.md rename to packages/plugins/@nocobase/plugin-oidc/README.md diff --git a/packages/plugins/oidc/README.zh-CN.md b/packages/plugins/@nocobase/plugin-oidc/README.zh-CN.md similarity index 100% rename from packages/plugins/oidc/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-oidc/README.zh-CN.md diff --git a/packages/plugins/oidc/client.d.ts b/packages/plugins/@nocobase/plugin-oidc/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/oidc/client.d.ts rename to packages/plugins/@nocobase/plugin-oidc/client.d.ts diff --git a/packages/plugins/oidc/client.js b/packages/plugins/@nocobase/plugin-oidc/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/oidc/client.js rename to packages/plugins/@nocobase/plugin-oidc/client.js diff --git a/packages/plugins/oidc/package.json b/packages/plugins/@nocobase/plugin-oidc/package.json similarity index 65% rename from packages/plugins/oidc/package.json rename to packages/plugins/@nocobase/plugin-oidc/package.json index a9995609e..3a93ade75 100644 --- a/packages/plugins/oidc/package.json +++ b/packages/plugins/@nocobase/plugin-oidc/package.json @@ -1,9 +1,9 @@ { "name": "@nocobase/plugin-oidc", - "displayName": "SSO login - OpenID Connect", - "displayName.zh-CN": "SSO 登录 - OpenID Connect", - "description": "Provides SAML authentication and authorization functionality for applications or authentication systems.", - "description.zh-CN": "为应用程序或身份验证系统提供SAML认证和授权功能。", + "displayName": "OIDC (OpenID Connect) auth - SSO login", + "displayName.zh-CN": "OIDC (OpenID Connect) 认证 - SSO 登录", + "description": "OIDC (OpenID Connect) authentication for NocoBase", + "description.zh-CN": "OIDC (OpenID Connect) authentication for NocoBase", "version": "0.13.0-alpha.10", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/oidc/server.d.ts b/packages/plugins/@nocobase/plugin-oidc/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/oidc/server.d.ts rename to packages/plugins/@nocobase/plugin-oidc/server.d.ts diff --git a/packages/plugins/oidc/server.js b/packages/plugins/@nocobase/plugin-oidc/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/oidc/server.js rename to packages/plugins/@nocobase/plugin-oidc/server.js diff --git a/packages/plugins/oidc/src/client/OIDCButton.tsx b/packages/plugins/@nocobase/plugin-oidc/src/client/OIDCButton.tsx similarity index 100% rename from packages/plugins/oidc/src/client/OIDCButton.tsx rename to packages/plugins/@nocobase/plugin-oidc/src/client/OIDCButton.tsx diff --git a/packages/plugins/oidc/src/client/OidcProvider.tsx b/packages/plugins/@nocobase/plugin-oidc/src/client/OidcProvider.tsx similarity index 100% rename from packages/plugins/oidc/src/client/OidcProvider.tsx rename to packages/plugins/@nocobase/plugin-oidc/src/client/OidcProvider.tsx diff --git a/packages/plugins/oidc/src/client/Options.tsx b/packages/plugins/@nocobase/plugin-oidc/src/client/Options.tsx similarity index 100% rename from packages/plugins/oidc/src/client/Options.tsx rename to packages/plugins/@nocobase/plugin-oidc/src/client/Options.tsx diff --git a/packages/plugins/oidc/src/client/index.tsx b/packages/plugins/@nocobase/plugin-oidc/src/client/index.tsx similarity index 100% rename from packages/plugins/oidc/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-oidc/src/client/index.tsx diff --git a/packages/plugins/oidc/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-oidc/src/client/locale/index.ts similarity index 100% rename from packages/plugins/oidc/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-oidc/src/client/locale/index.ts diff --git a/packages/plugins/oidc/src/constants.ts b/packages/plugins/@nocobase/plugin-oidc/src/constants.ts similarity index 100% rename from packages/plugins/oidc/src/constants.ts rename to packages/plugins/@nocobase/plugin-oidc/src/constants.ts diff --git a/packages/plugins/oidc/src/index.ts b/packages/plugins/@nocobase/plugin-oidc/src/index.ts similarity index 100% rename from packages/plugins/oidc/src/index.ts rename to packages/plugins/@nocobase/plugin-oidc/src/index.ts diff --git a/packages/plugins/oidc/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-oidc/src/locale/en-US.ts similarity index 100% rename from packages/plugins/oidc/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-oidc/src/locale/en-US.ts diff --git a/packages/plugins/oidc/src/locale/es-ES.ts b/packages/plugins/@nocobase/plugin-oidc/src/locale/es-ES.ts similarity index 100% rename from packages/plugins/oidc/src/locale/es-ES.ts rename to packages/plugins/@nocobase/plugin-oidc/src/locale/es-ES.ts diff --git a/packages/plugins/oidc/src/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-oidc/src/locale/fr-FR.ts similarity index 100% rename from packages/plugins/oidc/src/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-oidc/src/locale/fr-FR.ts diff --git a/packages/plugins/oidc/src/locale/ja-JP.ts b/packages/plugins/@nocobase/plugin-oidc/src/locale/ja-JP.ts similarity index 100% rename from packages/plugins/oidc/src/locale/ja-JP.ts rename to packages/plugins/@nocobase/plugin-oidc/src/locale/ja-JP.ts diff --git a/packages/plugins/oidc/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-oidc/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/oidc/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-oidc/src/locale/pt-BR.ts diff --git a/packages/plugins/oidc/src/locale/ru-RU.ts b/packages/plugins/@nocobase/plugin-oidc/src/locale/ru-RU.ts similarity index 100% rename from packages/plugins/oidc/src/locale/ru-RU.ts rename to packages/plugins/@nocobase/plugin-oidc/src/locale/ru-RU.ts diff --git a/packages/plugins/oidc/src/locale/tr-TR.ts b/packages/plugins/@nocobase/plugin-oidc/src/locale/tr-TR.ts similarity index 100% rename from packages/plugins/oidc/src/locale/tr-TR.ts rename to packages/plugins/@nocobase/plugin-oidc/src/locale/tr-TR.ts diff --git a/packages/plugins/oidc/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-oidc/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/oidc/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-oidc/src/locale/zh-CN.ts diff --git a/packages/plugins/oidc/src/server/__tests__/oidc.test.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/__tests__/oidc.test.ts similarity index 100% rename from packages/plugins/oidc/src/server/__tests__/oidc.test.ts rename to packages/plugins/@nocobase/plugin-oidc/src/server/__tests__/oidc.test.ts diff --git a/packages/plugins/oidc/src/server/actions/getAuthUrl.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/actions/getAuthUrl.ts similarity index 100% rename from packages/plugins/oidc/src/server/actions/getAuthUrl.ts rename to packages/plugins/@nocobase/plugin-oidc/src/server/actions/getAuthUrl.ts diff --git a/packages/plugins/oidc/src/server/actions/redirect.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/actions/redirect.ts similarity index 100% rename from packages/plugins/oidc/src/server/actions/redirect.ts rename to packages/plugins/@nocobase/plugin-oidc/src/server/actions/redirect.ts diff --git a/packages/plugins/oidc/src/server/index.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/index.ts similarity index 100% rename from packages/plugins/oidc/src/server/index.ts rename to packages/plugins/@nocobase/plugin-oidc/src/server/index.ts diff --git a/packages/plugins/oidc/src/server/oidc-auth.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/oidc-auth.ts similarity index 100% rename from packages/plugins/oidc/src/server/oidc-auth.ts rename to packages/plugins/@nocobase/plugin-oidc/src/server/oidc-auth.ts diff --git a/packages/plugins/oidc/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/plugin.ts similarity index 100% rename from packages/plugins/oidc/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-oidc/src/server/plugin.ts diff --git a/packages/plugins/oidc/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-oidc/src/swagger/index.ts similarity index 100% rename from packages/plugins/oidc/src/swagger/index.ts rename to packages/plugins/@nocobase/plugin-oidc/src/swagger/index.ts diff --git a/packages/plugins/saml/.npmignore b/packages/plugins/@nocobase/plugin-saml/.npmignore similarity index 100% rename from packages/plugins/saml/.npmignore rename to packages/plugins/@nocobase/plugin-saml/.npmignore diff --git a/packages/plugins/saml/LICENSE b/packages/plugins/@nocobase/plugin-saml/LICENSE similarity index 100% rename from packages/plugins/saml/LICENSE rename to packages/plugins/@nocobase/plugin-saml/LICENSE diff --git a/packages/plugins/saml/README.md b/packages/plugins/@nocobase/plugin-saml/README.md similarity index 100% rename from packages/plugins/saml/README.md rename to packages/plugins/@nocobase/plugin-saml/README.md diff --git a/packages/plugins/saml/README.zh-CN.md b/packages/plugins/@nocobase/plugin-saml/README.zh-CN.md similarity index 100% rename from packages/plugins/saml/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-saml/README.zh-CN.md diff --git a/packages/plugins/saml/client.d.ts b/packages/plugins/@nocobase/plugin-saml/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/saml/client.d.ts rename to packages/plugins/@nocobase/plugin-saml/client.d.ts diff --git a/packages/plugins/saml/client.js b/packages/plugins/@nocobase/plugin-saml/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/saml/client.js rename to packages/plugins/@nocobase/plugin-saml/client.js diff --git a/packages/plugins/saml/package.json b/packages/plugins/@nocobase/plugin-saml/package.json similarity index 72% rename from packages/plugins/saml/package.json rename to packages/plugins/@nocobase/plugin-saml/package.json index 2754f1d3b..c42a19265 100644 --- a/packages/plugins/saml/package.json +++ b/packages/plugins/@nocobase/plugin-saml/package.json @@ -1,9 +1,9 @@ { "name": "@nocobase/plugin-saml", - "displayName": "SSO login - SAML", - "displayName.zh-CN": "SSO 登录 - SAML", - "description": "", - "description.zh-CN": "", + "displayName": "SAML auth - SSO login", + "displayName.zh-CN": "SAML 认证 - SSO 登录", + "description": "SAML authentication for NocoBase", + "description.zh-CN": "NocoBase 的 SAML 身份验证", "version": "0.13.0-alpha.10", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/saml/server.d.ts b/packages/plugins/@nocobase/plugin-saml/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/saml/server.d.ts rename to packages/plugins/@nocobase/plugin-saml/server.d.ts diff --git a/packages/plugins/saml/server.js b/packages/plugins/@nocobase/plugin-saml/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/saml/server.js rename to packages/plugins/@nocobase/plugin-saml/server.js diff --git a/packages/plugins/saml/src/client/Options.tsx b/packages/plugins/@nocobase/plugin-saml/src/client/Options.tsx similarity index 100% rename from packages/plugins/saml/src/client/Options.tsx rename to packages/plugins/@nocobase/plugin-saml/src/client/Options.tsx diff --git a/packages/plugins/saml/src/client/SAMLButton.tsx b/packages/plugins/@nocobase/plugin-saml/src/client/SAMLButton.tsx similarity index 100% rename from packages/plugins/saml/src/client/SAMLButton.tsx rename to packages/plugins/@nocobase/plugin-saml/src/client/SAMLButton.tsx diff --git a/packages/plugins/saml/src/client/SamlProvider.tsx b/packages/plugins/@nocobase/plugin-saml/src/client/SamlProvider.tsx similarity index 100% rename from packages/plugins/saml/src/client/SamlProvider.tsx rename to packages/plugins/@nocobase/plugin-saml/src/client/SamlProvider.tsx diff --git a/packages/plugins/saml/src/client/index.tsx b/packages/plugins/@nocobase/plugin-saml/src/client/index.tsx similarity index 100% rename from packages/plugins/saml/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-saml/src/client/index.tsx diff --git a/packages/plugins/saml/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-saml/src/client/locale/index.ts similarity index 100% rename from packages/plugins/saml/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-saml/src/client/locale/index.ts diff --git a/packages/plugins/saml/src/client/schemas/saml.ts b/packages/plugins/@nocobase/plugin-saml/src/client/schemas/saml.ts similarity index 100% rename from packages/plugins/saml/src/client/schemas/saml.ts rename to packages/plugins/@nocobase/plugin-saml/src/client/schemas/saml.ts diff --git a/packages/plugins/saml/src/constants.ts b/packages/plugins/@nocobase/plugin-saml/src/constants.ts similarity index 100% rename from packages/plugins/saml/src/constants.ts rename to packages/plugins/@nocobase/plugin-saml/src/constants.ts diff --git a/packages/plugins/saml/src/index.ts b/packages/plugins/@nocobase/plugin-saml/src/index.ts similarity index 100% rename from packages/plugins/saml/src/index.ts rename to packages/plugins/@nocobase/plugin-saml/src/index.ts diff --git a/packages/plugins/saml/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-saml/src/locale/en-US.ts similarity index 100% rename from packages/plugins/saml/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-saml/src/locale/en-US.ts diff --git a/packages/plugins/saml/src/locale/es-ES.ts b/packages/plugins/@nocobase/plugin-saml/src/locale/es-ES.ts similarity index 100% rename from packages/plugins/saml/src/locale/es-ES.ts rename to packages/plugins/@nocobase/plugin-saml/src/locale/es-ES.ts diff --git a/packages/plugins/saml/src/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-saml/src/locale/fr-FR.ts similarity index 100% rename from packages/plugins/saml/src/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-saml/src/locale/fr-FR.ts diff --git a/packages/plugins/saml/src/locale/ja-JP.ts b/packages/plugins/@nocobase/plugin-saml/src/locale/ja-JP.ts similarity index 100% rename from packages/plugins/saml/src/locale/ja-JP.ts rename to packages/plugins/@nocobase/plugin-saml/src/locale/ja-JP.ts diff --git a/packages/plugins/saml/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-saml/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/saml/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-saml/src/locale/pt-BR.ts diff --git a/packages/plugins/saml/src/locale/ru-RU.ts b/packages/plugins/@nocobase/plugin-saml/src/locale/ru-RU.ts similarity index 100% rename from packages/plugins/saml/src/locale/ru-RU.ts rename to packages/plugins/@nocobase/plugin-saml/src/locale/ru-RU.ts diff --git a/packages/plugins/saml/src/locale/tr-TR.ts b/packages/plugins/@nocobase/plugin-saml/src/locale/tr-TR.ts similarity index 100% rename from packages/plugins/saml/src/locale/tr-TR.ts rename to packages/plugins/@nocobase/plugin-saml/src/locale/tr-TR.ts diff --git a/packages/plugins/saml/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-saml/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/saml/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-saml/src/locale/zh-CN.ts diff --git a/packages/plugins/saml/src/server/__tests__/saml.test.ts b/packages/plugins/@nocobase/plugin-saml/src/server/__tests__/saml.test.ts similarity index 100% rename from packages/plugins/saml/src/server/__tests__/saml.test.ts rename to packages/plugins/@nocobase/plugin-saml/src/server/__tests__/saml.test.ts diff --git a/packages/plugins/saml/src/server/actions/getAuthUrl.ts b/packages/plugins/@nocobase/plugin-saml/src/server/actions/getAuthUrl.ts similarity index 100% rename from packages/plugins/saml/src/server/actions/getAuthUrl.ts rename to packages/plugins/@nocobase/plugin-saml/src/server/actions/getAuthUrl.ts diff --git a/packages/plugins/saml/src/server/actions/metadata.ts b/packages/plugins/@nocobase/plugin-saml/src/server/actions/metadata.ts similarity index 100% rename from packages/plugins/saml/src/server/actions/metadata.ts rename to packages/plugins/@nocobase/plugin-saml/src/server/actions/metadata.ts diff --git a/packages/plugins/saml/src/server/actions/redirect.ts b/packages/plugins/@nocobase/plugin-saml/src/server/actions/redirect.ts similarity index 100% rename from packages/plugins/saml/src/server/actions/redirect.ts rename to packages/plugins/@nocobase/plugin-saml/src/server/actions/redirect.ts diff --git a/packages/plugins/saml/src/server/index.ts b/packages/plugins/@nocobase/plugin-saml/src/server/index.ts similarity index 100% rename from packages/plugins/saml/src/server/index.ts rename to packages/plugins/@nocobase/plugin-saml/src/server/index.ts diff --git a/packages/plugins/saml/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-saml/src/server/plugin.ts similarity index 100% rename from packages/plugins/saml/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-saml/src/server/plugin.ts diff --git a/packages/plugins/saml/src/server/saml-auth.ts b/packages/plugins/@nocobase/plugin-saml/src/server/saml-auth.ts similarity index 100% rename from packages/plugins/saml/src/server/saml-auth.ts rename to packages/plugins/@nocobase/plugin-saml/src/server/saml-auth.ts diff --git a/packages/plugins/saml/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-saml/src/swagger/index.ts similarity index 100% rename from packages/plugins/saml/src/swagger/index.ts rename to packages/plugins/@nocobase/plugin-saml/src/swagger/index.ts diff --git a/packages/plugins/sequence-field/.npmignore b/packages/plugins/@nocobase/plugin-sample-command/.npmignore similarity index 100% rename from packages/plugins/sequence-field/.npmignore rename to packages/plugins/@nocobase/plugin-sample-command/.npmignore diff --git a/packages/samples/command/README.md b/packages/plugins/@nocobase/plugin-sample-command/README.md similarity index 100% rename from packages/samples/command/README.md rename to packages/plugins/@nocobase/plugin-sample-command/README.md diff --git a/packages/plugins/sequence-field/client.d.ts b/packages/plugins/@nocobase/plugin-sample-command/client.d.ts similarity index 100% rename from packages/plugins/sequence-field/client.d.ts rename to packages/plugins/@nocobase/plugin-sample-command/client.d.ts diff --git a/packages/plugins/sequence-field/client.js b/packages/plugins/@nocobase/plugin-sample-command/client.js similarity index 100% rename from packages/plugins/sequence-field/client.js rename to packages/plugins/@nocobase/plugin-sample-command/client.js diff --git a/packages/samples/command/package.json b/packages/plugins/@nocobase/plugin-sample-command/package.json similarity index 100% rename from packages/samples/command/package.json rename to packages/plugins/@nocobase/plugin-sample-command/package.json diff --git a/packages/plugins/sequence-field/server.d.ts b/packages/plugins/@nocobase/plugin-sample-command/server.d.ts similarity index 100% rename from packages/plugins/sequence-field/server.d.ts rename to packages/plugins/@nocobase/plugin-sample-command/server.d.ts diff --git a/packages/plugins/sequence-field/server.js b/packages/plugins/@nocobase/plugin-sample-command/server.js similarity index 100% rename from packages/plugins/sequence-field/server.js rename to packages/plugins/@nocobase/plugin-sample-command/server.js diff --git a/packages/samples/command/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sample-command/src/client/index.tsx similarity index 85% rename from packages/samples/command/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-sample-command/src/client/index.tsx index 444d9965e..3b0e8aece 100644 --- a/packages/samples/command/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-sample-command/src/client/index.tsx @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; class DemoPlugin extends Plugin { - async load() { } + async load() {} } export default DemoPlugin; diff --git a/packages/plugins/sequence-field/src/index.ts b/packages/plugins/@nocobase/plugin-sample-command/src/index.ts similarity index 100% rename from packages/plugins/sequence-field/src/index.ts rename to packages/plugins/@nocobase/plugin-sample-command/src/index.ts diff --git a/packages/plugins/sms-auth/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-sample-command/src/server/actions/.gitkeep similarity index 100% rename from packages/plugins/sms-auth/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-command/src/server/actions/.gitkeep diff --git a/packages/plugins/snapshot-field/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-sample-command/src/server/collections/.gitkeep similarity index 100% rename from packages/plugins/snapshot-field/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-command/src/server/collections/.gitkeep diff --git a/packages/samples/command/src/server/index.ts b/packages/plugins/@nocobase/plugin-sample-command/src/server/index.ts similarity index 100% rename from packages/samples/command/src/server/index.ts rename to packages/plugins/@nocobase/plugin-sample-command/src/server/index.ts diff --git a/packages/plugins/theme-editor/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-sample-command/src/server/models/.gitkeep similarity index 100% rename from packages/plugins/theme-editor/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-command/src/server/models/.gitkeep diff --git a/packages/samples/command/src/server/actions/.gitkeep b/packages/plugins/@nocobase/plugin-sample-command/src/server/repositories/.gitkeep similarity index 100% rename from packages/samples/command/src/server/actions/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-command/src/server/repositories/.gitkeep diff --git a/packages/plugins/sms-auth/.npmignore b/packages/plugins/@nocobase/plugin-sample-custom-block/.npmignore similarity index 100% rename from packages/plugins/sms-auth/.npmignore rename to packages/plugins/@nocobase/plugin-sample-custom-block/.npmignore diff --git a/packages/samples/custom-block/README.md b/packages/plugins/@nocobase/plugin-sample-custom-block/README.md similarity index 100% rename from packages/samples/custom-block/README.md rename to packages/plugins/@nocobase/plugin-sample-custom-block/README.md diff --git a/packages/plugins/sms-auth/client.d.ts b/packages/plugins/@nocobase/plugin-sample-custom-block/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/sms-auth/client.d.ts rename to packages/plugins/@nocobase/plugin-sample-custom-block/client.d.ts diff --git a/packages/plugins/snapshot-field/client.js b/packages/plugins/@nocobase/plugin-sample-custom-block/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/snapshot-field/client.js rename to packages/plugins/@nocobase/plugin-sample-custom-block/client.js diff --git a/packages/samples/custom-block/package.json b/packages/plugins/@nocobase/plugin-sample-custom-block/package.json similarity index 100% rename from packages/samples/custom-block/package.json rename to packages/plugins/@nocobase/plugin-sample-custom-block/package.json diff --git a/packages/plugins/sms-auth/server.d.ts b/packages/plugins/@nocobase/plugin-sample-custom-block/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/sms-auth/server.d.ts rename to packages/plugins/@nocobase/plugin-sample-custom-block/server.d.ts diff --git a/packages/plugins/snapshot-field/server.js b/packages/plugins/@nocobase/plugin-sample-custom-block/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/snapshot-field/server.js rename to packages/plugins/@nocobase/plugin-sample-custom-block/server.js diff --git a/packages/samples/custom-block/src/client/HelloDesigner.tsx b/packages/plugins/@nocobase/plugin-sample-custom-block/src/client/HelloDesigner.tsx similarity index 100% rename from packages/samples/custom-block/src/client/HelloDesigner.tsx rename to packages/plugins/@nocobase/plugin-sample-custom-block/src/client/HelloDesigner.tsx diff --git a/packages/samples/custom-block/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sample-custom-block/src/client/index.tsx similarity index 100% rename from packages/samples/custom-block/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-sample-custom-block/src/client/index.tsx diff --git a/packages/plugins/sms-auth/src/index.ts b/packages/plugins/@nocobase/plugin-sample-custom-block/src/index.ts similarity index 100% rename from packages/plugins/sms-auth/src/index.ts rename to packages/plugins/@nocobase/plugin-sample-custom-block/src/index.ts diff --git a/packages/samples/custom-block/src/server/index.ts b/packages/plugins/@nocobase/plugin-sample-custom-block/src/server/index.ts similarity index 100% rename from packages/samples/custom-block/src/server/index.ts rename to packages/plugins/@nocobase/plugin-sample-custom-block/src/server/index.ts diff --git a/packages/plugins/snapshot-field/.npmignore b/packages/plugins/@nocobase/plugin-sample-custom-collection-template/.npmignore similarity index 100% rename from packages/plugins/snapshot-field/.npmignore rename to packages/plugins/@nocobase/plugin-sample-custom-collection-template/.npmignore diff --git a/packages/samples/custom-collection-template/README.md b/packages/plugins/@nocobase/plugin-sample-custom-collection-template/README.md similarity index 100% rename from packages/samples/custom-collection-template/README.md rename to packages/plugins/@nocobase/plugin-sample-custom-collection-template/README.md diff --git a/packages/plugins/snapshot-field/client.d.ts b/packages/plugins/@nocobase/plugin-sample-custom-collection-template/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/snapshot-field/client.d.ts rename to packages/plugins/@nocobase/plugin-sample-custom-collection-template/client.d.ts diff --git a/packages/plugins/system-settings/client.js b/packages/plugins/@nocobase/plugin-sample-custom-collection-template/client.js similarity index 100% rename from packages/plugins/system-settings/client.js rename to packages/plugins/@nocobase/plugin-sample-custom-collection-template/client.js diff --git a/packages/samples/custom-collection-template/package.json b/packages/plugins/@nocobase/plugin-sample-custom-collection-template/package.json similarity index 100% rename from packages/samples/custom-collection-template/package.json rename to packages/plugins/@nocobase/plugin-sample-custom-collection-template/package.json diff --git a/packages/samples/custom-collection-template/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sample-custom-collection-template/src/client/index.tsx similarity index 100% rename from packages/samples/custom-collection-template/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-sample-custom-collection-template/src/client/index.tsx diff --git a/packages/plugins/snapshot-field/src/index.ts b/packages/plugins/@nocobase/plugin-sample-custom-collection-template/src/index.ts similarity index 100% rename from packages/plugins/snapshot-field/src/index.ts rename to packages/plugins/@nocobase/plugin-sample-custom-collection-template/src/index.ts diff --git a/packages/samples/custom-collection-template/src/server/index.ts b/packages/plugins/@nocobase/plugin-sample-custom-collection-template/src/server/index.ts similarity index 100% rename from packages/samples/custom-collection-template/src/server/index.ts rename to packages/plugins/@nocobase/plugin-sample-custom-collection-template/src/server/index.ts diff --git a/packages/plugins/system-settings/.npmignore b/packages/plugins/@nocobase/plugin-sample-custom-page/.npmignore similarity index 100% rename from packages/plugins/system-settings/.npmignore rename to packages/plugins/@nocobase/plugin-sample-custom-page/.npmignore diff --git a/packages/samples/custom-page/README.md b/packages/plugins/@nocobase/plugin-sample-custom-page/README.md similarity index 100% rename from packages/samples/custom-page/README.md rename to packages/plugins/@nocobase/plugin-sample-custom-page/README.md diff --git a/packages/plugins/system-settings/client.d.ts b/packages/plugins/@nocobase/plugin-sample-custom-page/client.d.ts similarity index 100% rename from packages/plugins/system-settings/client.d.ts rename to packages/plugins/@nocobase/plugin-sample-custom-page/client.d.ts diff --git a/packages/plugins/ui-routes-storage/client.js b/packages/plugins/@nocobase/plugin-sample-custom-page/client.js similarity index 100% rename from packages/plugins/ui-routes-storage/client.js rename to packages/plugins/@nocobase/plugin-sample-custom-page/client.js diff --git a/packages/samples/custom-page/package.json b/packages/plugins/@nocobase/plugin-sample-custom-page/package.json similarity index 100% rename from packages/samples/custom-page/package.json rename to packages/plugins/@nocobase/plugin-sample-custom-page/package.json diff --git a/packages/plugins/snapshot-field/server.d.ts b/packages/plugins/@nocobase/plugin-sample-custom-page/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/snapshot-field/server.d.ts rename to packages/plugins/@nocobase/plugin-sample-custom-page/server.d.ts diff --git a/packages/plugins/system-settings/server.js b/packages/plugins/@nocobase/plugin-sample-custom-page/server.js similarity index 100% rename from packages/plugins/system-settings/server.js rename to packages/plugins/@nocobase/plugin-sample-custom-page/server.js diff --git a/packages/samples/custom-page/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sample-custom-page/src/client/index.tsx similarity index 100% rename from packages/samples/custom-page/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-sample-custom-page/src/client/index.tsx diff --git a/packages/plugins/system-settings/src/index.ts b/packages/plugins/@nocobase/plugin-sample-custom-page/src/index.ts similarity index 100% rename from packages/plugins/system-settings/src/index.ts rename to packages/plugins/@nocobase/plugin-sample-custom-page/src/index.ts diff --git a/packages/samples/custom-page/src/server/index.ts b/packages/plugins/@nocobase/plugin-sample-custom-page/src/server/index.ts similarity index 100% rename from packages/samples/custom-page/src/server/index.ts rename to packages/plugins/@nocobase/plugin-sample-custom-page/src/server/index.ts diff --git a/packages/plugins/theme-editor/.npmignore b/packages/plugins/@nocobase/plugin-sample-custom-signup-page/.npmignore similarity index 100% rename from packages/plugins/theme-editor/.npmignore rename to packages/plugins/@nocobase/plugin-sample-custom-signup-page/.npmignore diff --git a/packages/samples/custom-signup-page/README.md b/packages/plugins/@nocobase/plugin-sample-custom-signup-page/README.md similarity index 100% rename from packages/samples/custom-signup-page/README.md rename to packages/plugins/@nocobase/plugin-sample-custom-signup-page/README.md diff --git a/packages/plugins/ui-routes-storage/client.d.ts b/packages/plugins/@nocobase/plugin-sample-custom-signup-page/client.d.ts similarity index 100% rename from packages/plugins/ui-routes-storage/client.d.ts rename to packages/plugins/@nocobase/plugin-sample-custom-signup-page/client.d.ts diff --git a/packages/plugins/ui-schema-storage/client.js b/packages/plugins/@nocobase/plugin-sample-custom-signup-page/client.js similarity index 100% rename from packages/plugins/ui-schema-storage/client.js rename to packages/plugins/@nocobase/plugin-sample-custom-signup-page/client.js diff --git a/packages/samples/custom-signup-page/package.json b/packages/plugins/@nocobase/plugin-sample-custom-signup-page/package.json similarity index 100% rename from packages/samples/custom-signup-page/package.json rename to packages/plugins/@nocobase/plugin-sample-custom-signup-page/package.json diff --git a/packages/plugins/system-settings/server.d.ts b/packages/plugins/@nocobase/plugin-sample-custom-signup-page/server.d.ts similarity index 100% rename from packages/plugins/system-settings/server.d.ts rename to packages/plugins/@nocobase/plugin-sample-custom-signup-page/server.d.ts diff --git a/packages/plugins/ui-routes-storage/server.js b/packages/plugins/@nocobase/plugin-sample-custom-signup-page/server.js similarity index 100% rename from packages/plugins/ui-routes-storage/server.js rename to packages/plugins/@nocobase/plugin-sample-custom-signup-page/server.js diff --git a/packages/samples/custom-signup-page/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sample-custom-signup-page/src/client/index.tsx similarity index 100% rename from packages/samples/custom-signup-page/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-sample-custom-signup-page/src/client/index.tsx diff --git a/packages/plugins/theme-editor/src/index.ts b/packages/plugins/@nocobase/plugin-sample-custom-signup-page/src/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/index.ts rename to packages/plugins/@nocobase/plugin-sample-custom-signup-page/src/index.ts diff --git a/packages/samples/custom-signup-page/src/server/index.ts b/packages/plugins/@nocobase/plugin-sample-custom-signup-page/src/server/index.ts similarity index 100% rename from packages/samples/custom-signup-page/src/server/index.ts rename to packages/plugins/@nocobase/plugin-sample-custom-signup-page/src/server/index.ts diff --git a/packages/plugins/ui-routes-storage/.npmignore b/packages/plugins/@nocobase/plugin-sample-hello/.npmignore similarity index 100% rename from packages/plugins/ui-routes-storage/.npmignore rename to packages/plugins/@nocobase/plugin-sample-hello/.npmignore diff --git a/packages/samples/hello/README.md b/packages/plugins/@nocobase/plugin-sample-hello/README.md similarity index 100% rename from packages/samples/hello/README.md rename to packages/plugins/@nocobase/plugin-sample-hello/README.md diff --git a/packages/plugins/ui-schema-storage/client.d.ts b/packages/plugins/@nocobase/plugin-sample-hello/client.d.ts similarity index 100% rename from packages/plugins/ui-schema-storage/client.d.ts rename to packages/plugins/@nocobase/plugin-sample-hello/client.d.ts diff --git a/packages/plugins/verification/client.js b/packages/plugins/@nocobase/plugin-sample-hello/client.js similarity index 100% rename from packages/plugins/verification/client.js rename to packages/plugins/@nocobase/plugin-sample-hello/client.js diff --git a/packages/samples/hello/package.json b/packages/plugins/@nocobase/plugin-sample-hello/package.json similarity index 63% rename from packages/samples/hello/package.json rename to packages/plugins/@nocobase/plugin-sample-hello/package.json index 272c4d58b..9ae7169cd 100644 --- a/packages/samples/hello/package.json +++ b/packages/plugins/@nocobase/plugin-sample-hello/package.json @@ -2,10 +2,10 @@ "name": "@nocobase/plugin-sample-hello", "version": "0.13.0-alpha.10", "main": "./dist/server/index.js", - "displayName": "Sample-Hello", - "displayName.zh-CN": "插件demo-hello", - "description": "simple plugin demo", - "description.zh-CN": "这就是一个简单的插件demo", + "displayName": "Hello", + "displayName.zh-CN": "Hello", + "description": "A simple NocoBase plugin example", + "description.zh-CN": "一个简单的 NocoBase 插件", "devDependencies": { "@ant-design/icons": "5.x", "@formily/react": "2.x", @@ -18,5 +18,5 @@ "@nocobase/server": "0.x", "@nocobase/test": "0.x" }, - "gitHead": "ce588eefb0bfc50f7d5bbee575e0b5e843bf6644" + "gitHead": "ee5825377d8bec05f968a8365a0cdcd49878ada6" } diff --git a/packages/plugins/ui-routes-storage/server.d.ts b/packages/plugins/@nocobase/plugin-sample-hello/server.d.ts similarity index 100% rename from packages/plugins/ui-routes-storage/server.d.ts rename to packages/plugins/@nocobase/plugin-sample-hello/server.d.ts diff --git a/packages/plugins/ui-schema-storage/server.js b/packages/plugins/@nocobase/plugin-sample-hello/server.js similarity index 100% rename from packages/plugins/ui-schema-storage/server.js rename to packages/plugins/@nocobase/plugin-sample-hello/server.js diff --git a/packages/samples/hello/src/client/HelloDesigner.tsx b/packages/plugins/@nocobase/plugin-sample-hello/src/client/HelloDesigner.tsx similarity index 100% rename from packages/samples/hello/src/client/HelloDesigner.tsx rename to packages/plugins/@nocobase/plugin-sample-hello/src/client/HelloDesigner.tsx diff --git a/packages/samples/hello/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sample-hello/src/client/index.tsx similarity index 100% rename from packages/samples/hello/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-sample-hello/src/client/index.tsx diff --git a/packages/plugins/ui-routes-storage/src/index.ts b/packages/plugins/@nocobase/plugin-sample-hello/src/index.ts similarity index 100% rename from packages/plugins/ui-routes-storage/src/index.ts rename to packages/plugins/@nocobase/plugin-sample-hello/src/index.ts diff --git a/packages/samples/command/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-sample-hello/src/server/actions/.gitkeep similarity index 100% rename from packages/samples/command/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-hello/src/server/actions/.gitkeep diff --git a/packages/samples/command/src/server/models/.gitkeep b/packages/plugins/@nocobase/plugin-sample-hello/src/server/collections/.gitkeep similarity index 100% rename from packages/samples/command/src/server/models/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-hello/src/server/collections/.gitkeep diff --git a/packages/samples/hello/src/server/index.ts b/packages/plugins/@nocobase/plugin-sample-hello/src/server/index.ts similarity index 100% rename from packages/samples/hello/src/server/index.ts rename to packages/plugins/@nocobase/plugin-sample-hello/src/server/index.ts diff --git a/packages/samples/command/src/server/repositories/.gitkeep b/packages/plugins/@nocobase/plugin-sample-hello/src/server/models/.gitkeep similarity index 100% rename from packages/samples/command/src/server/repositories/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-hello/src/server/models/.gitkeep diff --git a/packages/samples/hello/src/server/actions/.gitkeep b/packages/plugins/@nocobase/plugin-sample-hello/src/server/repositories/.gitkeep similarity index 100% rename from packages/samples/hello/src/server/actions/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-hello/src/server/repositories/.gitkeep diff --git a/packages/plugins/ui-schema-storage/.npmignore b/packages/plugins/@nocobase/plugin-sample-ratelimit/.npmignore similarity index 100% rename from packages/plugins/ui-schema-storage/.npmignore rename to packages/plugins/@nocobase/plugin-sample-ratelimit/.npmignore diff --git a/packages/samples/ratelimit/README.md b/packages/plugins/@nocobase/plugin-sample-ratelimit/README.md similarity index 100% rename from packages/samples/ratelimit/README.md rename to packages/plugins/@nocobase/plugin-sample-ratelimit/README.md diff --git a/packages/plugins/verification/client.d.ts b/packages/plugins/@nocobase/plugin-sample-ratelimit/client.d.ts similarity index 100% rename from packages/plugins/verification/client.d.ts rename to packages/plugins/@nocobase/plugin-sample-ratelimit/client.d.ts diff --git a/packages/plugins/workflow/client.js b/packages/plugins/@nocobase/plugin-sample-ratelimit/client.js similarity index 100% rename from packages/plugins/workflow/client.js rename to packages/plugins/@nocobase/plugin-sample-ratelimit/client.js diff --git a/packages/samples/ratelimit/package.json b/packages/plugins/@nocobase/plugin-sample-ratelimit/package.json similarity index 100% rename from packages/samples/ratelimit/package.json rename to packages/plugins/@nocobase/plugin-sample-ratelimit/package.json diff --git a/packages/plugins/ui-schema-storage/server.d.ts b/packages/plugins/@nocobase/plugin-sample-ratelimit/server.d.ts similarity index 100% rename from packages/plugins/ui-schema-storage/server.d.ts rename to packages/plugins/@nocobase/plugin-sample-ratelimit/server.d.ts diff --git a/packages/plugins/verification/server.js b/packages/plugins/@nocobase/plugin-sample-ratelimit/server.js similarity index 100% rename from packages/plugins/verification/server.js rename to packages/plugins/@nocobase/plugin-sample-ratelimit/server.js diff --git a/packages/samples/ratelimit/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sample-ratelimit/src/client/index.tsx similarity index 86% rename from packages/samples/ratelimit/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-sample-ratelimit/src/client/index.tsx index 000f01101..05db84589 100644 --- a/packages/samples/ratelimit/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-sample-ratelimit/src/client/index.tsx @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; class RateLimitPlugin extends Plugin { - async load() { } + async load() {} } export default RateLimitPlugin; diff --git a/packages/plugins/users/src/index.ts b/packages/plugins/@nocobase/plugin-sample-ratelimit/src/index.ts similarity index 100% rename from packages/plugins/users/src/index.ts rename to packages/plugins/@nocobase/plugin-sample-ratelimit/src/index.ts diff --git a/packages/samples/ratelimit/src/server/index.ts b/packages/plugins/@nocobase/plugin-sample-ratelimit/src/server/index.ts similarity index 100% rename from packages/samples/ratelimit/src/server/index.ts rename to packages/plugins/@nocobase/plugin-sample-ratelimit/src/server/index.ts diff --git a/packages/plugins/users/.npmignore b/packages/plugins/@nocobase/plugin-sample-shop-actions/.npmignore similarity index 100% rename from packages/plugins/users/.npmignore rename to packages/plugins/@nocobase/plugin-sample-shop-actions/.npmignore diff --git a/packages/samples/shop-actions/README.md b/packages/plugins/@nocobase/plugin-sample-shop-actions/README.md similarity index 100% rename from packages/samples/shop-actions/README.md rename to packages/plugins/@nocobase/plugin-sample-shop-actions/README.md diff --git a/packages/samples/shop-actions/__tests__/server/index.test.ts b/packages/plugins/@nocobase/plugin-sample-shop-actions/__tests__/server/index.test.ts similarity index 100% rename from packages/samples/shop-actions/__tests__/server/index.test.ts rename to packages/plugins/@nocobase/plugin-sample-shop-actions/__tests__/server/index.test.ts diff --git a/packages/plugins/workflow/client.d.ts b/packages/plugins/@nocobase/plugin-sample-shop-actions/client.d.ts similarity index 100% rename from packages/plugins/workflow/client.d.ts rename to packages/plugins/@nocobase/plugin-sample-shop-actions/client.d.ts diff --git a/packages/samples/command/client.js b/packages/plugins/@nocobase/plugin-sample-shop-actions/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/command/client.js rename to packages/plugins/@nocobase/plugin-sample-shop-actions/client.js diff --git a/packages/samples/shop-actions/package.json b/packages/plugins/@nocobase/plugin-sample-shop-actions/package.json similarity index 100% rename from packages/samples/shop-actions/package.json rename to packages/plugins/@nocobase/plugin-sample-shop-actions/package.json diff --git a/packages/plugins/verification/server.d.ts b/packages/plugins/@nocobase/plugin-sample-shop-actions/server.d.ts similarity index 100% rename from packages/plugins/verification/server.d.ts rename to packages/plugins/@nocobase/plugin-sample-shop-actions/server.d.ts diff --git a/packages/plugins/workflow/server.js b/packages/plugins/@nocobase/plugin-sample-shop-actions/server.js similarity index 100% rename from packages/plugins/workflow/server.js rename to packages/plugins/@nocobase/plugin-sample-shop-actions/server.js diff --git a/packages/samples/shop-actions/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sample-shop-actions/src/client/index.tsx similarity index 86% rename from packages/samples/shop-actions/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-sample-shop-actions/src/client/index.tsx index 941cc5a92..d5bbf2fd6 100644 --- a/packages/samples/shop-actions/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-sample-shop-actions/src/client/index.tsx @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; class ShopActionsPlugin extends Plugin { - async load() { } + async load() {} } export default ShopActionsPlugin; diff --git a/packages/plugins/verification/src/index.ts b/packages/plugins/@nocobase/plugin-sample-shop-actions/src/index.ts similarity index 100% rename from packages/plugins/verification/src/index.ts rename to packages/plugins/@nocobase/plugin-sample-shop-actions/src/index.ts diff --git a/packages/samples/hello/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/actions/.gitkeep similarity index 100% rename from packages/samples/hello/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/actions/.gitkeep diff --git a/packages/samples/hello/src/server/models/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/collections/.gitkeep similarity index 100% rename from packages/samples/hello/src/server/models/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/collections/.gitkeep diff --git a/packages/samples/shop-actions/src/server/collections/categories.ts b/packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/collections/categories.ts similarity index 100% rename from packages/samples/shop-actions/src/server/collections/categories.ts rename to packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/collections/categories.ts diff --git a/packages/samples/shop-actions/src/server/collections/deliveries.ts b/packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/collections/deliveries.ts similarity index 100% rename from packages/samples/shop-actions/src/server/collections/deliveries.ts rename to packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/collections/deliveries.ts diff --git a/packages/samples/shop-actions/src/server/collections/orders.ts b/packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/collections/orders.ts similarity index 100% rename from packages/samples/shop-actions/src/server/collections/orders.ts rename to packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/collections/orders.ts diff --git a/packages/samples/shop-actions/src/server/collections/products.ts b/packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/collections/products.ts similarity index 100% rename from packages/samples/shop-actions/src/server/collections/products.ts rename to packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/collections/products.ts diff --git a/packages/samples/shop-actions/src/server/index.ts b/packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/index.ts similarity index 100% rename from packages/samples/shop-actions/src/server/index.ts rename to packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/index.ts diff --git a/packages/samples/hello/src/server/repositories/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/models/.gitkeep similarity index 100% rename from packages/samples/hello/src/server/repositories/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/models/.gitkeep diff --git a/packages/samples/shop-actions/src/server/actions/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/repositories/.gitkeep similarity index 100% rename from packages/samples/shop-actions/src/server/actions/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-actions/src/server/repositories/.gitkeep diff --git a/packages/plugins/verification/.npmignore b/packages/plugins/@nocobase/plugin-sample-shop-events/.npmignore similarity index 100% rename from packages/plugins/verification/.npmignore rename to packages/plugins/@nocobase/plugin-sample-shop-events/.npmignore diff --git a/packages/samples/shop-events/README.md b/packages/plugins/@nocobase/plugin-sample-shop-events/README.md similarity index 100% rename from packages/samples/shop-events/README.md rename to packages/plugins/@nocobase/plugin-sample-shop-events/README.md diff --git a/packages/samples/command/client.d.ts b/packages/plugins/@nocobase/plugin-sample-shop-events/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/command/client.d.ts rename to packages/plugins/@nocobase/plugin-sample-shop-events/client.d.ts diff --git a/packages/samples/custom-block/client.js b/packages/plugins/@nocobase/plugin-sample-shop-events/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/custom-block/client.js rename to packages/plugins/@nocobase/plugin-sample-shop-events/client.js diff --git a/packages/samples/shop-events/package.json b/packages/plugins/@nocobase/plugin-sample-shop-events/package.json similarity index 100% rename from packages/samples/shop-events/package.json rename to packages/plugins/@nocobase/plugin-sample-shop-events/package.json diff --git a/packages/plugins/workflow/server.d.ts b/packages/plugins/@nocobase/plugin-sample-shop-events/server.d.ts similarity index 100% rename from packages/plugins/workflow/server.d.ts rename to packages/plugins/@nocobase/plugin-sample-shop-events/server.d.ts diff --git a/packages/samples/command/server.js b/packages/plugins/@nocobase/plugin-sample-shop-events/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/command/server.js rename to packages/plugins/@nocobase/plugin-sample-shop-events/server.js diff --git a/packages/samples/shop-events/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sample-shop-events/src/client/index.tsx similarity index 86% rename from packages/samples/shop-events/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-sample-shop-events/src/client/index.tsx index 4102dc68c..774cecf2d 100644 --- a/packages/samples/shop-events/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-sample-shop-events/src/client/index.tsx @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; class ShopEventsPlugin extends Plugin { - async load() { } + async load() {} } export default ShopEventsPlugin; diff --git a/packages/plugins/workflow/src/index.ts b/packages/plugins/@nocobase/plugin-sample-shop-events/src/index.ts similarity index 100% rename from packages/plugins/workflow/src/index.ts rename to packages/plugins/@nocobase/plugin-sample-shop-events/src/index.ts diff --git a/packages/samples/shop-actions/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-events/src/server/actions/.gitkeep similarity index 100% rename from packages/samples/shop-actions/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-events/src/server/actions/.gitkeep diff --git a/packages/samples/shop-actions/src/server/models/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-events/src/server/collections/.gitkeep similarity index 100% rename from packages/samples/shop-actions/src/server/models/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-events/src/server/collections/.gitkeep diff --git a/packages/samples/shop-events/src/server/collections/categories.ts b/packages/plugins/@nocobase/plugin-sample-shop-events/src/server/collections/categories.ts similarity index 100% rename from packages/samples/shop-events/src/server/collections/categories.ts rename to packages/plugins/@nocobase/plugin-sample-shop-events/src/server/collections/categories.ts diff --git a/packages/samples/shop-events/src/server/collections/deliveries.ts b/packages/plugins/@nocobase/plugin-sample-shop-events/src/server/collections/deliveries.ts similarity index 100% rename from packages/samples/shop-events/src/server/collections/deliveries.ts rename to packages/plugins/@nocobase/plugin-sample-shop-events/src/server/collections/deliveries.ts diff --git a/packages/samples/shop-events/src/server/collections/orders.ts b/packages/plugins/@nocobase/plugin-sample-shop-events/src/server/collections/orders.ts similarity index 100% rename from packages/samples/shop-events/src/server/collections/orders.ts rename to packages/plugins/@nocobase/plugin-sample-shop-events/src/server/collections/orders.ts diff --git a/packages/samples/shop-events/src/server/collections/products.ts b/packages/plugins/@nocobase/plugin-sample-shop-events/src/server/collections/products.ts similarity index 100% rename from packages/samples/shop-events/src/server/collections/products.ts rename to packages/plugins/@nocobase/plugin-sample-shop-events/src/server/collections/products.ts diff --git a/packages/samples/shop-events/src/server/index.ts b/packages/plugins/@nocobase/plugin-sample-shop-events/src/server/index.ts similarity index 100% rename from packages/samples/shop-events/src/server/index.ts rename to packages/plugins/@nocobase/plugin-sample-shop-events/src/server/index.ts diff --git a/packages/samples/shop-actions/src/server/repositories/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-events/src/server/models/.gitkeep similarity index 100% rename from packages/samples/shop-actions/src/server/repositories/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-events/src/server/models/.gitkeep diff --git a/packages/samples/shop-events/src/server/actions/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-events/src/server/repositories/.gitkeep similarity index 100% rename from packages/samples/shop-events/src/server/actions/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-events/src/server/repositories/.gitkeep diff --git a/packages/plugins/workflow/.npmignore b/packages/plugins/@nocobase/plugin-sample-shop-i18n/.npmignore similarity index 100% rename from packages/plugins/workflow/.npmignore rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/.npmignore diff --git a/packages/samples/shop-i18n/README.md b/packages/plugins/@nocobase/plugin-sample-shop-i18n/README.md similarity index 100% rename from packages/samples/shop-i18n/README.md rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/README.md diff --git a/packages/samples/custom-block/client.d.ts b/packages/plugins/@nocobase/plugin-sample-shop-i18n/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/custom-block/client.d.ts rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/client.d.ts diff --git a/packages/samples/custom-collection-template/client.js b/packages/plugins/@nocobase/plugin-sample-shop-i18n/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/custom-collection-template/client.js rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/client.js diff --git a/packages/samples/shop-i18n/package.json b/packages/plugins/@nocobase/plugin-sample-shop-i18n/package.json similarity index 100% rename from packages/samples/shop-i18n/package.json rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/package.json diff --git a/packages/samples/command/server.d.ts b/packages/plugins/@nocobase/plugin-sample-shop-i18n/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/command/server.d.ts rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/server.d.ts diff --git a/packages/samples/custom-block/server.js b/packages/plugins/@nocobase/plugin-sample-shop-i18n/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/custom-block/server.js rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/server.js diff --git a/packages/samples/shop-i18n/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sample-shop-i18n/src/client/index.tsx similarity index 100% rename from packages/samples/shop-i18n/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/src/client/index.tsx diff --git a/packages/samples/command/src/index.ts b/packages/plugins/@nocobase/plugin-sample-shop-i18n/src/index.ts similarity index 100% rename from packages/samples/command/src/index.ts rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/src/index.ts diff --git a/packages/samples/shop-events/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/actions/.gitkeep similarity index 100% rename from packages/samples/shop-events/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/actions/.gitkeep diff --git a/packages/samples/shop-events/src/server/models/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/collections/.gitkeep similarity index 100% rename from packages/samples/shop-events/src/server/models/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/collections/.gitkeep diff --git a/packages/samples/shop-i18n/src/server/collections/categories.ts b/packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/collections/categories.ts similarity index 100% rename from packages/samples/shop-i18n/src/server/collections/categories.ts rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/collections/categories.ts diff --git a/packages/samples/shop-i18n/src/server/collections/orders.ts b/packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/collections/orders.ts similarity index 100% rename from packages/samples/shop-i18n/src/server/collections/orders.ts rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/collections/orders.ts diff --git a/packages/samples/shop-i18n/src/server/collections/products.ts b/packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/collections/products.ts similarity index 100% rename from packages/samples/shop-i18n/src/server/collections/products.ts rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/collections/products.ts diff --git a/packages/samples/shop-i18n/src/server/index.ts b/packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/index.ts similarity index 100% rename from packages/samples/shop-i18n/src/server/index.ts rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/index.ts diff --git a/packages/samples/shop-i18n/src/server/locales/zh-CN.ts b/packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/locales/zh-CN.ts similarity index 100% rename from packages/samples/shop-i18n/src/server/locales/zh-CN.ts rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/locales/zh-CN.ts diff --git a/packages/samples/shop-events/src/server/repositories/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/models/.gitkeep similarity index 100% rename from packages/samples/shop-events/src/server/repositories/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/models/.gitkeep diff --git a/packages/samples/shop-i18n/src/server/actions/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/repositories/.gitkeep similarity index 100% rename from packages/samples/shop-i18n/src/server/actions/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-i18n/src/server/repositories/.gitkeep diff --git a/packages/samples/command/.npmignore b/packages/plugins/@nocobase/plugin-sample-shop-modeling/.npmignore similarity index 100% rename from packages/samples/command/.npmignore rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/.npmignore diff --git a/packages/samples/shop-modeling/README.md b/packages/plugins/@nocobase/plugin-sample-shop-modeling/README.md similarity index 100% rename from packages/samples/shop-modeling/README.md rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/README.md diff --git a/packages/samples/custom-collection-template/client.d.ts b/packages/plugins/@nocobase/plugin-sample-shop-modeling/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/custom-collection-template/client.d.ts rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/client.d.ts diff --git a/packages/samples/custom-page/client.js b/packages/plugins/@nocobase/plugin-sample-shop-modeling/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/custom-page/client.js rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/client.js diff --git a/packages/samples/shop-modeling/package.json b/packages/plugins/@nocobase/plugin-sample-shop-modeling/package.json similarity index 100% rename from packages/samples/shop-modeling/package.json rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/package.json diff --git a/packages/samples/custom-block/server.d.ts b/packages/plugins/@nocobase/plugin-sample-shop-modeling/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/custom-block/server.d.ts rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/server.d.ts diff --git a/packages/samples/custom-page/server.js b/packages/plugins/@nocobase/plugin-sample-shop-modeling/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/custom-page/server.js rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/server.js diff --git a/packages/samples/shop-modeling/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sample-shop-modeling/src/client/index.tsx similarity index 86% rename from packages/samples/shop-modeling/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/src/client/index.tsx index 3fecca5e7..17a382632 100644 --- a/packages/samples/shop-modeling/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-sample-shop-modeling/src/client/index.tsx @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; class ShopModelingPlugin extends Plugin { - async load() { } + async load() {} } export default ShopModelingPlugin; diff --git a/packages/samples/custom-block/src/index.ts b/packages/plugins/@nocobase/plugin-sample-shop-modeling/src/index.ts similarity index 100% rename from packages/samples/custom-block/src/index.ts rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/src/index.ts diff --git a/packages/samples/shop-i18n/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/actions/.gitkeep similarity index 100% rename from packages/samples/shop-i18n/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/actions/.gitkeep diff --git a/packages/samples/shop-i18n/src/server/models/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/collections/.gitkeep similarity index 100% rename from packages/samples/shop-i18n/src/server/models/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/collections/.gitkeep diff --git a/packages/samples/shop-modeling/src/server/collections/categories.ts b/packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/collections/categories.ts similarity index 100% rename from packages/samples/shop-modeling/src/server/collections/categories.ts rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/collections/categories.ts diff --git a/packages/samples/shop-modeling/src/server/collections/orders.ts b/packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/collections/orders.ts similarity index 100% rename from packages/samples/shop-modeling/src/server/collections/orders.ts rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/collections/orders.ts diff --git a/packages/samples/shop-modeling/src/server/collections/products.ts b/packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/collections/products.ts similarity index 100% rename from packages/samples/shop-modeling/src/server/collections/products.ts rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/collections/products.ts diff --git a/packages/samples/shop-modeling/src/server/fields/SnowflakeField.ts b/packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/fields/SnowflakeField.ts similarity index 100% rename from packages/samples/shop-modeling/src/server/fields/SnowflakeField.ts rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/fields/SnowflakeField.ts diff --git a/packages/samples/shop-modeling/src/server/index.ts b/packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/index.ts similarity index 100% rename from packages/samples/shop-modeling/src/server/index.ts rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/index.ts diff --git a/packages/samples/shop-i18n/src/server/repositories/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/models/.gitkeep similarity index 100% rename from packages/samples/shop-i18n/src/server/repositories/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/models/.gitkeep diff --git a/packages/samples/shop-modeling/src/server/actions/.gitkeep b/packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/repositories/.gitkeep similarity index 100% rename from packages/samples/shop-modeling/src/server/actions/.gitkeep rename to packages/plugins/@nocobase/plugin-sample-shop-modeling/src/server/repositories/.gitkeep diff --git a/packages/samples/custom-block/.npmignore b/packages/plugins/@nocobase/plugin-sequence-field/.npmignore similarity index 100% rename from packages/samples/custom-block/.npmignore rename to packages/plugins/@nocobase/plugin-sequence-field/.npmignore diff --git a/packages/plugins/sequence-field/LICENSE b/packages/plugins/@nocobase/plugin-sequence-field/LICENSE similarity index 100% rename from packages/plugins/sequence-field/LICENSE rename to packages/plugins/@nocobase/plugin-sequence-field/LICENSE diff --git a/packages/plugins/sequence-field/README.md b/packages/plugins/@nocobase/plugin-sequence-field/README.md similarity index 100% rename from packages/plugins/sequence-field/README.md rename to packages/plugins/@nocobase/plugin-sequence-field/README.md diff --git a/packages/plugins/sequence-field/README.zh-CN.md b/packages/plugins/@nocobase/plugin-sequence-field/README.zh-CN.md similarity index 100% rename from packages/plugins/sequence-field/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-sequence-field/README.zh-CN.md diff --git a/packages/samples/custom-page/client.d.ts b/packages/plugins/@nocobase/plugin-sequence-field/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/custom-page/client.d.ts rename to packages/plugins/@nocobase/plugin-sequence-field/client.d.ts diff --git a/packages/samples/custom-signup-page/client.js b/packages/plugins/@nocobase/plugin-sequence-field/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/custom-signup-page/client.js rename to packages/plugins/@nocobase/plugin-sequence-field/client.js diff --git a/packages/plugins/sequence-field/package.json b/packages/plugins/@nocobase/plugin-sequence-field/package.json similarity index 95% rename from packages/plugins/sequence-field/package.json rename to packages/plugins/@nocobase/plugin-sequence-field/package.json index 98a85f04e..42728899b 100644 --- a/packages/plugins/sequence-field/package.json +++ b/packages/plugins/@nocobase/plugin-sequence-field/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-sequence-field", - "displayName": "sequence field", + "displayName": "Sequence field", "displayName.zh-CN": "自动编码字段", "description": "", "description.zh-CN": "", diff --git a/packages/samples/custom-page/server.d.ts b/packages/plugins/@nocobase/plugin-sequence-field/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/custom-page/server.d.ts rename to packages/plugins/@nocobase/plugin-sequence-field/server.d.ts diff --git a/packages/samples/custom-signup-page/server.js b/packages/plugins/@nocobase/plugin-sequence-field/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/custom-signup-page/server.js rename to packages/plugins/@nocobase/plugin-sequence-field/server.js diff --git a/packages/plugins/sequence-field/src/client/SequenceFieldProvider.tsx b/packages/plugins/@nocobase/plugin-sequence-field/src/client/SequenceFieldProvider.tsx similarity index 99% rename from packages/plugins/sequence-field/src/client/SequenceFieldProvider.tsx rename to packages/plugins/@nocobase/plugin-sequence-field/src/client/SequenceFieldProvider.tsx index e41b5de10..c0bb32bb6 100644 --- a/packages/plugins/sequence-field/src/client/SequenceFieldProvider.tsx +++ b/packages/plugins/@nocobase/plugin-sequence-field/src/client/SequenceFieldProvider.tsx @@ -20,4 +20,4 @@ export const SequenceFieldProvider: FC = (props) => { ); -} +}; diff --git a/packages/plugins/sequence-field/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sequence-field/src/client/index.tsx similarity index 100% rename from packages/plugins/sequence-field/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-sequence-field/src/client/index.tsx diff --git a/packages/plugins/sequence-field/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/client/locale/index.ts similarity index 100% rename from packages/plugins/sequence-field/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-sequence-field/src/client/locale/index.ts diff --git a/packages/plugins/sequence-field/src/client/sequence.tsx b/packages/plugins/@nocobase/plugin-sequence-field/src/client/sequence.tsx similarity index 100% rename from packages/plugins/sequence-field/src/client/sequence.tsx rename to packages/plugins/@nocobase/plugin-sequence-field/src/client/sequence.tsx diff --git a/packages/samples/custom-collection-template/src/index.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/index.ts similarity index 100% rename from packages/samples/custom-collection-template/src/index.ts rename to packages/plugins/@nocobase/plugin-sequence-field/src/index.ts diff --git a/packages/plugins/sequence-field/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/locale/en-US.ts similarity index 100% rename from packages/plugins/sequence-field/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-sequence-field/src/locale/en-US.ts diff --git a/packages/plugins/sequence-field/src/locale/es-ES.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/locale/es-ES.ts similarity index 100% rename from packages/plugins/sequence-field/src/locale/es-ES.ts rename to packages/plugins/@nocobase/plugin-sequence-field/src/locale/es-ES.ts diff --git a/packages/plugins/sequence-field/src/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/locale/fr-FR.ts similarity index 100% rename from packages/plugins/sequence-field/src/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-sequence-field/src/locale/fr-FR.ts diff --git a/packages/plugins/sequence-field/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/sequence-field/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-sequence-field/src/locale/pt-BR.ts diff --git a/packages/plugins/sequence-field/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/sequence-field/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-sequence-field/src/locale/zh-CN.ts diff --git a/packages/plugins/sequence-field/src/server/Plugin.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/server/Plugin.ts similarity index 100% rename from packages/plugins/sequence-field/src/server/Plugin.ts rename to packages/plugins/@nocobase/plugin-sequence-field/src/server/Plugin.ts diff --git a/packages/plugins/sequence-field/src/server/__tests__/sequence-field.test.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/server/__tests__/sequence-field.test.ts similarity index 100% rename from packages/plugins/sequence-field/src/server/__tests__/sequence-field.test.ts rename to packages/plugins/@nocobase/plugin-sequence-field/src/server/__tests__/sequence-field.test.ts diff --git a/packages/plugins/sequence-field/src/server/collections/sequences.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/server/collections/sequences.ts similarity index 100% rename from packages/plugins/sequence-field/src/server/collections/sequences.ts rename to packages/plugins/@nocobase/plugin-sequence-field/src/server/collections/sequences.ts diff --git a/packages/plugins/sequence-field/src/server/fields/sequence-field.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/server/fields/sequence-field.ts similarity index 100% rename from packages/plugins/sequence-field/src/server/fields/sequence-field.ts rename to packages/plugins/@nocobase/plugin-sequence-field/src/server/fields/sequence-field.ts diff --git a/packages/plugins/sequence-field/src/server/index.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/server/index.ts similarity index 100% rename from packages/plugins/sequence-field/src/server/index.ts rename to packages/plugins/@nocobase/plugin-sequence-field/src/server/index.ts diff --git a/packages/plugins/sequence-field/src/server/migrations/20221207022250-sequence-field-key.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/server/migrations/20221207022250-sequence-field-key.ts similarity index 100% rename from packages/plugins/sequence-field/src/server/migrations/20221207022250-sequence-field-key.ts rename to packages/plugins/@nocobase/plugin-sequence-field/src/server/migrations/20221207022250-sequence-field-key.ts diff --git a/packages/samples/custom-collection-template/.npmignore b/packages/plugins/@nocobase/plugin-sms-auth/.npmignore similarity index 100% rename from packages/samples/custom-collection-template/.npmignore rename to packages/plugins/@nocobase/plugin-sms-auth/.npmignore diff --git a/packages/plugins/sms-auth/README.md b/packages/plugins/@nocobase/plugin-sms-auth/README.md similarity index 100% rename from packages/plugins/sms-auth/README.md rename to packages/plugins/@nocobase/plugin-sms-auth/README.md diff --git a/packages/samples/custom-signup-page/client.d.ts b/packages/plugins/@nocobase/plugin-sms-auth/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/custom-signup-page/client.d.ts rename to packages/plugins/@nocobase/plugin-sms-auth/client.d.ts diff --git a/packages/plugins/theme-editor/client.js b/packages/plugins/@nocobase/plugin-sms-auth/client.js similarity index 100% rename from packages/plugins/theme-editor/client.js rename to packages/plugins/@nocobase/plugin-sms-auth/client.js diff --git a/packages/plugins/sms-auth/package.json b/packages/plugins/@nocobase/plugin-sms-auth/package.json similarity index 79% rename from packages/plugins/sms-auth/package.json rename to packages/plugins/@nocobase/plugin-sms-auth/package.json index e8f4aff68..a1acdc377 100644 --- a/packages/plugins/sms-auth/package.json +++ b/packages/plugins/@nocobase/plugin-sms-auth/package.json @@ -1,9 +1,9 @@ { "name": "@nocobase/plugin-sms-auth", "displayName": "SMS auth", - "displayName.zh-CN": "短信登录", - "description": "SMS authentication function", - "description.zh-CN": "提供短信登录认证功能", + "displayName.zh-CN": "短信认证", + "description": "SMS authentication for NocoBase", + "description.zh-CN": "SMS authentication for NocoBase", "version": "0.13.0-alpha.10", "main": "./dist/server/index.js", "devDependencies": { diff --git a/packages/samples/custom-signup-page/server.d.ts b/packages/plugins/@nocobase/plugin-sms-auth/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/custom-signup-page/server.d.ts rename to packages/plugins/@nocobase/plugin-sms-auth/server.d.ts diff --git a/packages/plugins/sms-auth/server.js b/packages/plugins/@nocobase/plugin-sms-auth/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/plugins/sms-auth/server.js rename to packages/plugins/@nocobase/plugin-sms-auth/server.js diff --git a/packages/plugins/sms-auth/src/client/Options.tsx b/packages/plugins/@nocobase/plugin-sms-auth/src/client/Options.tsx similarity index 100% rename from packages/plugins/sms-auth/src/client/Options.tsx rename to packages/plugins/@nocobase/plugin-sms-auth/src/client/Options.tsx diff --git a/packages/plugins/sms-auth/src/client/SigninPage.tsx b/packages/plugins/@nocobase/plugin-sms-auth/src/client/SigninPage.tsx similarity index 100% rename from packages/plugins/sms-auth/src/client/SigninPage.tsx rename to packages/plugins/@nocobase/plugin-sms-auth/src/client/SigninPage.tsx diff --git a/packages/plugins/sms-auth/src/client/SmsAuthProvider.tsx b/packages/plugins/@nocobase/plugin-sms-auth/src/client/SmsAuthProvider.tsx similarity index 100% rename from packages/plugins/sms-auth/src/client/SmsAuthProvider.tsx rename to packages/plugins/@nocobase/plugin-sms-auth/src/client/SmsAuthProvider.tsx diff --git a/packages/plugins/sms-auth/src/client/VerificationCode.tsx b/packages/plugins/@nocobase/plugin-sms-auth/src/client/VerificationCode.tsx similarity index 100% rename from packages/plugins/sms-auth/src/client/VerificationCode.tsx rename to packages/plugins/@nocobase/plugin-sms-auth/src/client/VerificationCode.tsx diff --git a/packages/plugins/sms-auth/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sms-auth/src/client/index.tsx similarity index 100% rename from packages/plugins/sms-auth/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-sms-auth/src/client/index.tsx diff --git a/packages/plugins/sms-auth/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/client/locale/index.ts similarity index 100% rename from packages/plugins/sms-auth/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-sms-auth/src/client/locale/index.ts diff --git a/packages/plugins/sms-auth/src/constants.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/constants.ts similarity index 100% rename from packages/plugins/sms-auth/src/constants.ts rename to packages/plugins/@nocobase/plugin-sms-auth/src/constants.ts diff --git a/packages/samples/custom-page/src/index.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/index.ts similarity index 100% rename from packages/samples/custom-page/src/index.ts rename to packages/plugins/@nocobase/plugin-sms-auth/src/index.ts diff --git a/packages/plugins/sms-auth/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/sms-auth/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-sms-auth/src/locale/zh-CN.ts diff --git a/packages/plugins/sms-auth/src/server/__tests__/signin.test.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/__tests__/signin.test.ts similarity index 100% rename from packages/plugins/sms-auth/src/server/__tests__/signin.test.ts rename to packages/plugins/@nocobase/plugin-sms-auth/src/server/__tests__/signin.test.ts diff --git a/packages/samples/shop-modeling/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-sms-auth/src/server/collections/.gitkeep similarity index 100% rename from packages/samples/shop-modeling/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-sms-auth/src/server/collections/.gitkeep diff --git a/packages/plugins/sms-auth/src/server/index.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/index.ts similarity index 100% rename from packages/plugins/sms-auth/src/server/index.ts rename to packages/plugins/@nocobase/plugin-sms-auth/src/server/index.ts diff --git a/packages/plugins/sms-auth/src/server/locale/en-US.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/locale/en-US.ts similarity index 100% rename from packages/plugins/sms-auth/src/server/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-sms-auth/src/server/locale/en-US.ts diff --git a/packages/plugins/sms-auth/src/server/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/locale/fr-FR.ts similarity index 100% rename from packages/plugins/sms-auth/src/server/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-sms-auth/src/server/locale/fr-FR.ts diff --git a/packages/plugins/sms-auth/src/server/locale/index.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/locale/index.ts similarity index 100% rename from packages/plugins/sms-auth/src/server/locale/index.ts rename to packages/plugins/@nocobase/plugin-sms-auth/src/server/locale/index.ts diff --git a/packages/plugins/sms-auth/src/server/locale/ja-JP.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/locale/ja-JP.ts similarity index 100% rename from packages/plugins/sms-auth/src/server/locale/ja-JP.ts rename to packages/plugins/@nocobase/plugin-sms-auth/src/server/locale/ja-JP.ts diff --git a/packages/plugins/sms-auth/src/server/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/locale/pt-BR.ts similarity index 100% rename from packages/plugins/sms-auth/src/server/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-sms-auth/src/server/locale/pt-BR.ts diff --git a/packages/plugins/sms-auth/src/server/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/locale/zh-CN.ts similarity index 100% rename from packages/plugins/sms-auth/src/server/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-sms-auth/src/server/locale/zh-CN.ts diff --git a/packages/plugins/sms-auth/src/server/migrations/20230607180000-sms-authenticator.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/migrations/20230607180000-sms-authenticator.ts similarity index 100% rename from packages/plugins/sms-auth/src/server/migrations/20230607180000-sms-authenticator.ts rename to packages/plugins/@nocobase/plugin-sms-auth/src/server/migrations/20230607180000-sms-authenticator.ts diff --git a/packages/plugins/sms-auth/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/plugin.ts similarity index 100% rename from packages/plugins/sms-auth/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-sms-auth/src/server/plugin.ts diff --git a/packages/plugins/sms-auth/src/server/sms-auth.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/sms-auth.ts similarity index 100% rename from packages/plugins/sms-auth/src/server/sms-auth.ts rename to packages/plugins/@nocobase/plugin-sms-auth/src/server/sms-auth.ts diff --git a/packages/samples/custom-page/.npmignore b/packages/plugins/@nocobase/plugin-snapshot-field/.npmignore similarity index 100% rename from packages/samples/custom-page/.npmignore rename to packages/plugins/@nocobase/plugin-snapshot-field/.npmignore diff --git a/packages/plugins/snapshot-field/LICENSE b/packages/plugins/@nocobase/plugin-snapshot-field/LICENSE similarity index 100% rename from packages/plugins/snapshot-field/LICENSE rename to packages/plugins/@nocobase/plugin-snapshot-field/LICENSE diff --git a/packages/plugins/snapshot-field/README.md b/packages/plugins/@nocobase/plugin-snapshot-field/README.md similarity index 100% rename from packages/plugins/snapshot-field/README.md rename to packages/plugins/@nocobase/plugin-snapshot-field/README.md diff --git a/packages/plugins/snapshot-field/README.zh-CN.md b/packages/plugins/@nocobase/plugin-snapshot-field/README.zh-CN.md similarity index 100% rename from packages/plugins/snapshot-field/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-snapshot-field/README.zh-CN.md diff --git a/packages/samples/hello/client.d.ts b/packages/plugins/@nocobase/plugin-snapshot-field/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/hello/client.d.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/client.d.ts diff --git a/packages/samples/hello/client.js b/packages/plugins/@nocobase/plugin-snapshot-field/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/hello/client.js rename to packages/plugins/@nocobase/plugin-snapshot-field/client.js diff --git a/packages/plugins/snapshot-field/package.json b/packages/plugins/@nocobase/plugin-snapshot-field/package.json similarity index 95% rename from packages/plugins/snapshot-field/package.json rename to packages/plugins/@nocobase/plugin-snapshot-field/package.json index 4a8dc53ff..7c59e5b7d 100644 --- a/packages/plugins/snapshot-field/package.json +++ b/packages/plugins/@nocobase/plugin-snapshot-field/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-snapshot-field", - "displayName": "snapshot field", + "displayName": "Snapshot field", "displayName.zh-CN": "关系快照字段", "description": "", "description.zh-CN": "", diff --git a/packages/samples/hello/server.d.ts b/packages/plugins/@nocobase/plugin-snapshot-field/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/hello/server.d.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/server.d.ts diff --git a/packages/samples/hello/server.js b/packages/plugins/@nocobase/plugin-snapshot-field/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/hello/server.js rename to packages/plugins/@nocobase/plugin-snapshot-field/server.js diff --git a/packages/plugins/snapshot-field/src/__tests__/data/field_linkto.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/field_linkto.ts similarity index 100% rename from packages/plugins/snapshot-field/src/__tests__/data/field_linkto.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/field_linkto.ts diff --git a/packages/plugins/snapshot-field/src/__tests__/data/field_m2m.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/field_m2m.ts similarity index 100% rename from packages/plugins/snapshot-field/src/__tests__/data/field_m2m.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/field_m2m.ts diff --git a/packages/plugins/snapshot-field/src/__tests__/data/field_o2m.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/field_o2m.ts similarity index 100% rename from packages/plugins/snapshot-field/src/__tests__/data/field_o2m.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/field_o2m.ts diff --git a/packages/plugins/snapshot-field/src/__tests__/data/field_o2o.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/field_o2o.ts similarity index 100% rename from packages/plugins/snapshot-field/src/__tests__/data/field_o2o.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/field_o2o.ts diff --git a/packages/plugins/snapshot-field/src/__tests__/data/snap_linkto.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/snap_linkto.ts similarity index 100% rename from packages/plugins/snapshot-field/src/__tests__/data/snap_linkto.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/snap_linkto.ts diff --git a/packages/plugins/snapshot-field/src/__tests__/data/snap_m2m.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/snap_m2m.ts similarity index 100% rename from packages/plugins/snapshot-field/src/__tests__/data/snap_m2m.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/snap_m2m.ts diff --git a/packages/plugins/snapshot-field/src/__tests__/data/snap_o2m.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/snap_o2m.ts similarity index 100% rename from packages/plugins/snapshot-field/src/__tests__/data/snap_o2m.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/snap_o2m.ts diff --git a/packages/plugins/snapshot-field/src/__tests__/data/snap_o2o.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/snap_o2o.ts similarity index 100% rename from packages/plugins/snapshot-field/src/__tests__/data/snap_o2o.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/snap_o2o.ts diff --git a/packages/plugins/snapshot-field/src/__tests__/data/table_a.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/table_a.ts similarity index 100% rename from packages/plugins/snapshot-field/src/__tests__/data/table_a.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/table_a.ts diff --git a/packages/plugins/snapshot-field/src/__tests__/data/table_b.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/table_b.ts similarity index 100% rename from packages/plugins/snapshot-field/src/__tests__/data/table_b.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/table_b.ts diff --git a/packages/plugins/snapshot-field/src/__tests__/data/table_m2m.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/table_m2m.ts similarity index 100% rename from packages/plugins/snapshot-field/src/__tests__/data/table_m2m.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/data/table_m2m.ts diff --git a/packages/plugins/snapshot-field/src/__tests__/fieldsHistory.test.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/fieldsHistory.test.ts similarity index 100% rename from packages/plugins/snapshot-field/src/__tests__/fieldsHistory.test.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/fieldsHistory.test.ts diff --git a/packages/plugins/snapshot-field/src/__tests__/snapshots.test.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/snapshots.test.ts similarity index 100% rename from packages/plugins/snapshot-field/src/__tests__/snapshots.test.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/__tests__/snapshots.test.ts diff --git a/packages/plugins/snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers.tsx similarity index 100% rename from packages/plugins/snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers.tsx rename to packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers.tsx diff --git a/packages/plugins/snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializersDetailItem.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializersDetailItem.tsx similarity index 100% rename from packages/plugins/snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializersDetailItem.tsx rename to packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializersDetailItem.tsx diff --git a/packages/plugins/snapshot-field/src/client/SnapshotBlock/SnapshotBlockProvider.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockProvider.tsx similarity index 100% rename from packages/plugins/snapshot-field/src/client/SnapshotBlock/SnapshotBlockProvider.tsx rename to packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotBlock/SnapshotBlockProvider.tsx diff --git a/packages/plugins/snapshot-field/src/client/SnapshotFieldProvider.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotFieldProvider.tsx similarity index 100% rename from packages/plugins/snapshot-field/src/client/SnapshotFieldProvider.tsx rename to packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotFieldProvider.tsx diff --git a/packages/plugins/snapshot-field/src/client/SnapshotHistoryCollectionProvider.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotHistoryCollectionProvider.tsx similarity index 100% rename from packages/plugins/snapshot-field/src/client/SnapshotHistoryCollectionProvider.tsx rename to packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotHistoryCollectionProvider.tsx diff --git a/packages/plugins/snapshot-field/src/client/SnapshotRecordPicker.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotRecordPicker.tsx similarity index 100% rename from packages/plugins/snapshot-field/src/client/SnapshotRecordPicker.tsx rename to packages/plugins/@nocobase/plugin-snapshot-field/src/client/SnapshotRecordPicker.tsx diff --git a/packages/plugins/snapshot-field/src/client/components/SnapshotOwnerCollectionFieldsSelect.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/components/SnapshotOwnerCollectionFieldsSelect.tsx similarity index 100% rename from packages/plugins/snapshot-field/src/client/components/SnapshotOwnerCollectionFieldsSelect.tsx rename to packages/plugins/@nocobase/plugin-snapshot-field/src/client/components/SnapshotOwnerCollectionFieldsSelect.tsx diff --git a/packages/plugins/snapshot-field/src/client/index.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/index.tsx similarity index 100% rename from packages/plugins/snapshot-field/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-snapshot-field/src/client/index.tsx diff --git a/packages/plugins/snapshot-field/src/client/interface.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/interface.ts similarity index 100% rename from packages/plugins/snapshot-field/src/client/interface.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/client/interface.ts diff --git a/packages/plugins/snapshot-field/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/locale/index.ts similarity index 100% rename from packages/plugins/snapshot-field/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/client/locale/index.ts diff --git a/packages/samples/custom-signup-page/src/index.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/index.ts similarity index 100% rename from packages/samples/custom-signup-page/src/index.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/index.ts diff --git a/packages/plugins/snapshot-field/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/locale/en-US.ts similarity index 100% rename from packages/plugins/snapshot-field/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/locale/en-US.ts diff --git a/packages/plugins/snapshot-field/src/locale/es-ES.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/locale/es-ES.ts similarity index 100% rename from packages/plugins/snapshot-field/src/locale/es-ES.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/locale/es-ES.ts diff --git a/packages/plugins/snapshot-field/src/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/locale/fr-FR.ts similarity index 100% rename from packages/plugins/snapshot-field/src/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/locale/fr-FR.ts diff --git a/packages/plugins/snapshot-field/src/locale/ja-JP.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/locale/ja-JP.ts similarity index 100% rename from packages/plugins/snapshot-field/src/locale/ja-JP.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/locale/ja-JP.ts diff --git a/packages/plugins/snapshot-field/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/snapshot-field/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/locale/pt-BR.ts diff --git a/packages/plugins/snapshot-field/src/locale/ru-RU.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/locale/ru-RU.ts similarity index 100% rename from packages/plugins/snapshot-field/src/locale/ru-RU.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/locale/ru-RU.ts diff --git a/packages/plugins/snapshot-field/src/locale/tr-TR.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/locale/tr-TR.ts similarity index 100% rename from packages/plugins/snapshot-field/src/locale/tr-TR.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/locale/tr-TR.ts diff --git a/packages/plugins/snapshot-field/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/snapshot-field/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/locale/zh-CN.ts diff --git a/packages/samples/shop-modeling/src/server/models/.gitkeep b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/collections/.gitkeep similarity index 100% rename from packages/samples/shop-modeling/src/server/models/.gitkeep rename to packages/plugins/@nocobase/plugin-snapshot-field/src/server/collections/.gitkeep diff --git a/packages/plugins/snapshot-field/src/server/collections/collectionsHistory.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/collections/collectionsHistory.ts similarity index 100% rename from packages/plugins/snapshot-field/src/server/collections/collectionsHistory.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/server/collections/collectionsHistory.ts diff --git a/packages/plugins/snapshot-field/src/server/collections/fieldsHistory.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/collections/fieldsHistory.ts similarity index 100% rename from packages/plugins/snapshot-field/src/server/collections/fieldsHistory.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/server/collections/fieldsHistory.ts diff --git a/packages/plugins/snapshot-field/src/server/fields/snapshot-field.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/fields/snapshot-field.ts similarity index 100% rename from packages/plugins/snapshot-field/src/server/fields/snapshot-field.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/server/fields/snapshot-field.ts diff --git a/packages/plugins/snapshot-field/src/server/index.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/index.ts similarity index 100% rename from packages/plugins/snapshot-field/src/server/index.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/server/index.ts diff --git a/packages/plugins/snapshot-field/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/plugin.ts similarity index 100% rename from packages/plugins/snapshot-field/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/server/plugin.ts diff --git a/packages/plugins/snapshot-field/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/swagger/index.ts similarity index 100% rename from packages/plugins/snapshot-field/src/swagger/index.ts rename to packages/plugins/@nocobase/plugin-snapshot-field/src/swagger/index.ts diff --git a/packages/samples/custom-signup-page/.npmignore b/packages/plugins/@nocobase/plugin-system-settings/.npmignore similarity index 100% rename from packages/samples/custom-signup-page/.npmignore rename to packages/plugins/@nocobase/plugin-system-settings/.npmignore diff --git a/packages/plugins/system-settings/LICENSE b/packages/plugins/@nocobase/plugin-system-settings/LICENSE similarity index 100% rename from packages/plugins/system-settings/LICENSE rename to packages/plugins/@nocobase/plugin-system-settings/LICENSE diff --git a/packages/plugins/system-settings/README.md b/packages/plugins/@nocobase/plugin-system-settings/README.md similarity index 100% rename from packages/plugins/system-settings/README.md rename to packages/plugins/@nocobase/plugin-system-settings/README.md diff --git a/packages/plugins/system-settings/README.zh-CN.md b/packages/plugins/@nocobase/plugin-system-settings/README.zh-CN.md similarity index 100% rename from packages/plugins/system-settings/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-system-settings/README.zh-CN.md diff --git a/packages/samples/ratelimit/client.d.ts b/packages/plugins/@nocobase/plugin-system-settings/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/ratelimit/client.d.ts rename to packages/plugins/@nocobase/plugin-system-settings/client.d.ts diff --git a/packages/samples/ratelimit/client.js b/packages/plugins/@nocobase/plugin-system-settings/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/ratelimit/client.js rename to packages/plugins/@nocobase/plugin-system-settings/client.js diff --git a/packages/plugins/system-settings/package.json b/packages/plugins/@nocobase/plugin-system-settings/package.json similarity index 100% rename from packages/plugins/system-settings/package.json rename to packages/plugins/@nocobase/plugin-system-settings/package.json diff --git a/packages/samples/ratelimit/server.d.ts b/packages/plugins/@nocobase/plugin-system-settings/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/ratelimit/server.d.ts rename to packages/plugins/@nocobase/plugin-system-settings/server.d.ts diff --git a/packages/samples/ratelimit/server.js b/packages/plugins/@nocobase/plugin-system-settings/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/ratelimit/server.js rename to packages/plugins/@nocobase/plugin-system-settings/server.js diff --git a/packages/plugins/system-settings/src/client/index.ts b/packages/plugins/@nocobase/plugin-system-settings/src/client/index.ts similarity index 86% rename from packages/plugins/system-settings/src/client/index.ts rename to packages/plugins/@nocobase/plugin-system-settings/src/client/index.ts index 940c6e28e..64cc5c927 100644 --- a/packages/plugins/system-settings/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-system-settings/src/client/index.ts @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; class SystemSettingPlugin extends Plugin { - async load() { } + async load() {} } export default SystemSettingPlugin; diff --git a/packages/samples/hello/src/index.ts b/packages/plugins/@nocobase/plugin-system-settings/src/index.ts similarity index 100% rename from packages/samples/hello/src/index.ts rename to packages/plugins/@nocobase/plugin-system-settings/src/index.ts diff --git a/packages/plugins/system-settings/src/server/collections/systemSettings.ts b/packages/plugins/@nocobase/plugin-system-settings/src/server/collections/systemSettings.ts similarity index 100% rename from packages/plugins/system-settings/src/server/collections/systemSettings.ts rename to packages/plugins/@nocobase/plugin-system-settings/src/server/collections/systemSettings.ts diff --git a/packages/plugins/system-settings/src/server/index.ts b/packages/plugins/@nocobase/plugin-system-settings/src/server/index.ts similarity index 100% rename from packages/plugins/system-settings/src/server/index.ts rename to packages/plugins/@nocobase/plugin-system-settings/src/server/index.ts diff --git a/packages/plugins/system-settings/src/server/migrations/20220714204714-update-enabled-languages.ts b/packages/plugins/@nocobase/plugin-system-settings/src/server/migrations/20220714204714-update-enabled-languages.ts similarity index 100% rename from packages/plugins/system-settings/src/server/migrations/20220714204714-update-enabled-languages.ts rename to packages/plugins/@nocobase/plugin-system-settings/src/server/migrations/20220714204714-update-enabled-languages.ts diff --git a/packages/plugins/system-settings/src/server/server.ts b/packages/plugins/@nocobase/plugin-system-settings/src/server/server.ts similarity index 100% rename from packages/plugins/system-settings/src/server/server.ts rename to packages/plugins/@nocobase/plugin-system-settings/src/server/server.ts diff --git a/packages/plugins/system-settings/src/swagger/index.json b/packages/plugins/@nocobase/plugin-system-settings/src/swagger/index.json similarity index 100% rename from packages/plugins/system-settings/src/swagger/index.json rename to packages/plugins/@nocobase/plugin-system-settings/src/swagger/index.json diff --git a/packages/samples/hello/.npmignore b/packages/plugins/@nocobase/plugin-theme-editor/.npmignore similarity index 100% rename from packages/samples/hello/.npmignore rename to packages/plugins/@nocobase/plugin-theme-editor/.npmignore diff --git a/packages/plugins/theme-editor/README.md b/packages/plugins/@nocobase/plugin-theme-editor/README.md similarity index 100% rename from packages/plugins/theme-editor/README.md rename to packages/plugins/@nocobase/plugin-theme-editor/README.md diff --git a/packages/plugins/theme-editor/README.zh-CN.md b/packages/plugins/@nocobase/plugin-theme-editor/README.zh-CN.md similarity index 100% rename from packages/plugins/theme-editor/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-theme-editor/README.zh-CN.md diff --git a/packages/plugins/api-keys/client.d.ts b/packages/plugins/@nocobase/plugin-theme-editor/client.d.ts old mode 100755 new mode 100644 similarity index 98% rename from packages/plugins/api-keys/client.d.ts rename to packages/plugins/@nocobase/plugin-theme-editor/client.d.ts index ea96f63f3..0c422da69 --- a/packages/plugins/api-keys/client.d.ts +++ b/packages/plugins/@nocobase/plugin-theme-editor/client.d.ts @@ -1,4 +1,3 @@ // @ts-nocheck export * from './dist/client'; export { default } from './dist/client'; - diff --git a/packages/plugins/@nocobase/plugin-theme-editor/client.js b/packages/plugins/@nocobase/plugin-theme-editor/client.js new file mode 100644 index 000000000..4d9520d74 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-theme-editor/client.js @@ -0,0 +1,65 @@ +'use strict'; + +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== 'function') return null; + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} + +function _interopRequireWildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) { + return obj; + } + if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) { + return { default: obj }; + } + var cache = _getRequireWildcardCache(nodeInterop); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var key in obj) { + if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} + +var _index = _interopRequireWildcard(require('./dist/client')); + +Object.defineProperty(exports, '__esModule', { + value: true, +}); +var _exportNames = {}; +Object.defineProperty(exports, 'default', { + enumerable: true, + get: function get() { + return _index.default; + }, +}); + +Object.keys(_index).forEach(function (key) { + if (key === 'default' || key === '__esModule') return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _index[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _index[key]; + }, + }); +}); diff --git a/packages/plugins/theme-editor/package.json b/packages/plugins/@nocobase/plugin-theme-editor/package.json similarity index 100% rename from packages/plugins/theme-editor/package.json rename to packages/plugins/@nocobase/plugin-theme-editor/package.json diff --git a/packages/plugins/theme-editor/server.d.ts b/packages/plugins/@nocobase/plugin-theme-editor/server.d.ts similarity index 100% rename from packages/plugins/theme-editor/server.d.ts rename to packages/plugins/@nocobase/plugin-theme-editor/server.d.ts diff --git a/packages/plugins/theme-editor/server.js b/packages/plugins/@nocobase/plugin-theme-editor/server.js similarity index 100% rename from packages/plugins/theme-editor/server.js rename to packages/plugins/@nocobase/plugin-theme-editor/server.js diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/ColorPanel.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/ColorPanel.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/ColorPanel.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/ColorPanel.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/ColorPreview.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/ColorPreview.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/ColorPreview.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/ColorPreview.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/FilterPanel.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/FilterPanel.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/FilterPanel.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/FilterPanel.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/IconSwitch.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/IconSwitch.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/IconSwitch.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/IconSwitch.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/PreviewDemo.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/PreviewDemo.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/PreviewDemo.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/PreviewDemo.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/ThemeEditor.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/ThemeEditor.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/ThemeEditor.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/ThemeEditor.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/ThemeSelect.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/ThemeSelect.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/ThemeSelect.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/ThemeSelect.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/TokenInput.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/TokenInput.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/TokenInput.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/TokenInput.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/alert/alert.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/alert/alert.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/alert/alert.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/alert/alert.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/alert/error.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/alert/error.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/alert/error.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/alert/error.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/alert/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/alert/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/alert/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/alert/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/alert/info.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/alert/info.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/alert/info.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/alert/info.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/alert/success.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/alert/success.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/alert/success.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/alert/success.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/alert/warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/alert/warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/alert/warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/alert/warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/anchor/anchor.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/anchor/anchor.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/anchor/anchor.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/anchor/anchor.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/anchor/anchorInLayout.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/anchor/anchorInLayout.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/anchor/anchorInLayout.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/anchor/anchorInLayout.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/anchor/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/anchor/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/anchor/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/anchor/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/autoComplete/auto-complete.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/autoComplete/auto-complete.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/autoComplete/auto-complete.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/autoComplete/auto-complete.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/autoComplete/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/autoComplete/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/autoComplete/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/autoComplete/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/avatar/avatar.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/avatar/avatar.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/avatar/avatar.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/avatar/avatar.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/avatar/index.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/avatar/index.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/avatar/index.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/avatar/index.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/badge/badge.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/badge/badge.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/badge/badge.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/badge/badge.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/badge/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/badge/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/badge/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/badge/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/badge/progress.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/badge/progress.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/badge/progress.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/badge/progress.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/badge/success.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/badge/success.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/badge/success.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/badge/success.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/badge/warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/badge/warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/badge/warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/badge/warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/breadcrumb/breadcrumb.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/breadcrumb/breadcrumb.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/breadcrumb/breadcrumb.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/breadcrumb/breadcrumb.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/breadcrumb/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/breadcrumb/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/breadcrumb/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/breadcrumb/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/button/button-icon.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/button/button-icon.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/button/button-icon.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/button/button-icon.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/button/button.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/button/button.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/button/button.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/button/button.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/button/dangerButton.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/button/dangerButton.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/button/dangerButton.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/button/dangerButton.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/button/defaultButton.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/button/defaultButton.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/button/defaultButton.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/button/defaultButton.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/button/disabled.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/button/disabled.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/button/disabled.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/button/disabled.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/button/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/button/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/button/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/button/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/calendar/calendar.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/calendar/calendar.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/calendar/calendar.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/calendar/calendar.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/calendar/disabled.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/calendar/disabled.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/calendar/disabled.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/calendar/disabled.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/calendar/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/calendar/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/calendar/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/calendar/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/card/card.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/card/card.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/card/card.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/card/card.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/card/cardGrid.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/card/cardGrid.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/card/cardGrid.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/card/cardGrid.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/card/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/card/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/card/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/card/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/card/inner.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/card/inner.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/card/inner.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/card/inner.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/carousel/carousel.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/carousel/carousel.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/carousel/carousel.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/carousel/carousel.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/carousel/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/carousel/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/carousel/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/carousel/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/cascader/cascader.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/cascader/cascader.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/cascader/cascader.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/cascader/cascader.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/cascader/data.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/cascader/data.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/cascader/data.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/cascader/data.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/cascader/disable.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/cascader/disable.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/cascader/disable.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/cascader/disable.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/cascader/highlight.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/cascader/highlight.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/cascader/highlight.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/cascader/highlight.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/cascader/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/cascader/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/cascader/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/cascader/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/checkbox/checkbox.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/checkbox/checkbox.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/checkbox/checkbox.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/checkbox/checkbox.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/checkbox/disabled.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/checkbox/disabled.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/checkbox/disabled.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/checkbox/disabled.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/checkbox/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/checkbox/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/checkbox/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/checkbox/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/collapse/collapse.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/collapse/collapse.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/collapse/collapse.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/collapse/collapse.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/collapse/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/collapse/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/collapse/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/collapse/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/datePicker/danger.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/datePicker/danger.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/datePicker/danger.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/datePicker/danger.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/datePicker/date-picker.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/datePicker/date-picker.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/datePicker/date-picker.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/datePicker/date-picker.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/datePicker/disabled.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/datePicker/disabled.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/datePicker/disabled.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/datePicker/disabled.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/datePicker/icon.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/datePicker/icon.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/datePicker/icon.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/datePicker/icon.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/datePicker/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/datePicker/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/datePicker/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/datePicker/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/datePicker/warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/datePicker/warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/datePicker/warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/datePicker/warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/descriptions/descriptions.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/descriptions/descriptions.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/descriptions/descriptions.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/descriptions/descriptions.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/descriptions/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/descriptions/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/descriptions/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/descriptions/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/divider/divider.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/divider/divider.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/divider/divider.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/divider/divider.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/divider/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/divider/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/divider/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/divider/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/drawer/drawer.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/drawer/drawer.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/drawer/drawer.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/drawer/drawer.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/drawer/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/drawer/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/drawer/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/drawer/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/dropdown/dropdown.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/dropdown/dropdown.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/dropdown/dropdown.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/dropdown/dropdown.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/dropdown/dropdownError.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/dropdown/dropdownError.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/dropdown/dropdownError.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/dropdown/dropdownError.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/dropdown/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/dropdown/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/dropdown/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/dropdown/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/dropdown/menu.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/dropdown/menu.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/dropdown/menu.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/dropdown/menu.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/empty/empty.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/empty/empty.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/empty/empty.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/empty/empty.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/empty/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/empty/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/empty/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/empty/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/form/danger.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/form/danger.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/form/danger.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/form/danger.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/form/form.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/form/form.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/form/form.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/form/form.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/form/index.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/form/index.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/form/index.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/form/index.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/form/warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/form/warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/form/warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/form/warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/grid/grid.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/grid/grid.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/grid/grid.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/grid/grid.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/grid/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/grid/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/grid/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/grid/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/icon/icon.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/icon/icon.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/icon/icon.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/icon/icon.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/icon/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/icon/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/icon/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/icon/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/image/disabled.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/image/disabled.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/image/disabled.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/image/disabled.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/image/image.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/image/image.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/image/image.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/image/image.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/image/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/image/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/image/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/image/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/clearIcon.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/clearIcon.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/clearIcon.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/clearIcon.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/danger.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/danger.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/danger.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/danger.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/disabled.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/disabled.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/disabled.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/disabled.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/input.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/input.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/input.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/input.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/success.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/success.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/success.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/success.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/withAddon.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/withAddon.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/input/withAddon.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/input/withAddon.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/danger.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/danger.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/danger.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/danger.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/disabled.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/disabled.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/disabled.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/disabled.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/inputNumber.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/inputNumber.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/inputNumber.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/inputNumber.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/inputNumber/warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/list/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/list/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/list/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/list/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/list/list.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/list/list.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/list/list.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/list/list.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/mentions/danger.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/mentions/danger.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/mentions/danger.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/mentions/danger.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/mentions/disabled.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/mentions/disabled.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/mentions/disabled.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/mentions/disabled.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/mentions/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/mentions/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/mentions/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/mentions/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/mentions/mentions.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/mentions/mentions.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/mentions/mentions.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/mentions/mentions.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/mentions/warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/mentions/warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/mentions/warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/mentions/warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/menu/data.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/menu/data.tsx similarity index 98% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/menu/data.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/menu/data.tsx index b197fe544..1d6bbd1f5 100644 --- a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/menu/data.tsx +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/menu/data.tsx @@ -17,7 +17,7 @@ const getItem = ( children, label, type, - } as MenuItem); + }) as MenuItem; const items: MenuProps['items'] = [ getItem('Navigation One', 'sub1', , [ diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/menu/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/menu/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/menu/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/menu/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/menu/menu.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/menu/menu.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/menu/menu.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/menu/menu.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/menu/menuDanger.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/menu/menuDanger.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/menu/menuDanger.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/menu/menuDanger.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/menu/menuInLayout.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/menu/menuInLayout.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/menu/menuInLayout.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/menu/menuInLayout.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/message/error.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/message/error.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/message/error.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/message/error.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/message/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/message/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/message/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/message/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/message/info.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/message/info.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/message/info.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/message/info.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/message/message.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/message/message.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/message/message.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/message/message.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/message/success.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/message/success.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/message/success.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/message/success.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/message/warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/message/warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/message/warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/message/warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/modal/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/modal/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/modal/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/modal/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/modal/info.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/modal/info.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/modal/info.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/modal/info.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/modal/modal.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/modal/modal.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/modal/modal.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/modal/modal.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/modal/modalWithButton.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/modal/modalWithButton.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/modal/modalWithButton.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/modal/modalWithButton.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/modal/success.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/modal/success.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/modal/success.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/modal/success.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/modal/warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/modal/warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/modal/warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/modal/warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/notification/error.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/notification/error.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/notification/error.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/notification/error.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/notification/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/notification/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/notification/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/notification/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/notification/info.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/notification/info.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/notification/info.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/notification/info.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/notification/notification.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/notification/notification.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/notification/notification.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/notification/notification.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/notification/success.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/notification/success.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/notification/success.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/notification/success.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/notification/warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/notification/warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/notification/warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/notification/warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/pagination/disabled.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/pagination/disabled.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/pagination/disabled.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/pagination/disabled.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/pagination/index.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/pagination/index.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/pagination/index.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/pagination/index.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/pagination/outline.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/pagination/outline.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/pagination/outline.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/pagination/outline.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/pagination/pagination.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/pagination/pagination.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/pagination/pagination.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/pagination/pagination.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/popconfirm/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/popconfirm/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/popconfirm/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/popconfirm/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/popconfirm/popconfirm.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/popconfirm/popconfirm.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/popconfirm/popconfirm.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/popconfirm/popconfirm.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/popover/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/popover/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/popover/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/popover/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/popover/popover.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/popover/popover.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/popover/popover.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/popover/popover.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/progress/danger.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/progress/danger.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/progress/danger.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/progress/danger.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/progress/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/progress/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/progress/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/progress/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/progress/info.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/progress/info.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/progress/info.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/progress/info.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/progress/progress.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/progress/progress.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/progress/progress.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/progress/progress.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/progress/progressInBg.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/progress/progressInBg.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/progress/progressInBg.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/progress/progressInBg.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/progress/success.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/progress/success.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/progress/success.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/progress/success.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/radio/button.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/radio/button.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/radio/button.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/radio/button.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/radio/disabled.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/radio/disabled.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/radio/disabled.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/radio/disabled.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/radio/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/radio/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/radio/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/radio/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/radio/radio.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/radio/radio.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/radio/radio.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/radio/radio.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/rate/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/rate/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/rate/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/rate/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/rate/rate.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/rate/rate.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/rate/rate.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/rate/rate.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/result/danger.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/result/danger.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/result/danger.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/result/danger.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/result/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/result/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/result/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/result/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/result/info.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/result/info.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/result/info.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/result/info.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/result/result.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/result/result.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/result/result.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/result/result.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/result/resultWithDesc.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/result/resultWithDesc.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/result/resultWithDesc.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/result/resultWithDesc.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/result/success.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/result/success.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/result/success.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/result/success.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/result/warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/result/warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/result/warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/result/warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/segmented/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/segmented/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/segmented/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/segmented/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/segmented/segmented.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/segmented/segmented.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/segmented/segmented.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/segmented/segmented.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/_internal.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/_internal.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/_internal.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/_internal.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/danger.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/danger.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/danger.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/danger.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/data.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/data.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/data.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/data.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/disabled.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/disabled.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/disabled.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/disabled.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/icon.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/icon.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/icon.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/icon.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/select.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/select.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/select.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/select.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/selectTag.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/selectTag.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/selectTag.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/selectTag.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/select/warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/select/warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/skeleton/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/skeleton/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/skeleton/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/skeleton/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/skeleton/skeleton.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/skeleton/skeleton.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/skeleton/skeleton.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/skeleton/skeleton.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/slider/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/slider/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/slider/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/slider/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/slider/slider.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/slider/slider.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/slider/slider.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/slider/slider.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/slider/sliderInBg.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/slider/sliderInBg.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/slider/sliderInBg.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/slider/sliderInBg.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/space/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/space/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/space/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/space/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/space/space.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/space/space.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/space/space.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/space/space.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/spin/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/spin/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/spin/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/spin/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/spin/spin.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/spin/spin.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/spin/spin.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/spin/spin.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/statistic/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/statistic/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/statistic/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/statistic/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/statistic/statistic.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/statistic/statistic.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/statistic/statistic.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/statistic/statistic.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/steps/danger.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/steps/danger.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/steps/danger.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/steps/danger.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/steps/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/steps/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/steps/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/steps/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/steps/steps.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/steps/steps.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/steps/steps.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/steps/steps.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/switch/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/switch/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/switch/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/switch/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/switch/switch.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/switch/switch.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/switch/switch.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/switch/switch.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/table/filterTable.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/table/filterTable.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/table/filterTable.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/table/filterTable.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/table/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/table/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/table/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/table/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/table/table.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/table/table.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/table/table.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/table/table.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tabs/cardTabs.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tabs/cardTabs.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tabs/cardTabs.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tabs/cardTabs.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tabs/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tabs/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tabs/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tabs/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tabs/tabs.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tabs/tabs.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tabs/tabs.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tabs/tabs.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/closable.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/closable.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/closable.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/closable.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/error.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/error.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/error.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/error.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/info.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/info.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/info.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/info.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/multiTags.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/multiTags.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/multiTags.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/multiTags.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/success.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/success.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/success.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/success.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/tag.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/tag.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/tag.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/tag.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tag/warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tag/warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/timePicker/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/timePicker/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/timePicker/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/timePicker/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/timePicker/time-picker.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/timePicker/time-picker.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/timePicker/time-picker.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/timePicker/time-picker.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/timeline/danger.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/timeline/danger.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/timeline/danger.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/timeline/danger.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/timeline/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/timeline/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/timeline/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/timeline/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/timeline/success.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/timeline/success.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/timeline/success.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/timeline/success.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/timeline/timeline.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/timeline/timeline.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/timeline/timeline.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/timeline/timeline.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tooltip/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tooltip/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tooltip/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tooltip/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tooltip/tooltip.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tooltip/tooltip.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tooltip/tooltip.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tooltip/tooltip.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/transfer/danger.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/transfer/danger.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/transfer/danger.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/transfer/danger.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/transfer/data.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/transfer/data.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/transfer/data.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/transfer/data.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/transfer/disabled.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/transfer/disabled.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/transfer/disabled.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/transfer/disabled.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/transfer/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/transfer/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/transfer/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/transfer/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/transfer/transfer.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/transfer/transfer.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/transfer/transfer.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/transfer/transfer.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/transfer/warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/transfer/warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/transfer/warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/transfer/warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tree/disabled.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tree/disabled.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tree/disabled.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tree/disabled.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tree/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tree/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tree/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tree/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tree/tree.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tree/tree.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/tree/tree.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/tree/tree.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/treeSelect/disabled.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/treeSelect/disabled.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/treeSelect/disabled.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/treeSelect/disabled.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/treeSelect/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/treeSelect/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/treeSelect/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/treeSelect/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/treeSelect/tree-select.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/treeSelect/tree-select.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/treeSelect/tree-select.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/treeSelect/tree-select.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/Heading4.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/Heading4.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/Heading4.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/Heading4.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/error.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/error.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/error.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/error.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/index.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/index.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/index.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/index.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/success.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/success.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/success.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/success.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/typography.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/typography.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/typography.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/typography.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/typographyFull.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/typographyFull.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/typographyFull.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/typographyFull.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/warningText.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/warningText.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/warningText.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/warningText.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/warningTitle.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/warningTitle.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/typography/warningTitle.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/typography/warningTitle.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/upload/avatar.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/upload/avatar.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/upload/avatar.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/upload/avatar.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/upload/danger.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/upload/danger.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/upload/danger.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/upload/danger.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/upload/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/upload/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/upload/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/upload/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/upload/upload.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/upload/upload.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-demos/upload/upload.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-demos/upload/upload.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-panel/ComponentCard.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-panel/ComponentCard.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-panel/ComponentCard.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-panel/ComponentCard.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-panel/ComponentDemoGroup.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-panel/ComponentDemoGroup.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-panel/ComponentDemoGroup.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-panel/ComponentDemoGroup.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-panel/ComponentTokenDrawer.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-panel/ComponentTokenDrawer.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-panel/ComponentTokenDrawer.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-panel/ComponentTokenDrawer.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-panel/ComponentTree.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-panel/ComponentTree.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-panel/ComponentTree.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-panel/ComponentTree.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/component-panel/index.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-panel/index.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/component-panel/index.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/component-panel/index.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/hooks/useControlledTheme.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/hooks/useControlledTheme.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/hooks/useControlledTheme.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/hooks/useControlledTheme.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Arrow.d.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Arrow.d.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Arrow.d.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Arrow.d.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Arrow.js b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Arrow.js similarity index 77% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Arrow.js rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Arrow.js index ee2cf2979..1b0bacf39 100644 --- a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Arrow.js +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Arrow.js @@ -67,7 +67,8 @@ function Arrow(props) { height: 16, }), /*#__PURE__*/ React.createElement('path', { - d: 'M8.576,10.6224 C8.46400007,10.7357654 8.31136002,10.7997014 8.152,10.8 L7.848,10.8 C7.68897547,10.7980619 7.53693306,10.7343763 7.424,10.6224 L3.3184,6.4672 C3.16044703,6.30862179 3.16044703,6.05217821 3.3184,5.8936 L3.8864,5.3192 C3.95991079,5.24354153 4.06091047,5.20085176 4.1664,5.20085176 C4.27188953,5.20085176 4.37288921,5.24354153 4.4464,5.3192 L8,8.9168 L11.5536,5.3192 C11.6284927,5.24307539 11.7308111,5.20020394 11.8376,5.20020394 C11.9443889,5.20020394 12.0467073,5.24307539 12.1216,5.3192 L12.6816,5.8936 C12.839553,6.05217821 12.839553,6.30862179 12.6816,6.4672 L8.576,10.6224 Z', + d: + 'M8.576,10.6224 C8.46400007,10.7357654 8.31136002,10.7997014 8.152,10.8 L7.848,10.8 C7.68897547,10.7980619 7.53693306,10.7343763 7.424,10.6224 L3.3184,6.4672 C3.16044703,6.30862179 3.16044703,6.05217821 3.3184,5.8936 L3.8864,5.3192 C3.95991079,5.24354153 4.06091047,5.20085176 4.1664,5.20085176 C4.27188953,5.20085176 4.37288921,5.24354153 4.4464,5.3192 L8,8.9168 L11.5536,5.3192 C11.6284927,5.24307539 11.7308111,5.20020394 11.8376,5.20020394 C11.9443889,5.20020394 12.0467073,5.24307539 12.1216,5.3192 L12.6816,5.8936 C12.839553,6.05217821 12.839553,6.30862179 12.6816,6.4672 L8.576,10.6224 Z', id: 'Arrow-\u8DEF\u5F84', }), ), diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Brush.d.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Brush.d.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Brush.d.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Brush.d.ts diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Brush.js b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Brush.js new file mode 100644 index 000000000..cfa57b2f2 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Brush.js @@ -0,0 +1,60 @@ +import * as React from 'react'; + +function Brush(props) { + return /*#__PURE__*/ React.createElement( + 'svg', + Object.assign( + { + width: '1em', + height: '1em', + viewBox: '0 0 14 18', + xmlns: 'http://www.w3.org/2000/svg', + xmlnsXlink: 'http://www.w3.org/1999/xlink', + }, + props, + { + style: Object.assign( + { + verticalAlign: '-0.125em', + }, + props.style, + ), + className: ['nanqu-token-panel-icon', props.className].filter(Boolean).join(' '), + }, + ), + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Brush-\u9875\u9762-1', + stroke: 'none', + strokeWidth: 1, + fill: 'none', + fillRule: 'evenodd', + fillOpacity: 0.649999976, + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Brush-\u4E3B\u9898\u7F16\u8F91\u5668---\u591A\u4E3B\u9898', + transform: 'translate(-17.000000, -121.000000)', + fill: 'currentColor', + fillRule: 'nonzero', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Brush-brush', + transform: 'translate(14.000000, 120.000000)', + }, + /*#__PURE__*/ React.createElement('path', { + d: + 'M8.20652175,3.2826087 L8.20652175,4.10326086 C8.20652175,4.55649455 7.83910325,4.92391304 7.38586957,4.92391304 C6.93263588,4.92391304 6.56521738,4.55649455 6.56521738,4.10326086 L6.56521738,3.2826087 L4.92391304,3.2826087 L4.92391304,8.20652175 L14.7717391,8.20652175 L14.7717391,3.2826087 L13.1304348,3.2826087 L13.1304348,5.74456522 C13.1304348,6.19779891 12.7630163,6.5652174 12.3097826,6.5652174 C11.8565489,6.5652174 11.4891304,6.19779891 11.4891304,5.74456522 L11.4891304,3.2826087 L8.20652175,3.2826087 Z M4.92391304,9.84782609 L4.92391304,11.4891304 L7.72233695,11.4891304 C8.08431263,11.4890155 8.42799204,11.6482243 8.66197039,11.9244136 C8.89594874,12.2006029 8.99650752,12.5657753 8.93690217,12.9228098 L8.60043479,14.9399728 C8.51784643,15.435105 8.73592476,15.9322123 9.15616576,16.2067558 C9.57640676,16.4812994 10.1192454,16.4812994 10.5394864,16.2067558 C10.9597274,15.9322123 11.1778057,15.435105 11.0952174,14.9399728 L10.75875,12.9228098 C10.6991446,12.5657753 10.7997034,12.2006029 11.0336818,11.9244136 C11.2676601,11.6482243 11.6113395,11.4890155 11.9733152,11.4891304 L14.7717391,11.4891304 L14.7717391,9.84782609 L4.92391304,9.84782609 Z M12.7143641,14.6699783 C12.9035912,15.807501 12.4022968,16.9492894 11.4368082,17.5798421 C10.4713197,18.2103948 9.2243325,18.2103948 8.25884395,17.5798421 C7.2933554,16.9492894 6.79206095,15.807501 6.98128804,14.6699783 L7.23815217,13.1304348 L4.92391304,13.1304348 C4.48861206,13.1304348 4.07113988,12.9575121 3.76333561,12.6497079 C3.45553133,12.3419036 3.2826087,11.9244314 3.2826087,11.4891304 L3.2826087,3.2826087 C3.2826087,2.84730772 3.45553133,2.42983554 3.76333561,2.12203126 C4.07113988,1.81422698 4.48861206,1.64130434 4.92391304,1.64130434 L14.7717391,1.64130434 C15.2070401,1.64130434 15.6245123,1.81422698 15.9323166,2.12203126 C16.2401208,2.42983554 16.4130435,2.84730772 16.4130435,3.2826087 L16.4130435,11.4891304 C16.4130435,11.9244314 16.2401208,12.3419036 15.9323166,12.6497079 C15.6245123,12.9575121 15.2070401,13.1304348 14.7717391,13.1304348 L12.4575,13.1304348 L12.7143641,14.6699783 L12.7143641,14.6699783 Z', + id: 'Brush-\u5F62\u72B6', + }), + ), + ), + ), + ); +} + +export default Brush; diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Compact.d.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Compact.d.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Compact.d.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Compact.d.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Compact.js b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Compact.js similarity index 56% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Compact.js rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Compact.js index bc74d7ff0..e69a5abd3 100644 --- a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Compact.js +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Compact.js @@ -60,7 +60,8 @@ function Compact(props) { height: 16, }), /*#__PURE__*/ React.createElement('path', { - d: 'M10,14 L10,12 C10,10.8666667 10.8666667,10 12,10 L14,10 C14.4,10 14.6666667,10.2666667 14.6666667,10.6666667 C14.6666667,11.0666667 14.4,11.3333333 14,11.3333333 L12,11.3333333 C11.6,11.3333333 11.3333333,11.6 11.3333333,12 L11.3333333,14 C11.3333333,14.4 11.0666667,14.6666667 10.6666667,14.6666667 C10.2666667,14.6666667 10,14.4 10,14 L10,14 Z M4.66666667,14 L4.66666667,12 C4.66666667,11.6 4.4,11.3333333 4,11.3333333 L2,11.3333333 C1.6,11.3333333 1.33333333,11.0666667 1.33333333,10.6666667 C1.33333333,10.2666667 1.6,10 2,10 L4,10 C5.13333333,10 6,10.8666667 6,12 L6,14 C6,14.4 5.73333333,14.6666667 5.33333333,14.6666667 C4.93333333,14.6666667 4.66666666,14.4 4.66666667,14 L4.66666667,14 Z M12,6 C10.8666667,6 10,5.13333333 10,4 L10,2 C10,1.6 10.2666667,1.33333333 10.6666667,1.33333333 C11.0666667,1.33333333 11.3333333,1.6 11.3333333,2 L11.3333333,4 C11.3333333,4.4 11.6,4.66666667 12,4.66666667 L14,4.66666667 C14.4,4.66666667 14.6666667,4.93333334 14.6666667,5.33333333 C14.6666667,5.73333331 14.4,6 14,6 L12,6 L12,6 Z M2,6 C1.6,6 1.33333333,5.73333333 1.33333333,5.33333333 C1.33333333,4.93333333 1.6,4.66666666 2,4.66666667 L4,4.66666667 C4.4,4.66666667 4.66666667,4.4 4.66666667,4 L4.66666667,2 C4.66666667,1.6 4.93333334,1.33333333 5.33333333,1.33333333 C5.73333331,1.33333333 6,1.6 6,2 L6,4 C6,5.13333333 5.13333333,6 4,6 L2,6 Z', + d: + 'M10,14 L10,12 C10,10.8666667 10.8666667,10 12,10 L14,10 C14.4,10 14.6666667,10.2666667 14.6666667,10.6666667 C14.6666667,11.0666667 14.4,11.3333333 14,11.3333333 L12,11.3333333 C11.6,11.3333333 11.3333333,11.6 11.3333333,12 L11.3333333,14 C11.3333333,14.4 11.0666667,14.6666667 10.6666667,14.6666667 C10.2666667,14.6666667 10,14.4 10,14 L10,14 Z M4.66666667,14 L4.66666667,12 C4.66666667,11.6 4.4,11.3333333 4,11.3333333 L2,11.3333333 C1.6,11.3333333 1.33333333,11.0666667 1.33333333,10.6666667 C1.33333333,10.2666667 1.6,10 2,10 L4,10 C5.13333333,10 6,10.8666667 6,12 L6,14 C6,14.4 5.73333333,14.6666667 5.33333333,14.6666667 C4.93333333,14.6666667 4.66666666,14.4 4.66666667,14 L4.66666667,14 Z M12,6 C10.8666667,6 10,5.13333333 10,4 L10,2 C10,1.6 10.2666667,1.33333333 10.6666667,1.33333333 C11.0666667,1.33333333 11.3333333,1.6 11.3333333,2 L11.3333333,4 C11.3333333,4.4 11.6,4.66666667 12,4.66666667 L14,4.66666667 C14.4,4.66666667 14.6666667,4.93333334 14.6666667,5.33333333 C14.6666667,5.73333331 14.4,6 14,6 L12,6 L12,6 Z M2,6 C1.6,6 1.33333333,5.73333333 1.33333333,5.33333333 C1.33333333,4.93333333 1.6,4.66666666 2,4.66666667 L4,4.66666667 C4.4,4.66666667 4.66666667,4.4 4.66666667,4 L4.66666667,2 C4.66666667,1.6 4.93333334,1.33333333 5.33333333,1.33333333 C5.73333331,1.33333333 6,1.6 6,2 L6,4 C6,5.13333333 5.13333333,6 4,6 L2,6 Z', id: 'Compact-\u5F62\u72B6', }), ), diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Control.d.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Control.d.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Control.d.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Control.d.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Control.js b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Control.js similarity index 50% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Control.js rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Control.js index 2d927d12d..0a617c108 100644 --- a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Control.js +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Control.js @@ -66,42 +66,50 @@ function Control(props) { height: 16, }), /*#__PURE__*/ React.createElement('path', { - d: 'M6,3.5625 L13.75,3.5625 L13.75,4.1875 L6,4.1875 L6,3.5625 Z M2.1875,3.5625 L3.8125,3.5625 L3.8125,4.1875 L2.1875,4.1875 L2.1875,3.5625 Z M8.3125,11.8125 L13.75,11.8125 L13.75,12.4375 L8.3125,12.4375 L8.3125,11.8125 Z M2.1875,11.8125 L6.125,11.8125 L6.125,12.4375 L2.1875,12.4375 L2.1875,11.8125 Z M12.625,7.6875 L13.75,7.6875 L13.75,8.3125 L12.625,8.3125 L12.625,7.6875 Z M2.1875,7.6875 L10.4375,7.6875 L10.4375,8.3125 L2.1875,8.3125 L2.1875,7.6875 Z', + d: + 'M6,3.5625 L13.75,3.5625 L13.75,4.1875 L6,4.1875 L6,3.5625 Z M2.1875,3.5625 L3.8125,3.5625 L3.8125,4.1875 L2.1875,4.1875 L2.1875,3.5625 Z M8.3125,11.8125 L13.75,11.8125 L13.75,12.4375 L8.3125,12.4375 L8.3125,11.8125 Z M2.1875,11.8125 L6.125,11.8125 L6.125,12.4375 L2.1875,12.4375 L2.1875,11.8125 Z M12.625,7.6875 L13.75,7.6875 L13.75,8.3125 L12.625,8.3125 L12.625,7.6875 Z M2.1875,7.6875 L10.4375,7.6875 L10.4375,8.3125 L2.1875,8.3125 L2.1875,7.6875 Z', id: 'Control-\u5F62\u72B6', fill: 'currentColor', }), /*#__PURE__*/ React.createElement('path', { - d: 'M1.875,3.875 C1.875,4.04758898 2.01491102,4.1875 2.1875,4.1875 C2.36008898,4.1875 2.5,4.04758898 2.5,3.875 C2.5,3.70241102 2.36008898,3.5625 2.1875,3.5625 C2.01491102,3.5625 1.875,3.70241102 1.875,3.875 Z', + d: + 'M1.875,3.875 C1.875,4.04758898 2.01491102,4.1875 2.1875,4.1875 C2.36008898,4.1875 2.5,4.04758898 2.5,3.875 C2.5,3.70241102 2.36008898,3.5625 2.1875,3.5625 C2.01491102,3.5625 1.875,3.70241102 1.875,3.875 Z', id: 'Control-\u8DEF\u5F84', fill: 'currentColor', }), /*#__PURE__*/ React.createElement('path', { - d: 'M13.4375,3.875 C13.4375,4.04758898 13.577411,4.1875 13.75,4.1875 C13.922589,4.1875 14.0625,4.04758898 14.0625,3.875 C14.0625,3.70241102 13.922589,3.5625 13.75,3.5625 C13.577411,3.5625 13.4375,3.70241102 13.4375,3.875 Z', + d: + 'M13.4375,3.875 C13.4375,4.04758898 13.577411,4.1875 13.75,4.1875 C13.922589,4.1875 14.0625,4.04758898 14.0625,3.875 C14.0625,3.70241102 13.922589,3.5625 13.75,3.5625 C13.577411,3.5625 13.4375,3.70241102 13.4375,3.875 Z', id: 'Control-\u8DEF\u5F84', fill: 'currentColor', }), /*#__PURE__*/ React.createElement('path', { - d: 'M13.4375,8 C13.4375,8.17258898 13.577411,8.3125 13.75,8.3125 C13.922589,8.3125 14.0625,8.17258898 14.0625,8 C14.0625,7.82741102 13.922589,7.6875 13.75,7.6875 C13.577411,7.6875 13.4375,7.82741102 13.4375,8 Z', + d: + 'M13.4375,8 C13.4375,8.17258898 13.577411,8.3125 13.75,8.3125 C13.922589,8.3125 14.0625,8.17258898 14.0625,8 C14.0625,7.82741102 13.922589,7.6875 13.75,7.6875 C13.577411,7.6875 13.4375,7.82741102 13.4375,8 Z', id: 'Control-\u8DEF\u5F84', fill: 'currentColor', }), /*#__PURE__*/ React.createElement('path', { - d: 'M13.4375,12.125 C13.4375,12.297589 13.577411,12.4375 13.75,12.4375 C13.922589,12.4375 14.0625,12.297589 14.0625,12.125 C14.0625,11.952411 13.922589,11.8125 13.75,11.8125 C13.577411,11.8125 13.4375,11.952411 13.4375,12.125 L13.4375,12.125 Z', + d: + 'M13.4375,12.125 C13.4375,12.297589 13.577411,12.4375 13.75,12.4375 C13.922589,12.4375 14.0625,12.297589 14.0625,12.125 C14.0625,11.952411 13.922589,11.8125 13.75,11.8125 C13.577411,11.8125 13.4375,11.952411 13.4375,12.125 L13.4375,12.125 Z', id: 'Control-\u8DEF\u5F84', fill: 'currentColor', }), /*#__PURE__*/ React.createElement('path', { - d: 'M1.875,8 C1.875,8.17258898 2.01491102,8.3125 2.1875,8.3125 C2.36008898,8.3125 2.5,8.17258898 2.5,8 C2.5,7.82741102 2.36008898,7.6875 2.1875,7.6875 C2.01491102,7.6875 1.875,7.82741102 1.875,8 Z', + d: + 'M1.875,8 C1.875,8.17258898 2.01491102,8.3125 2.1875,8.3125 C2.36008898,8.3125 2.5,8.17258898 2.5,8 C2.5,7.82741102 2.36008898,7.6875 2.1875,7.6875 C2.01491102,7.6875 1.875,7.82741102 1.875,8 Z', id: 'Control-\u8DEF\u5F84', fill: 'currentColor', }), /*#__PURE__*/ React.createElement('path', { - d: 'M1.875,12.125 C1.875,12.297589 2.01491102,12.4375 2.1875,12.4375 C2.36008898,12.4375 2.5,12.297589 2.5,12.125 C2.5,11.952411 2.36008898,11.8125 2.1875,11.8125 C2.01491102,11.8125 1.875,11.952411 1.875,12.125 L1.875,12.125 Z', + d: + 'M1.875,12.125 C1.875,12.297589 2.01491102,12.4375 2.1875,12.4375 C2.36008898,12.4375 2.5,12.297589 2.5,12.125 C2.5,11.952411 2.36008898,11.8125 2.1875,11.8125 C2.01491102,11.8125 1.875,11.952411 1.875,12.125 L1.875,12.125 Z', id: 'Control-\u8DEF\u5F84', fill: 'currentColor', }), /*#__PURE__*/ React.createElement('path', { - d: 'M4.90625,5.25 C4.13125,5.25 3.5,4.61875 3.5,3.84375 C3.5,3.06875 4.13125,2.4375 4.90625,2.4375 C5.68125,2.4375 6.3125,3.06875 6.3125,3.84375 C6.3125,4.61875 5.68125,5.25 4.90625,5.25 Z M4.90625,3.0625 C4.475,3.0625 4.125,3.4125 4.125,3.84375 C4.125,4.275 4.475,4.625 4.90625,4.625 C5.3375,4.625 5.6875,4.275 5.6875,3.84375 C5.6875,3.4125 5.3375,3.0625 4.90625,3.0625 Z M11.53125,9.4375 C10.75625,9.4375 10.125,8.80625 10.125,8.03125 C10.125,7.25625 10.75625,6.625 11.53125,6.625 C12.30625,6.625 12.9375,7.25625 12.9375,8.03125 C12.9375,8.80625 12.30625,9.4375 11.53125,9.4375 Z M11.53125,7.25 C11.1,7.25 10.75,7.6 10.75,8.03125 C10.75,8.4625 11.1,8.8125 11.53125,8.8125 C11.9625,8.8125 12.3125,8.4625 12.3125,8.03125 C12.3125,7.6 11.9625,7.25 11.53125,7.25 Z M7.21875,13.5 C6.44375,13.5 5.8125,12.86875 5.8125,12.09375 C5.8125,11.31875 6.44375,10.6875 7.21875,10.6875 C7.99375,10.6875 8.625,11.31875 8.625,12.09375 C8.625,12.86875 7.99375,13.5 7.21875,13.5 Z M7.21875,11.3125 C6.7875,11.3125 6.4375,11.6625 6.4375,12.09375 C6.4375,12.525 6.7875,12.875 7.21875,12.875 C7.65,12.875 8,12.525 8,12.09375 C8,11.6625 7.65,11.3125 7.21875,11.3125 Z', + d: + 'M4.90625,5.25 C4.13125,5.25 3.5,4.61875 3.5,3.84375 C3.5,3.06875 4.13125,2.4375 4.90625,2.4375 C5.68125,2.4375 6.3125,3.06875 6.3125,3.84375 C6.3125,4.61875 5.68125,5.25 4.90625,5.25 Z M4.90625,3.0625 C4.475,3.0625 4.125,3.4125 4.125,3.84375 C4.125,4.275 4.475,4.625 4.90625,4.625 C5.3375,4.625 5.6875,4.275 5.6875,3.84375 C5.6875,3.4125 5.3375,3.0625 4.90625,3.0625 Z M11.53125,9.4375 C10.75625,9.4375 10.125,8.80625 10.125,8.03125 C10.125,7.25625 10.75625,6.625 11.53125,6.625 C12.30625,6.625 12.9375,7.25625 12.9375,8.03125 C12.9375,8.80625 12.30625,9.4375 11.53125,9.4375 Z M11.53125,7.25 C11.1,7.25 10.75,7.6 10.75,8.03125 C10.75,8.4625 11.1,8.8125 11.53125,8.8125 C11.9625,8.8125 12.3125,8.4625 12.3125,8.03125 C12.3125,7.6 11.9625,7.25 11.53125,7.25 Z M7.21875,13.5 C6.44375,13.5 5.8125,12.86875 5.8125,12.09375 C5.8125,11.31875 6.44375,10.6875 7.21875,10.6875 C7.99375,10.6875 8.625,11.31875 8.625,12.09375 C8.625,12.86875 7.99375,13.5 7.21875,13.5 Z M7.21875,11.3125 C6.7875,11.3125 6.4375,11.6625 6.4375,12.09375 C6.4375,12.525 6.7875,12.875 7.21875,12.875 C7.65,12.875 8,12.525 8,12.09375 C8,11.6625 7.65,11.3125 7.21875,11.3125 Z', id: 'Control-\u5F62\u72B6', fill: 'currentColor', }), diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Dark.d.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Dark.d.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Dark.d.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Dark.d.ts diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Dark.js b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Dark.js new file mode 100644 index 000000000..35819cc4c --- /dev/null +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Dark.js @@ -0,0 +1,74 @@ +import * as React from 'react'; + +function Dark(props) { + return /*#__PURE__*/ React.createElement( + 'svg', + Object.assign( + { + width: '1em', + height: '1em', + viewBox: '0 0 17 17', + xmlns: 'http://www.w3.org/2000/svg', + xmlnsXlink: 'http://www.w3.org/1999/xlink', + }, + props, + { + style: Object.assign( + { + verticalAlign: '-0.125em', + }, + props.style, + ), + className: ['nanqu-token-panel-icon', props.className].filter(Boolean).join(' '), + }, + ), + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Dark-\u9875\u9762-1', + stroke: 'none', + strokeWidth: 1, + fill: 'none', + fillRule: 'evenodd', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Dark-\u9ED8\u8BA4', + transform: 'translate(-9.000000, -49.500000)', + fill: 'currentColor', + fillRule: 'nonzero', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Dark-\u7F16\u7EC4-17', + transform: 'translate(0.000000, 42.500000)', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Dark-moon', + transform: 'translate(9.268811, 7.500000)', + }, + /*#__PURE__*/ React.createElement('rect', { + id: 'Dark-\u77E9\u5F62', + opacity: 0, + x: 0, + y: 0, + width: 16, + height: 16, + }), + /*#__PURE__*/ React.createElement('path', { + d: + 'M8,1.33333333 C8.14933333,1.33333333 8.29688889,1.33844444 8.44266667,1.34866666 C8.14755556,1.98422221 8,2.64577777 8,3.33333333 C8,3.96533333 8.12333333,4.56955555 8.37,5.146 C8.61666667,5.72244445 8.94822222,6.21888889 9.36466667,6.63533333 C9.78111112,7.05177777 10.2775556,7.38333332 10.854,7.63 C11.4304444,7.87666668 12.0346667,8.00000001 12.6666667,8 C13.3542222,8 14.0157778,7.85244444 14.6513333,7.55733333 C14.6615556,7.70311111 14.6666667,7.85066667 14.6666667,8 C14.6666667,8.604 14.5868889,9.19422222 14.4273333,9.77066667 C14.2677778,10.3471111 14.0446667,10.8793333 13.758,11.3673333 C13.4713333,11.8553333 13.1233333,12.3042222 12.714,12.714 C12.3046667,13.1237778 11.8557778,13.4717778 11.3673333,13.758 C10.8788889,14.0442222 10.3466667,14.2673333 9.77066667,14.4273333 C9.19466667,14.5873333 8.60444445,14.6671111 8,14.6666685 C7.39555555,14.6662222 6.80533333,14.5864444 6.22933333,14.4273333 C5.65333333,14.2682222 5.1211111,14.0451111 4.63266666,13.758 C4.14422221,13.4708889 3.69533332,13.1228889 3.28599998,12.714 C2.87666665,12.3051111 2.52866665,11.8562222 2.24199998,11.3673333 C1.95533332,10.8784444 1.73222221,10.3462222 1.57266666,9.77066667 C1.4131111,9.19511112 1.33333333,8.6048889 1.33333333,8 C1.33333333,7.3951111 1.4131111,6.80488888 1.57266666,6.22933333 C1.73222221,5.65377778 1.95533332,5.12155555 2.24199998,4.63266666 C2.52866665,4.14377776 2.87666665,3.69488887 3.28599998,3.28599998 C3.69533332,2.8771111 4.14422221,2.5291111 4.63266666,2.24199998 C5.1211111,1.95488887 5.65333333,1.73177776 6.22933333,1.57266666 C6.80533333,1.41355555 7.39555555,1.33377778 8,1.33333333 Z M6.68733333,2.828 C6.11444444,2.97377778 5.58066667,3.20977778 5.086,3.536 C4.59133333,3.86222222 4.166,4.24933333 3.81,4.69733333 C3.454,5.14533333 3.17444444,5.65488889 2.97133333,6.226 C2.76822221,6.79711111 2.66666666,7.38822222 2.66666666,7.99933333 C2.66666666,8.72155555 2.80733332,9.41155555 3.08866666,10.0693333 C3.36999999,10.7271111 3.74933332,11.2948889 4.22666666,11.7726667 C4.70399999,12.2504444 5.27177777,12.6297778 5.92999998,12.9106667 C6.5882222,13.1915556 7.2782222,13.3322222 7.99999998,13.3326667 C8.6111111,13.3326667 9.20222221,13.2311111 9.77333331,13.028 C10.3444444,12.8248889 10.854,12.5453333 11.302,12.1893333 C11.75,11.8333333 12.1371111,11.408 12.4633333,10.9133333 C12.7895555,10.4186666 13.0255555,9.88488887 13.1713333,9.31199998 C13.022,9.32577777 12.8535555,9.33266666 12.666,9.33266666 C11.8535555,9.33266666 11.0775555,9.17377777 10.338,8.85599998 C9.59844443,8.5382222 8.96044443,8.11111109 8.42399998,7.57466666 C7.88755554,7.03822222 7.46044443,6.40022222 7.14266666,5.66066666 C6.82488889,4.92111109 6.66599999,4.14511109 6.66599998,3.33266666 C6.66599998,3.1451111 6.67288888,2.97666666 6.68666666,2.82733333 L6.68733333,2.828 Z', + id: 'Dark-\u5F62\u72B6', + }), + ), + ), + ), + ), + ); +} + +export default Dark; diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Light.d.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Light.d.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Light.d.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Light.d.ts diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Light.js b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Light.js new file mode 100644 index 000000000..a6b205a5a --- /dev/null +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Light.js @@ -0,0 +1,88 @@ +import * as React from 'react'; + +function Light(props) { + return /*#__PURE__*/ React.createElement( + 'svg', + Object.assign( + { + width: '1em', + height: '1em', + viewBox: '0 0 13 13', + xmlns: 'http://www.w3.org/2000/svg', + xmlnsXlink: 'http://www.w3.org/1999/xlink', + }, + props, + { + style: Object.assign( + { + verticalAlign: '-0.125em', + }, + props.style, + ), + className: ['nanqu-token-panel-icon', props.className].filter(Boolean).join(' '), + }, + ), + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Light-\u9875\u9762-1', + stroke: 'none', + strokeWidth: 1, + fill: 'none', + fillRule: 'evenodd', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Light-\u4E3B\u9898\u5305', + transform: 'translate(-2943.000000, -292.000000)', + fill: 'currentColor', + fillRule: 'nonzero', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Light-\u7F16\u7EC4-12', + transform: 'translate(2415.000000, 222.000000)', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Light-\u89C6\u56FE\u5207\u6362-\u7F16\u8F91\u6001', + transform: 'translate(518.000000, 60.000000)', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Light-eye', + transform: 'translate(8.000000, 8.000000)', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Light-sun', + transform: 'translate(2.000000, 2.000000)', + }, + /*#__PURE__*/ React.createElement('rect', { + id: 'Light-\u77E9\u5F62', + opacity: 0, + x: 0, + y: 0, + width: 13, + height: 13, + }), + /*#__PURE__*/ React.createElement('path', { + d: + 'M6.5,9.75 C4.7051875,9.75 3.25,8.2948125 3.25,6.5 C3.25,4.7051875 4.7051875,3.25 6.5,3.25 C8.2948125,3.25 9.75,4.7051875 9.75,6.5 C9.75,8.2948125 8.2948125,9.75 6.5,9.75 Z M6.5,8.66666667 C7.69661696,8.66666667 8.66666667,7.69661696 8.66666667,6.5 C8.66666667,5.30338304 7.69661696,4.33333333 6.5,4.33333333 C5.30338305,4.33333333 4.33333336,5.30338305 4.33333336,6.5 C4.33333336,7.69661695 5.30338305,8.66666667 6.5,8.66666667 Z M5.95833333,1.08333333 C5.95833333,0.784179087 6.20084576,0.541666658 6.5,0.541666658 C6.79915424,0.541666658 7.04166667,0.784179087 7.04166667,1.08333333 L7.04166667,2.16666667 C7.04166667,2.46582091 6.79915424,2.70833334 6.5,2.70833334 C6.20084576,2.70833334 5.95833333,2.46582091 5.95833333,2.16666667 L5.95833333,1.08333333 L5.95833333,1.08333333 Z M5.95833333,10.8333333 C5.95833333,10.5341791 6.20084576,10.2916667 6.5,10.2916667 C6.79915424,10.2916667 7.04166667,10.5341791 7.04166667,10.8333333 L7.04166667,11.9166667 C7.04166667,12.2158209 6.79915424,12.4583333 6.5,12.4583333 C6.20084576,12.4583333 5.95833333,12.2158209 5.95833333,11.9166667 L5.95833333,10.8333333 L5.95833333,10.8333333 Z M1.08333333,7.04166667 C0.784179087,7.04166667 0.541666658,6.79915424 0.541666658,6.5 C0.541666658,6.20084576 0.784179087,5.95833333 1.08333333,5.95833333 L2.16666667,5.95833333 C2.46582091,5.95833333 2.70833334,6.20084576 2.70833334,6.5 C2.70833334,6.79915424 2.46582091,7.04166667 2.16666667,7.04166667 L1.08333333,7.04166667 L1.08333333,7.04166667 Z M10.8333333,7.04166667 C10.5341791,7.04166667 10.2916667,6.79915424 10.2916667,6.5 C10.2916667,6.20084576 10.5341791,5.95833333 10.8333333,5.95833333 L11.9166667,5.95833333 C12.2158209,5.95833333 12.4583333,6.20084576 12.4583333,6.5 C12.4583333,6.79915424 12.2158209,7.04166667 11.9166667,7.04166667 L10.8333333,7.04166667 L10.8333333,7.04166667 Z M2.05454167,2.82045833 C1.84926545,2.60791971 1.85220137,2.27007933 2.06114035,2.06114035 C2.27007933,1.85220137 2.60791971,1.84926545 2.82045833,2.05454167 L3.63295833,2.86704167 C3.83823455,3.07958029 3.83529863,3.41742067 3.62635965,3.62635965 C3.41742067,3.83529863 3.07958029,3.83823455 2.86704167,3.63295833 L2.05454167,2.82045833 L2.05454167,2.82045833 Z M9.36704167,10.1329583 C9.16176545,9.92041971 9.16470137,9.58257933 9.37364035,9.37364035 C9.58257933,9.16470137 9.92041971,9.16176545 10.1329583,9.36704167 L10.9454583,10.1795417 C11.1507346,10.3920803 11.1477986,10.7299207 10.9388596,10.9388596 C10.7299207,11.1477986 10.3920803,11.1507346 10.1795417,10.9454583 L9.36704167,10.1329583 L9.36704167,10.1329583 Z M2.82045833,10.9454583 C2.60791971,11.1507346 2.27007933,11.1477986 2.06114035,10.9388596 C1.85220137,10.7299207 1.84926545,10.3920803 2.05454167,10.1795417 L2.86704167,9.36704167 C3.07958029,9.16176545 3.41742067,9.16470137 3.62635965,9.37364035 C3.83529863,9.58257933 3.83823455,9.92041971 3.63295833,10.1329583 L2.82045833,10.9454583 L2.82045833,10.9454583 Z M10.1329583,3.63295833 C9.92041971,3.83823455 9.58257933,3.83529863 9.37364035,3.62635965 C9.16470137,3.41742067 9.16176545,3.07958029 9.36704167,2.86704167 L10.1795417,2.05454167 C10.3920803,1.84926545 10.7299207,1.85220137 10.9388596,2.06114035 C11.1477986,2.27007933 11.1507346,2.60791971 10.9454583,2.82045833 L10.1329583,3.63295833 L10.1329583,3.63295833 Z', + id: 'Light-\u5F62\u72B6', + }), + ), + ), + ), + ), + ), + ), + ); +} + +export default Light; diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Margin.d.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Margin.d.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Margin.d.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Margin.d.ts diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Margin.js b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Margin.js new file mode 100644 index 000000000..67af93335 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Margin.js @@ -0,0 +1,60 @@ +import * as React from 'react'; + +function Margin(props) { + return /*#__PURE__*/ React.createElement( + 'svg', + Object.assign( + { + width: '1em', + height: '1em', + viewBox: '0 0 16 17', + xmlns: 'http://www.w3.org/2000/svg', + xmlnsXlink: 'http://www.w3.org/1999/xlink', + }, + props, + { + style: Object.assign( + { + verticalAlign: '-0.125em', + }, + props.style, + ), + className: ['nanqu-token-panel-icon', props.className].filter(Boolean).join(' '), + }, + ), + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Margin-\u9875\u9762-1', + stroke: 'none', + strokeWidth: 1, + fill: 'none', + fillRule: 'evenodd', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Margin-margin', + transform: 'translate(0.000000, 0.942377)', + fill: 'currentColor', + fillRule: 'nonzero', + }, + /*#__PURE__*/ React.createElement('rect', { + id: 'Margin-\u77E9\u5F62', + opacity: 0, + x: 0, + y: 0, + width: 16, + height: 15.9807923, + }), + /*#__PURE__*/ React.createElement('path', { + d: + 'M11.6666667,2.75858915 L4.33333333,2.75858915 C4.01904762,2.75858915 3.80952382,2.54931688 3.80952382,2.23540845 C3.80952382,1.92150003 4.01904763,1.71222775 4.33333334,1.71222775 L11.6666667,1.71222775 C11.9809524,1.71222775 12.1904762,1.92150003 12.1904762,2.23540845 C12.1904762,2.54931688 11.9809524,2.75858915 11.6666667,2.75858915 Z M11.6666667,14.2685646 L4.33333333,14.2685646 C4.01904762,14.2685646 3.8095238,14.0592923 3.8095238,13.7453839 C3.8095238,13.4314755 4.01904762,13.2222032 4.33333333,13.2222032 L11.6666667,13.2222032 C11.9809524,13.2222032 12.1904762,13.4314755 12.1904762,13.7453839 C12.1904762,14.0592923 11.9809524,14.2685646 11.6666667,14.2685646 Z M13.7619048,12.1758418 C13.447619,12.1758418 13.2380952,11.9665695 13.2380952,11.6526611 L13.2380952,4.32813125 C13.2380952,4.01422283 13.4476191,3.80495055 13.7619048,3.80495055 C14.0761905,3.80495055 14.2857143,4.01422283 14.2857143,4.32813125 L14.2857143,11.6526611 C14.2857143,11.9665695 14.0761905,12.1758418 13.7619048,12.1758418 Z M2.23809524,12.1758418 C1.92380953,12.1758418 1.71428572,11.9665695 1.71428572,11.6526611 L1.71428572,4.32813125 C1.71428572,4.01422283 1.92380953,3.80495055 2.23809524,3.80495055 C2.55238096,3.80495055 2.76190477,4.01422283 2.76190477,4.32813125 L2.76190477,11.6526611 C2.76190477,11.9665695 2.55238096,12.1758418 2.23809524,12.1758418 Z M11.6666667,12.1758418 L4.33333333,12.1758418 C4.01904762,12.1758418 3.8095238,11.9665695 3.8095238,11.6526611 L3.8095238,4.32813125 C3.8095238,4.01422283 4.01904763,3.80495055 4.33333334,3.80495055 L11.6666667,3.80495055 C11.9809524,3.80495055 12.1904762,4.01422283 12.1904762,4.32813125 L12.1904762,11.6526611 C12.1904762,11.9665695 11.9809524,12.1758418 11.6666667,12.1758418 Z M4.85714286,11.1294804 L11.1428571,11.1294804 L11.1428571,4.85131196 L4.85714286,4.85131196 L4.85714286,11.1294804 Z', + id: 'Margin-\u5F62\u72B6', + }), + ), + ), + ); +} + +export default Margin; diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Motion.d.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Motion.d.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Motion.d.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Motion.d.ts diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Motion.js b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Motion.js new file mode 100644 index 000000000..ca902fa83 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Motion.js @@ -0,0 +1,60 @@ +import * as React from 'react'; + +function Motion(props) { + return /*#__PURE__*/ React.createElement( + 'svg', + Object.assign( + { + width: '1em', + height: '1em', + viewBox: '0 0 16 17', + xmlns: 'http://www.w3.org/2000/svg', + xmlnsXlink: 'http://www.w3.org/1999/xlink', + }, + props, + { + style: Object.assign( + { + verticalAlign: '-0.125em', + }, + props.style, + ), + className: ['nanqu-token-panel-icon', props.className].filter(Boolean).join(' '), + }, + ), + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Motion-\u9875\u9762-1', + stroke: 'none', + strokeWidth: 1, + fill: 'none', + fillRule: 'evenodd', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Motion-\u5BCC\u6587\u672C\u7F16\u8F91\u5668_\u52A8\u6548', + transform: 'translate(0.000000, 0.903962)', + fill: 'currentColor', + fillRule: 'nonzero', + }, + /*#__PURE__*/ React.createElement('rect', { + id: 'Motion-\u77E9\u5F62', + opacity: 0, + x: 0, + y: 0, + width: 16, + height: 15.9807923, + }), + /*#__PURE__*/ React.createElement('path', { + d: + 'M6.55644444,12.5262777 L7.99555556,13.9627734 C8.13290682,14.0984321 8.18701716,14.2971622 8.13737053,14.4836147 C8.0877239,14.6700672 7.94192169,14.8156943 7.75524511,14.8652814 C7.56856853,14.9148684 7.36959959,14.860823 7.23377778,14.7236366 L5.79555556,13.2862532 C5.60250935,13.0737079 5.61045949,12.7472435 5.8136232,12.5443237 C6.01678692,12.3414038 6.3436437,12.3334632 6.55644444,12.5262777 L6.55644444,12.5262777 Z M12.2435556,12.6630023 L13.3857778,13.8038533 C13.5231286,13.9395121 13.5772386,14.138242 13.527592,14.3246942 C13.4779453,14.5111464 13.3321433,14.6567734 13.145467,14.7063605 C12.9587906,14.7559476 12.7598219,14.7019025 12.624,14.5647165 L11.4817778,13.4238655 C11.3444269,13.2882067 11.2903169,13.0894768 11.3399636,12.9030246 C11.3896103,12.7165724 11.5354123,12.5709454 11.7220886,12.5213583 C11.9087649,12.4717712 12.1077337,12.5258163 12.2435556,12.6630023 L12.2435556,12.6630023 Z M7.29511111,0.990809123 C7.37066667,1.03342457 7.43377778,1.09645992 7.47644444,1.17192476 L9.23911111,4.29439403 L12.7564444,5.00376364 C12.9258902,5.03768098 13.0638332,5.16026877 13.1172645,5.32441904 C13.1706959,5.4885693 13.1313024,5.66874209 13.0142222,5.79570068 L10.5866667,8.43430705 L10.9982222,11.9953603 C11.018176,12.1667991 10.94398,12.3356549 10.8041422,12.4370491 C10.6643043,12.5384432 10.4805781,12.5566027 10.3235556,12.4845501 L7.06133333,10.9930095 L3.79733333,12.4845501 C3.64031082,12.5566027 3.45658456,12.5384432 3.3167467,12.4370491 C3.17690884,12.3356549 3.10271286,12.1667991 3.12266667,11.9953603 L3.53511111,8.43519487 L1.10577778,5.79570068 C0.988697555,5.66874209 0.949304077,5.4885693 1.00273546,5.32441904 C1.05616684,5.16026877 1.19410976,5.03768098 1.36355556,5.00376364 L4.88177778,4.29439403 L6.64266667,1.17192476 C6.70502264,1.06136833 6.80886024,0.980137913 6.93126543,0.94615878 C7.05367063,0.912179648 7.18458201,0.928244805 7.29511111,0.990809123 Z M7.05955556,2.62440123 L5.57688889,5.25235374 L2.61688889,5.84808216 L4.65955556,8.07030012 L4.31288889,11.0666987 L7.05955556,9.81131866 L9.80533333,11.0666987 L9.45866667,8.07030012 L11.5031111,5.84896999 L8.54222222,5.25235374 L7.05866667,2.62440123 L7.05955556,2.62440123 Z M13.1528889,7.76045031 L14.5911111,9.19694597 C14.7892424,9.40878705 14.7837079,9.73933037 14.5785954,9.9444359 C14.373483,10.1495414 14.0425491,10.1554552 13.8302222,9.95780926 L12.3911111,8.5213136 C12.2537603,8.38565475 12.1996502,8.18692487 12.2492969,8.00047265 C12.2989436,7.81402043 12.4447456,7.66839345 12.6314219,7.61880637 C12.8180983,7.56921929 13.017067,7.62326436 13.1528889,7.76045031 L13.1528889,7.76045031 Z', + id: 'Motion-\u5F62\u72B6', + }), + ), + ), + ); +} + +export default Motion; diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Pick.d.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Pick.d.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Pick.d.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Pick.d.ts diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Pick.js b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Pick.js new file mode 100644 index 000000000..6f1523376 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/Pick.js @@ -0,0 +1,88 @@ +import * as React from 'react'; + +function Pick(props) { + return /*#__PURE__*/ React.createElement( + 'svg', + Object.assign( + { + width: '1em', + height: '1em', + viewBox: '0 0 14 14', + xmlns: 'http://www.w3.org/2000/svg', + xmlnsXlink: 'http://www.w3.org/1999/xlink', + }, + props, + { + style: Object.assign( + { + verticalAlign: '-0.125em', + }, + props.style, + ), + className: ['nanqu-token-panel-icon', props.className].filter(Boolean).join(' '), + }, + ), + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Pick-\u9875\u9762-1', + stroke: 'none', + strokeWidth: 1, + fill: 'none', + fillRule: 'evenodd', + fillOpacity: 0.65, + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Pick-\u4E3B\u9898\u7F16\u8F91\u5668---\u591A\u4E3B\u9898', + transform: 'translate(-541.000000, -387.000000)', + fill: 'currentColor', + fillRule: 'nonzero', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Pick-\u7F16\u7EC4-11', + transform: 'translate(76.000000, 340.000000)', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Pick-Map-Token-\u9762\u677F', + transform: 'translate(0.000000, 27.000000)', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Pick-token-\u663E\u793A', + transform: 'translate(-1.002041, -1.000000)', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Pick-\u7F16\u7EC4-2', + transform: 'translate(12.024490, 20.000000)', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'Pick-shangyeguanxi', + transform: 'translate(453.924490, 1.000000)', + }, + /*#__PURE__*/ React.createElement('path', { + d: + 'M12.6274816,8.17204883 C12.6358384,8.04673242 12.6401539,7.92030859 12.6401539,7.79288672 C12.6401539,5.50309375 11.2701899,3.53286719 9.30406641,2.65472266 C9.31862927,2.54983203 9.32632854,2.44274023 9.32632854,2.33384375 C9.32632854,1.05430664 8.28750187,0.0169394531 7.00623025,0.0169394531 C5.72484902,0.0169394531 4.68607715,1.05430664 4.68607715,2.33384375 C4.68607715,2.44267188 4.69376272,2.54968164 4.70829819,2.65451758 C2.74188703,3.53256641 1.37158055,5.50290234 1.37158055,7.79288672 C1.37158055,7.92044531 1.37592338,8.04699219 1.38428025,8.17243164 C0.593775725,8.54169531 0.0460860491,9.34289453 0.0460860491,10.2719531 C0.0460860491,11.5515449 1.08474833,12.5888574 2.36612955,12.5888574 C2.80723496,12.5888574 3.21958454,12.4658926 3.57069612,12.2524336 C4.52158393,12.9838105 5.71288912,13.4188223 7.00595625,13.4188223 C8.30016046,13.4188223 9.49238354,12.9830449 10.4436412,12.2505195 C10.7943281,12.4630762 11.2059516,12.5854668 11.6462213,12.5854668 C12.9274382,12.5854668 13.9661004,11.5489746 13.9661004,10.2703672 C13.9661004,9.34171875 13.4181916,8.54095703 12.6274816,8.17204883 Z M7.00623025,1.00913477 C7.73549676,1.00913477 8.32698463,1.59684766 8.33166995,2.32357617 C8.33168365,2.32647461 8.33177955,2.32935938 8.33177955,2.33225781 C8.33177955,2.69178711 8.18805519,3.01775195 7.95488499,3.25620313 C7.71417991,3.50236523 7.37813809,3.65527148 7.00623025,3.65527148 C6.6343361,3.65527148 6.29829428,3.50236523 6.0575618,3.25620313 C5.8243779,3.01775195 5.68062614,2.69178711 5.68062614,2.33225781 C5.68062614,2.32931836 5.68072204,2.32639258 5.68073574,2.32345313 C5.68547586,1.59679297 6.27704593,1.00913477 7.00623025,1.00913477 Z M2.36612955,11.5993965 C1.63399978,11.5993965 1.04047065,11.0058047 1.04047065,10.2734297 C1.04047065,9.84645703 1.24229576,9.46667969 1.55566445,9.22416797 C1.7797654,9.05074023 2.06088482,8.94746289 2.36614325,8.94746289 C2.41639403,8.94746289 2.46597352,8.95036133 2.51477213,8.95580273 C3.17696454,9.02969922 3.69181585,9.59136719 3.69181585,10.273416 C3.69181585,10.4903613 3.6397293,10.6951113 3.5473928,10.8758809 C3.39166744,11.1807637 3.12143934,11.4173555 2.79339819,11.5289863 C2.65931847,11.574623 2.51562151,11.5993965 2.36612955,11.5993965 Z M7.00127093,12.4178633 C5.99141928,12.4178633 5.0570808,12.0957402 4.29537321,11.549084 C4.53905114,11.1824316 4.68111783,10.7425937 4.68111783,10.2695605 C4.68111783,8.99117188 3.64429132,7.95466602 2.36460887,7.95280664 C2.3626772,7.89787305 2.36134833,7.84278906 2.36134833,7.78737695 C2.36134833,5.92565039 3.46242679,4.32079102 5.05001172,3.58529883 C5.46299149,4.22481445 6.18258597,4.64830078 7.00128463,4.64830078 C7.81990109,4.64830078 8.53950926,4.22481445 8.95248903,3.58529883 C10.5400329,4.32079102 11.6411113,5.92565039 11.6411113,7.78737695 C11.6411113,7.84277539 11.6397824,7.89787305 11.6378508,7.95280664 C10.3582094,7.95465234 9.32139662,8.99040625 9.32139662,10.2679746 C9.32139662,10.7413906 9.4639017,11.1815293 9.70827832,11.5482363 C8.94635153,12.0953848 8.01158836,12.4178633 7.00127093,12.4178633 Z M11.6459473,8.94746289 C11.9510962,8.94746289 12.2321197,9.0506582 12.4561658,9.22397656 C12.7696578,9.46647461 12.9715652,9.84632031 12.9715652,10.273375 C12.9715652,11.0056953 12.3780634,11.5993418 11.6459473,11.5993418 C11.4964143,11.5993418 11.3526762,11.574541 11.2185828,11.528877 C10.8907472,11.4172324 10.6206287,11.1807227 10.464917,10.8759902 C10.3725257,10.6951797 10.320398,10.490375 10.320398,10.273375 C10.320398,9.59128516 10.8354138,9.0295625 11.4976062,8.95577539 C11.5463226,8.95034766 11.5957925,8.94746289 11.6459473,8.94746289 Z M7.00557266,6.21029883 C7.91351399,6.21029883 8.64954587,6.94483166 8.64954587,7.85092383 C8.64954587,8.757016 7.91351399,9.49154883 7.00557266,9.49154883 C6.09763132,9.49154883 5.36159944,8.757016 5.36159944,7.85092383 C5.36159944,6.94483166 6.09763132,6.21029883 7.00557266,6.21029883 Z', + id: 'Pick-\u5F62\u72B6', + }), + ), + ), + ), + ), + ), + ), + ), + ); +} + +export default Pick; diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/SearchDropdown.d.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/SearchDropdown.d.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/SearchDropdown.d.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/SearchDropdown.d.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/SearchDropdown.js b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/SearchDropdown.js similarity index 66% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/SearchDropdown.js rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/SearchDropdown.js index 569209e55..74a5b9f9a 100644 --- a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/SearchDropdown.js +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/SearchDropdown.js @@ -66,12 +66,14 @@ function SearchDropdown(props) { height: 18, }), /*#__PURE__*/ React.createElement('path', { - d: 'M15.958,14.99375 L11.41325,10.449 C12.1185,9.53725 12.5,8.4225 12.5,7.25 C12.5,5.8465 11.95225,4.5305 10.96175,3.53825 C9.97125,2.546 8.65175,2 7.25,2 C5.84825,2 4.52875,2.54775 3.53825,3.53825 C2.546,4.52875 2,5.8465 2,7.25 C2,8.65175 2.54775,9.97125 3.53825,10.96175 C4.52875,11.954 5.8465,12.5 7.25,12.5 C8.4225,12.5 9.5355,12.1185 10.44725,11.415 L14.992,15.958 C15.048,16.014 15.139,16.014 15.195,15.958 L15.958,15.19675 C16.014,15.14075 16.014,15.04975 15.958,14.99375 Z M10.022,10.022 C9.28,10.76225 8.2965,11.17 7.25,11.17 C6.2035,11.17 5.22,10.76225 4.478,10.022 C3.73775,9.28 3.33,8.2965 3.33,7.25 C3.33,6.2035 3.73775,5.21825 4.478,4.478 C5.22,3.73775 6.2035,3.33 7.25,3.33 C8.2965,3.33 9.28175,3.736 10.022,4.478 C10.76225,5.22 11.17,6.2035 11.17,7.25 C11.17,8.2965 10.76225,9.28175 10.022,10.022 Z', + d: + 'M15.958,14.99375 L11.41325,10.449 C12.1185,9.53725 12.5,8.4225 12.5,7.25 C12.5,5.8465 11.95225,4.5305 10.96175,3.53825 C9.97125,2.546 8.65175,2 7.25,2 C5.84825,2 4.52875,2.54775 3.53825,3.53825 C2.546,4.52875 2,5.8465 2,7.25 C2,8.65175 2.54775,9.97125 3.53825,10.96175 C4.52875,11.954 5.8465,12.5 7.25,12.5 C8.4225,12.5 9.5355,12.1185 10.44725,11.415 L14.992,15.958 C15.048,16.014 15.139,16.014 15.195,15.958 L15.958,15.19675 C16.014,15.14075 16.014,15.04975 15.958,14.99375 Z M10.022,10.022 C9.28,10.76225 8.2965,11.17 7.25,11.17 C6.2035,11.17 5.22,10.76225 4.478,10.022 C3.73775,9.28 3.33,8.2965 3.33,7.25 C3.33,6.2035 3.73775,5.21825 4.478,4.478 C5.22,3.73775 6.2035,3.33 7.25,3.33 C8.2965,3.33 9.28175,3.736 10.022,4.478 C10.76225,5.22 11.17,6.2035 11.17,7.25 C11.17,8.2965 10.76225,9.28175 10.022,10.022 Z', id: 'SearchDropdown-\u5F62\u72B6', fill: 'currentColor', }), /*#__PURE__*/ React.createElement('path', { - d: 'M17.8616348,7.7578125 L14.0131973,7.7578125 C13.8977676,7.7578125 13.8333145,7.8796875 13.9047988,7.96289062 L15.8290176,10.1941406 C15.8840957,10.2580078 15.9901504,10.2580078 16.0458145,10.1941406 L17.9700332,7.96289062 C18.0415176,7.8796875 17.9770645,7.7578125 17.8616348,7.7578125 Z', + d: + 'M17.8616348,7.7578125 L14.0131973,7.7578125 C13.8977676,7.7578125 13.8333145,7.8796875 13.9047988,7.96289062 L15.8290176,10.1941406 C15.8840957,10.2580078 15.9901504,10.2580078 16.0458145,10.1941406 L17.9700332,7.96289062 C18.0415176,7.8796875 17.9770645,7.7578125 17.8616348,7.7578125 Z', id: 'SearchDropdown-\u8DEF\u5F84', fill: 'currentColor', }), diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/ShapeLine.d.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/ShapeLine.d.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/ShapeLine.d.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/ShapeLine.d.ts diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/ShapeLine.js b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/ShapeLine.js new file mode 100644 index 000000000..6ccd5f7ee --- /dev/null +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/ShapeLine.js @@ -0,0 +1,60 @@ +import * as React from 'react'; + +function ShapeLine(props) { + return /*#__PURE__*/ React.createElement( + 'svg', + Object.assign( + { + width: '1em', + height: '1em', + viewBox: '0 0 16 17', + xmlns: 'http://www.w3.org/2000/svg', + xmlnsXlink: 'http://www.w3.org/1999/xlink', + }, + props, + { + style: Object.assign( + { + verticalAlign: '-0.125em', + }, + props.style, + ), + className: ['nanqu-token-panel-icon', props.className].filter(Boolean).join(' '), + }, + ), + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'ShapeLine-\u9875\u9762-1', + stroke: 'none', + strokeWidth: 1, + fill: 'none', + fillRule: 'evenodd', + }, + /*#__PURE__*/ React.createElement( + 'g', + { + id: 'ShapeLine-shape-line', + transform: 'translate(0.000000, 0.923169)', + fill: 'currentColor', + fillRule: 'nonzero', + }, + /*#__PURE__*/ React.createElement('rect', { + id: 'ShapeLine-\u77E9\u5F62', + opacity: 0, + x: 0, + y: 0, + width: 16, + height: 15.9807923, + }), + /*#__PURE__*/ React.createElement('path', { + d: + 'M5.22,13.3173269 C4.90928357,14.1946577 4.03334945,14.7416208 3.10760502,14.6363783 C2.18186059,14.5311359 1.45139881,13.801551 1.34602985,12.8769179 C1.24066088,11.9522848 1.78828141,11.0774022 2.66666667,10.7670588 L2.66666667,5.21373349 C1.78828141,4.90339007 1.24066088,4.02850749 1.34602985,3.1038744 C1.45139881,2.1792413 2.18186059,1.44965643 3.10760502,1.34441396 C4.03334945,1.23917149 4.90928357,1.78613461 5.22,2.66346539 L10.78,2.66346539 C11.0907164,1.78613461 11.9666505,1.23917149 12.892395,1.34441396 C13.8181394,1.44965643 14.5486012,2.1792413 14.6539702,3.1038744 C14.7593391,4.02850749 14.2117186,4.90339007 13.3333333,5.21373349 L13.3333333,10.7670588 C14.2117186,11.0774022 14.7593391,11.9522848 14.6539702,12.8769179 C14.5486012,13.801551 13.8181394,14.5311359 12.892395,14.6363783 C11.9666505,14.7416208 11.0907164,14.1946577 10.78,13.3173269 L5.22,13.3173269 Z M5.22,11.9855942 L10.78,11.9855942 C10.9819939,11.4165133 11.430235,10.9688103 12,10.7670588 L12,5.21373349 C11.430235,5.01198206 10.9819939,4.56427905 10.78,3.99519808 L5.22,3.99519808 C5.01800608,4.56427905 4.56976496,5.01198206 4,5.21373349 L4,10.7670588 C4.56976496,10.9688103 5.01800608,11.4165133 5.22,11.9855942 Z M3.33333333,3.99519809 C3.5715347,3.9952345 3.79165744,3.86832906 3.91076865,3.66229434 C4.02987987,3.45625961 4.02987987,3.20240385 3.91076865,2.99636913 C3.79165744,2.79033441 3.5715347,2.66342897 3.33333333,2.66346538 C2.96518335,2.66352168 2.66676872,2.96162371 2.66676872,3.32933173 C2.66676872,3.69703976 2.96518335,3.99514178 3.33333333,3.99519809 L3.33333333,3.99519809 Z M12.6666667,3.99519809 C12.904868,3.9952345 13.1249908,3.86832906 13.244102,3.66229434 C13.3632132,3.45625961 13.3632132,3.20240385 13.244102,2.99636913 C13.1249908,2.79033441 12.904868,2.66342897 12.6666667,2.66346538 C12.2985167,2.66352168 12.0001021,2.96162371 12.0001021,3.32933173 C12.0001021,3.69703976 12.2985167,3.99514178 12.6666667,3.99519809 L12.6666667,3.99519809 Z M12.6666667,13.3173269 C12.904868,13.3173633 13.1249908,13.1904579 13.244102,12.9844232 C13.3632132,12.7783885 13.3632132,12.5245327 13.244102,12.318498 C13.1249908,12.1124633 12.904868,11.9855578 12.6666667,11.9855942 C12.2985167,11.9856505 12.0001021,12.2837526 12.0001021,12.6514606 C12.0001021,13.0191686 12.2985167,13.3172706 12.6666667,13.3173269 L12.6666667,13.3173269 Z M3.33333333,13.3173269 C3.5715347,13.3173633 3.79165744,13.1904579 3.91076865,12.9844232 C4.02987987,12.7783885 4.02987987,12.5245327 3.91076865,12.318498 C3.79165744,12.1124633 3.5715347,11.9855578 3.33333333,11.9855942 C2.96518335,11.9856505 2.66676872,12.2837526 2.66676872,12.6514606 C2.66676872,13.0191686 2.96518335,13.3172706 3.33333333,13.3173269 L3.33333333,13.3173269 Z', + id: 'ShapeLine-\u5F62\u72B6', + }), + ), + ), + ); +} + +export default ShapeLine; diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/TokenPanel.d.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/TokenPanel.d.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/TokenPanel.d.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/TokenPanel.d.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/TokenPanel.js b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/TokenPanel.js similarity index 84% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/TokenPanel.js rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/TokenPanel.js index 6b353d10c..996cee0c8 100644 --- a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/TokenPanel.js +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/TokenPanel.js @@ -61,7 +61,8 @@ function TokenPanel(props) { rx: 0.434782594, }), /*#__PURE__*/ React.createElement('path', { - d: 'M12.3540059,0 L19.5652174,0 C19.8053412,8.08981097e-16 20,0.194658804 20,0.434782609 L20,7.6459941 C20,7.88611791 19.8053412,8.08077671 19.5652174,8.08077671 C19.4499059,8.08077671 19.3393172,8.03496939 19.2577797,7.95343183 L12.0465682,0.74222034 C11.876775,0.572427169 11.876775,0.297138048 12.0465682,0.127344878 C12.1281057,0.0458073219 12.2386944,-6.44951433e-16 12.3540059,0 Z', + d: + 'M12.3540059,0 L19.5652174,0 C19.8053412,8.08981097e-16 20,0.194658804 20,0.434782609 L20,7.6459941 C20,7.88611791 19.8053412,8.08077671 19.5652174,8.08077671 C19.4499059,8.08077671 19.3393172,8.03496939 19.2577797,7.95343183 L12.0465682,0.74222034 C11.876775,0.572427169 11.876775,0.297138048 12.0465682,0.127344878 C12.1281057,0.0458073219 12.2386944,-6.44951433e-16 12.3540059,0 Z', id: 'TokenPanel-\u77E9\u5F62', opacity: 0.400000006, }), diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/index.d.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/index.d.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/index.d.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/index.d.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/index.js b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/index.js similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/icons/index.js rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/icons/index.js diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/index.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/index.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/index.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/index.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/interface.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/interface.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/interface.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/interface.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/locale/context.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/locale/context.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/locale/context.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/locale/context.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/locale/en-US.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/locale/en-US.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/locale/en-US.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/locale/fr-FR.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/locale/fr-FR.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/locale/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/locale/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/locale/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/locale/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/locale/interface.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/locale/interface.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/locale/interface.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/locale/interface.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/locale/zh-CN.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/locale/zh-CN.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/meta/TokenRelation.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/meta/TokenRelation.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/meta/TokenRelation.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/meta/TokenRelation.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/meta/category.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/meta/category.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/meta/category.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/meta/category.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/meta/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/meta/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/meta/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/meta/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/meta/interface.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/meta/interface.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/meta/interface.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/meta/interface.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/overviews/Error.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/overviews/Error.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/overviews/Error.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/overviews/Error.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/overviews/Primary.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/overviews/Primary.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/overviews/Primary.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/overviews/Primary.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/overviews/Success.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/overviews/Success.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/overviews/Success.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/overviews/Success.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/overviews/Warning.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/overviews/Warning.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/overviews/Warning.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/overviews/Warning.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/overviews/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/overviews/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/overviews/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/overviews/index.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/previewer.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/previewer.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/previewer.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/previewer.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/AliasPanel.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/AliasPanel.tsx similarity index 98% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/AliasPanel.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/AliasPanel.tsx index fee3f733d..a547969d1 100644 --- a/packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/AliasPanel.tsx +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/AliasPanel.tsx @@ -41,9 +41,10 @@ const useStyle = makeStyle('TokenPanelProAlias', (token) => ({ }, [`.token-panel-pro-alias-collapse${token.rootCls}-collapse`]: { - [`> ${token.rootCls}-collapse-item > ${token.rootCls}-collapse-content > ${token.rootCls}-collapse-content-box`]: { - paddingBlock: '0', - }, + [`> ${token.rootCls}-collapse-item > ${token.rootCls}-collapse-content > ${token.rootCls}-collapse-content-box`]: + { + paddingBlock: '0', + }, [`> ${token.rootCls}-collapse-item`]: { [`> ${token.rootCls}-collapse-header`]: { diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/ComponentDemoPro.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/ComponentDemoPro.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/ComponentDemoPro.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/ComponentDemoPro.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/InputNumberPlus.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/InputNumberPlus.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/InputNumberPlus.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/InputNumberPlus.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenContent.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenContent.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenContent.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenContent.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenDetail.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenDetail.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenDetail.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenDetail.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenPreview.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenPreview.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenPreview.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/TokenPreview.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/calcCustomToken.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/calcCustomToken.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/calcCustomToken.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/calcCustomToken.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/index.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/index.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/index.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/index.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/token-meta.json b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/token-meta.json similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel-pro/token-meta.json rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel-pro/token-meta.json diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel/index.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel/index.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel/index.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel/index.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel/token-card/index.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel/token-card/index.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel/token-card/index.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel/token-card/index.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel/token-item/index.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel/token-item/index.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/token-panel/token-item/index.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/token-panel/token-item/index.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/utils/classifyToken.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/classifyToken.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/utils/classifyToken.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/classifyToken.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/utils/deepUpdateObj.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/deepUpdateObj.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/utils/deepUpdateObj.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/deepUpdateObj.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/utils/getColorBgImg.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/getColorBgImg.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/utils/getColorBgImg.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/getColorBgImg.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/utils/getDesignToken.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/getDesignToken.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/utils/getDesignToken.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/getDesignToken.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/utils/getValueByPath.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/getValueByPath.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/utils/getValueByPath.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/getValueByPath.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/utils/isColor.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/isColor.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/utils/isColor.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/isColor.ts diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/utils/makeStyle.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/makeStyle.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/utils/makeStyle.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/makeStyle.tsx diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/utils/statistic.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/statistic.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/antd-token-previewer/utils/statistic.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/antd-token-previewer/utils/statistic.ts diff --git a/packages/plugins/theme-editor/src/client/components/InitializeTheme.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/InitializeTheme.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/components/InitializeTheme.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/components/InitializeTheme.tsx diff --git a/packages/plugins/theme-editor/src/client/components/ThemeCard.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeCard.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/components/ThemeCard.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeCard.tsx diff --git a/packages/plugins/theme-editor/src/client/components/ThemeEditorProvider.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeEditorProvider.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/components/ThemeEditorProvider.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeEditorProvider.tsx diff --git a/packages/plugins/theme-editor/src/client/components/ThemeList.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeList.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/components/ThemeList.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeList.tsx diff --git a/packages/plugins/theme-editor/src/client/components/ThemeListProvider.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeListProvider.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/components/ThemeListProvider.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ThemeListProvider.tsx diff --git a/packages/plugins/theme-editor/src/client/components/ToEditTheme.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ToEditTheme.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/components/ToEditTheme.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/components/ToEditTheme.tsx diff --git a/packages/plugins/theme-editor/src/client/components/theme-editor/index.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/components/theme-editor/index.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/components/theme-editor/index.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/components/theme-editor/index.tsx diff --git a/packages/plugins/theme-editor/src/client/hooks/useThemeSettings.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useThemeSettings.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/hooks/useThemeSettings.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useThemeSettings.tsx diff --git a/packages/plugins/theme-editor/src/client/hooks/useUpdateThemeSettings.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useUpdateThemeSettings.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/hooks/useUpdateThemeSettings.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useUpdateThemeSettings.tsx diff --git a/packages/plugins/theme-editor/src/client/index.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/index.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/index.tsx diff --git a/packages/plugins/theme-editor/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/client/locale/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/locale/index.ts diff --git a/packages/plugins/theme-editor/src/client/utils/changeAlgorithmFromFunctionToString.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/utils/changeAlgorithmFromFunctionToString.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/utils/changeAlgorithmFromFunctionToString.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/utils/changeAlgorithmFromFunctionToString.tsx diff --git a/packages/plugins/theme-editor/src/client/utils/changeAlgorithmFromStringToFunction.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/utils/changeAlgorithmFromStringToFunction.tsx similarity index 100% rename from packages/plugins/theme-editor/src/client/utils/changeAlgorithmFromStringToFunction.tsx rename to packages/plugins/@nocobase/plugin-theme-editor/src/client/utils/changeAlgorithmFromStringToFunction.tsx diff --git a/packages/samples/ratelimit/src/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/index.ts similarity index 100% rename from packages/samples/ratelimit/src/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/index.ts diff --git a/packages/plugins/theme-editor/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/locale/en-US.ts similarity index 100% rename from packages/plugins/theme-editor/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/locale/en-US.ts diff --git a/packages/plugins/theme-editor/src/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/locale/fr-FR.ts similarity index 100% rename from packages/plugins/theme-editor/src/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/locale/fr-FR.ts diff --git a/packages/plugins/theme-editor/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/theme-editor/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/locale/zh-CN.ts diff --git a/packages/plugins/theme-editor/src/server/builtinThemes.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/server/builtinThemes.ts similarity index 100% rename from packages/plugins/theme-editor/src/server/builtinThemes.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/server/builtinThemes.ts diff --git a/packages/samples/shop-modeling/src/server/repositories/.gitkeep b/packages/plugins/@nocobase/plugin-theme-editor/src/server/collections/.gitkeep similarity index 100% rename from packages/samples/shop-modeling/src/server/repositories/.gitkeep rename to packages/plugins/@nocobase/plugin-theme-editor/src/server/collections/.gitkeep diff --git a/packages/plugins/theme-editor/src/server/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/server/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/server/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/server/index.ts diff --git a/packages/plugins/theme-editor/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/server/plugin.ts similarity index 100% rename from packages/plugins/theme-editor/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/server/plugin.ts diff --git a/packages/plugins/theme-editor/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/swagger/index.ts similarity index 100% rename from packages/plugins/theme-editor/src/swagger/index.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/swagger/index.ts diff --git a/packages/plugins/theme-editor/src/types.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/types.ts similarity index 100% rename from packages/plugins/theme-editor/src/types.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/types.ts diff --git a/packages/samples/ratelimit/.npmignore b/packages/plugins/@nocobase/plugin-ui-routes-storage/.npmignore similarity index 100% rename from packages/samples/ratelimit/.npmignore rename to packages/plugins/@nocobase/plugin-ui-routes-storage/.npmignore diff --git a/packages/plugins/ui-routes-storage/LICENSE b/packages/plugins/@nocobase/plugin-ui-routes-storage/LICENSE similarity index 100% rename from packages/plugins/ui-routes-storage/LICENSE rename to packages/plugins/@nocobase/plugin-ui-routes-storage/LICENSE diff --git a/packages/plugins/ui-routes-storage/README.md b/packages/plugins/@nocobase/plugin-ui-routes-storage/README.md similarity index 100% rename from packages/plugins/ui-routes-storage/README.md rename to packages/plugins/@nocobase/plugin-ui-routes-storage/README.md diff --git a/packages/plugins/ui-routes-storage/README.zh-CN.md b/packages/plugins/@nocobase/plugin-ui-routes-storage/README.zh-CN.md similarity index 100% rename from packages/plugins/ui-routes-storage/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-ui-routes-storage/README.zh-CN.md diff --git a/packages/samples/shop-actions/client.d.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-actions/client.d.ts rename to packages/plugins/@nocobase/plugin-ui-routes-storage/client.d.ts diff --git a/packages/samples/shop-actions/client.js b/packages/plugins/@nocobase/plugin-ui-routes-storage/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-actions/client.js rename to packages/plugins/@nocobase/plugin-ui-routes-storage/client.js diff --git a/packages/plugins/ui-routes-storage/package.json b/packages/plugins/@nocobase/plugin-ui-routes-storage/package.json similarity index 100% rename from packages/plugins/ui-routes-storage/package.json rename to packages/plugins/@nocobase/plugin-ui-routes-storage/package.json diff --git a/packages/samples/shop-actions/server.d.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-actions/server.d.ts rename to packages/plugins/@nocobase/plugin-ui-routes-storage/server.d.ts diff --git a/packages/samples/shop-actions/server.js b/packages/plugins/@nocobase/plugin-ui-routes-storage/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-actions/server.js rename to packages/plugins/@nocobase/plugin-ui-routes-storage/server.js diff --git a/packages/plugins/ui-routes-storage/src/client/index.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/src/client/index.ts similarity index 100% rename from packages/plugins/ui-routes-storage/src/client/index.ts rename to packages/plugins/@nocobase/plugin-ui-routes-storage/src/client/index.ts diff --git a/packages/samples/shop-actions/src/index.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/src/index.ts similarity index 100% rename from packages/samples/shop-actions/src/index.ts rename to packages/plugins/@nocobase/plugin-ui-routes-storage/src/index.ts diff --git a/packages/plugins/ui-routes-storage/src/server/actions/getAccessible.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/actions/getAccessible.ts similarity index 100% rename from packages/plugins/ui-routes-storage/src/server/actions/getAccessible.ts rename to packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/actions/getAccessible.ts diff --git a/packages/plugins/ui-routes-storage/src/server/collections/uiRoutes.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/collections/uiRoutes.ts similarity index 100% rename from packages/plugins/ui-routes-storage/src/server/collections/uiRoutes.ts rename to packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/collections/uiRoutes.ts diff --git a/packages/plugins/ui-routes-storage/src/server/index.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/index.ts similarity index 100% rename from packages/plugins/ui-routes-storage/src/server/index.ts rename to packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/index.ts diff --git a/packages/plugins/ui-routes-storage/src/server/server.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/server.ts similarity index 100% rename from packages/plugins/ui-routes-storage/src/server/server.ts rename to packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/server.ts diff --git a/packages/samples/shop-actions/.npmignore b/packages/plugins/@nocobase/plugin-ui-schema-storage/.npmignore similarity index 100% rename from packages/samples/shop-actions/.npmignore rename to packages/plugins/@nocobase/plugin-ui-schema-storage/.npmignore diff --git a/packages/plugins/ui-schema-storage/LICENSE b/packages/plugins/@nocobase/plugin-ui-schema-storage/LICENSE similarity index 100% rename from packages/plugins/ui-schema-storage/LICENSE rename to packages/plugins/@nocobase/plugin-ui-schema-storage/LICENSE diff --git a/packages/plugins/ui-schema-storage/README.md b/packages/plugins/@nocobase/plugin-ui-schema-storage/README.md similarity index 100% rename from packages/plugins/ui-schema-storage/README.md rename to packages/plugins/@nocobase/plugin-ui-schema-storage/README.md diff --git a/packages/plugins/ui-schema-storage/README.zh-CN.md b/packages/plugins/@nocobase/plugin-ui-schema-storage/README.zh-CN.md similarity index 100% rename from packages/plugins/ui-schema-storage/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-ui-schema-storage/README.zh-CN.md diff --git a/packages/samples/shop-events/client.d.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-events/client.d.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/client.d.ts diff --git a/packages/samples/shop-events/client.js b/packages/plugins/@nocobase/plugin-ui-schema-storage/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-events/client.js rename to packages/plugins/@nocobase/plugin-ui-schema-storage/client.js diff --git a/packages/plugins/ui-schema-storage/package.json b/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json similarity index 83% rename from packages/plugins/ui-schema-storage/package.json rename to packages/plugins/@nocobase/plugin-ui-schema-storage/package.json index ec625022b..733f20a57 100644 --- a/packages/plugins/ui-schema-storage/package.json +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json @@ -2,8 +2,8 @@ "name": "@nocobase/plugin-ui-schema-storage", "displayName": "UI schema storage", "displayName.zh-CN": "UI schema 存储服务", - "description": "用于存储用户动态自定义的 UI schema", - "description.zh-CN": "用于存储用户动态自定义的 UI schema", + "description": "Provides centralized UI schema storage service", + "description.zh-CN": "提供中心化的 UI schema 存储服务", "version": "0.13.0-alpha.10", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/samples/shop-events/server.d.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-events/server.d.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/server.d.ts diff --git a/packages/samples/shop-events/server.js b/packages/plugins/@nocobase/plugin-ui-schema-storage/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-events/server.js rename to packages/plugins/@nocobase/plugin-ui-schema-storage/server.js diff --git a/packages/plugins/ui-schema-storage/src/client/index.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/client/index.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/client/index.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/client/index.ts diff --git a/packages/plugins/ui-schema-storage/src/index.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/index.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/index.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/index.ts diff --git a/packages/plugins/ui-schema-storage/src/server/__tests__/action.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/action.test.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/__tests__/action.test.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/action.test.ts diff --git a/packages/plugins/ui-schema-storage/src/server/__tests__/fixtures/data.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/fixtures/data.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/__tests__/fixtures/data.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/fixtures/data.ts diff --git a/packages/plugins/ui-schema-storage/src/server/__tests__/fixtures/simple-schema.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/fixtures/simple-schema.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/__tests__/fixtures/simple-schema.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/fixtures/simple-schema.ts diff --git a/packages/plugins/ui-schema-storage/src/server/__tests__/migrations/20230330214649-filter-form-block.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/migrations/20230330214649-filter-form-block.test.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/__tests__/migrations/20230330214649-filter-form-block.test.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/migrations/20230330214649-filter-form-block.test.ts diff --git a/packages/plugins/ui-schema-storage/src/server/__tests__/server-hook-impl.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/server-hook-impl.test.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/__tests__/server-hook-impl.test.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/server-hook-impl.test.ts diff --git a/packages/plugins/ui-schema-storage/src/server/__tests__/server-hook.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/server-hook.test.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/__tests__/server-hook.test.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/server-hook.test.ts diff --git a/packages/plugins/ui-schema-storage/src/server/__tests__/ui-schema-model.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-model.test.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/__tests__/ui-schema-model.test.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-model.test.ts diff --git a/packages/plugins/ui-schema-storage/src/server/__tests__/ui-schema-repository-with-cache.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-repository-with-cache.test.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/__tests__/ui-schema-repository-with-cache.test.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-repository-with-cache.test.ts diff --git a/packages/plugins/ui-schema-storage/src/server/__tests__/ui-schema-repository.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-repository.test.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/__tests__/ui-schema-repository.test.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema-repository.test.ts diff --git a/packages/plugins/ui-schema-storage/src/server/__tests__/ui-schema.test.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema.test.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/__tests__/ui-schema.test.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/__tests__/ui-schema.test.ts diff --git a/packages/plugins/ui-schema-storage/src/server/actions/ui-schema-action.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/actions/ui-schema-action.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/actions/ui-schema-action.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/actions/ui-schema-action.ts diff --git a/packages/plugins/ui-schema-storage/src/server/collections/uiSchemaServerHooks.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaServerHooks.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/collections/uiSchemaServerHooks.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaServerHooks.ts diff --git a/packages/plugins/ui-schema-storage/src/server/collections/uiSchemaTemplates.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaTemplates.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/collections/uiSchemaTemplates.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaTemplates.ts diff --git a/packages/plugins/ui-schema-storage/src/server/collections/uiSchemaTreePath.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaTreePath.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/collections/uiSchemaTreePath.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemaTreePath.ts diff --git a/packages/plugins/ui-schema-storage/src/server/collections/uiSchemas.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemas.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/collections/uiSchemas.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/collections/uiSchemas.ts diff --git a/packages/plugins/ui-schema-storage/src/server/dao/ui_schema_dao.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/dao/ui_schema_dao.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/dao/ui_schema_dao.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/dao/ui_schema_dao.ts diff --git a/packages/plugins/ui-schema-storage/src/server/dao/ui_schema_node_dao.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/dao/ui_schema_node_dao.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/dao/ui_schema_node_dao.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/dao/ui_schema_node_dao.ts diff --git a/packages/plugins/ui-schema-storage/src/server/helper.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/helper.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/helper.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/helper.ts diff --git a/packages/plugins/ui-schema-storage/src/server/index.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/index.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/index.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/index.ts diff --git a/packages/plugins/ui-schema-storage/src/server/migrations/20230330214649-filter-form-block.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230330214649-filter-form-block.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/migrations/20230330214649-filter-form-block.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230330214649-filter-form-block.ts diff --git a/packages/plugins/ui-schema-storage/src/server/migrations/20230509221649-association-select.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230509221649-association-select.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/migrations/20230509221649-association-select.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230509221649-association-select.ts diff --git a/packages/plugins/ui-schema-storage/src/server/migrations/20230509235247-record-picker.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230509235247-record-picker.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/migrations/20230509235247-record-picker.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230509235247-record-picker.ts diff --git a/packages/plugins/ui-schema-storage/src/server/migrations/20230510235247-form-field.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230510235247-form-field.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/migrations/20230510235247-form-field.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230510235247-form-field.ts diff --git a/packages/plugins/ui-schema-storage/src/server/migrations/20230522231231-association-field.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230522231231-association-field.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/migrations/20230522231231-association-field.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/migrations/20230522231231-association-field.ts diff --git a/packages/plugins/ui-schema-storage/src/server/model.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/model.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/model.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/model.ts diff --git a/packages/plugins/ui-schema-storage/src/server/repository.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/repository.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/repository.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/repository.ts diff --git a/packages/plugins/ui-schema-storage/src/server/server-hooks/hooks/bind-menu-to-role.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/hooks/bind-menu-to-role.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/server-hooks/hooks/bind-menu-to-role.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/hooks/bind-menu-to-role.ts diff --git a/packages/plugins/ui-schema-storage/src/server/server-hooks/hooks/factory.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/hooks/factory.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/server-hooks/hooks/factory.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/hooks/factory.ts diff --git a/packages/plugins/ui-schema-storage/src/server/server-hooks/hooks/index.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/hooks/index.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/server-hooks/hooks/index.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/hooks/index.ts diff --git a/packages/plugins/ui-schema-storage/src/server/server-hooks/hooks/remove-parents-if-no-children.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/hooks/remove-parents-if-no-children.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/server-hooks/hooks/remove-parents-if-no-children.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/hooks/remove-parents-if-no-children.ts diff --git a/packages/plugins/ui-schema-storage/src/server/server-hooks/hooks/remove-schema.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/hooks/remove-schema.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/server-hooks/hooks/remove-schema.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/hooks/remove-schema.ts diff --git a/packages/plugins/ui-schema-storage/src/server/server-hooks/index.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/index.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/server-hooks/index.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/index.ts diff --git a/packages/plugins/ui-schema-storage/src/server/server-hooks/model.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/model.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/server-hooks/model.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server-hooks/model.ts diff --git a/packages/plugins/ui-schema-storage/src/server/server.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/server/server.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server.ts diff --git a/packages/plugins/ui-schema-storage/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/swagger/index.ts similarity index 100% rename from packages/plugins/ui-schema-storage/src/swagger/index.ts rename to packages/plugins/@nocobase/plugin-ui-schema-storage/src/swagger/index.ts diff --git a/packages/samples/shop-events/.npmignore b/packages/plugins/@nocobase/plugin-users/.npmignore similarity index 100% rename from packages/samples/shop-events/.npmignore rename to packages/plugins/@nocobase/plugin-users/.npmignore diff --git a/packages/plugins/users/LICENSE b/packages/plugins/@nocobase/plugin-users/LICENSE similarity index 100% rename from packages/plugins/users/LICENSE rename to packages/plugins/@nocobase/plugin-users/LICENSE diff --git a/packages/plugins/users/README.md b/packages/plugins/@nocobase/plugin-users/README.md similarity index 100% rename from packages/plugins/users/README.md rename to packages/plugins/@nocobase/plugin-users/README.md diff --git a/packages/plugins/users/README.zh-CN.md b/packages/plugins/@nocobase/plugin-users/README.zh-CN.md similarity index 100% rename from packages/plugins/users/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-users/README.zh-CN.md diff --git a/packages/plugins/users/package.json b/packages/plugins/@nocobase/plugin-users/package.json similarity index 81% rename from packages/plugins/users/package.json rename to packages/plugins/@nocobase/plugin-users/package.json index 7642a3d83..b71f2341d 100644 --- a/packages/plugins/users/package.json +++ b/packages/plugins/@nocobase/plugin-users/package.json @@ -1,8 +1,8 @@ { "name": "@nocobase/plugin-users", - "displayName": "users", + "displayName": "Users", "displayName.zh-CN": "用户", - "description": "Provide a basic user model and a password-based user authentication type, and extended the createdBy and updatedBy field types", + "description": "Provides a basic user model and a password-based user authentication type, and extended the createdBy and updatedBy field types", "description.zh-CN": "提供了基础的用户模型和基于密码的用户认证方式,并拓展了创建人和最后更新人字段类型", "version": "0.13.0-alpha.10", "license": "AGPL-3.0", diff --git a/packages/plugins/users/src/client/index.ts b/packages/plugins/@nocobase/plugin-users/src/client/index.ts similarity index 85% rename from packages/plugins/users/src/client/index.ts rename to packages/plugins/@nocobase/plugin-users/src/client/index.ts index a12116fe9..4847691da 100644 --- a/packages/plugins/users/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-users/src/client/index.ts @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; class UsersPlugin extends Plugin { - async load() { } + async load() {} } export default UsersPlugin; diff --git a/packages/samples/shop-events/src/index.ts b/packages/plugins/@nocobase/plugin-users/src/index.ts similarity index 100% rename from packages/samples/shop-events/src/index.ts rename to packages/plugins/@nocobase/plugin-users/src/index.ts diff --git a/packages/plugins/users/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-users/src/locale/en-US.ts similarity index 100% rename from packages/plugins/users/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-users/src/locale/en-US.ts diff --git a/packages/plugins/users/src/locale/es-ES.ts b/packages/plugins/@nocobase/plugin-users/src/locale/es-ES.ts similarity index 100% rename from packages/plugins/users/src/locale/es-ES.ts rename to packages/plugins/@nocobase/plugin-users/src/locale/es-ES.ts diff --git a/packages/plugins/users/src/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-users/src/locale/fr-FR.ts similarity index 100% rename from packages/plugins/users/src/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-users/src/locale/fr-FR.ts diff --git a/packages/plugins/users/src/locale/ja-JP.ts b/packages/plugins/@nocobase/plugin-users/src/locale/ja-JP.ts similarity index 100% rename from packages/plugins/users/src/locale/ja-JP.ts rename to packages/plugins/@nocobase/plugin-users/src/locale/ja-JP.ts diff --git a/packages/plugins/users/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-users/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/users/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-users/src/locale/pt-BR.ts diff --git a/packages/plugins/users/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-users/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/users/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-users/src/locale/zh-CN.ts diff --git a/packages/plugins/users/src/server/__tests__/actions.test.ts b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/actions.test.ts similarity index 100% rename from packages/plugins/users/src/server/__tests__/actions.test.ts rename to packages/plugins/@nocobase/plugin-users/src/server/__tests__/actions.test.ts diff --git a/packages/plugins/users/src/server/__tests__/fields.test.ts b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/fields.test.ts similarity index 100% rename from packages/plugins/users/src/server/__tests__/fields.test.ts rename to packages/plugins/@nocobase/plugin-users/src/server/__tests__/fields.test.ts diff --git a/packages/plugins/users/src/server/__tests__/utils.ts b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/utils.ts similarity index 100% rename from packages/plugins/users/src/server/__tests__/utils.ts rename to packages/plugins/@nocobase/plugin-users/src/server/__tests__/utils.ts diff --git a/packages/plugins/users/src/server/actions/users.ts b/packages/plugins/@nocobase/plugin-users/src/server/actions/users.ts similarity index 100% rename from packages/plugins/users/src/server/actions/users.ts rename to packages/plugins/@nocobase/plugin-users/src/server/actions/users.ts diff --git a/packages/plugins/users/src/server/authenticators/index.ts b/packages/plugins/@nocobase/plugin-users/src/server/authenticators/index.ts similarity index 100% rename from packages/plugins/users/src/server/authenticators/index.ts rename to packages/plugins/@nocobase/plugin-users/src/server/authenticators/index.ts diff --git a/packages/plugins/users/src/server/authenticators/password.ts b/packages/plugins/@nocobase/plugin-users/src/server/authenticators/password.ts similarity index 100% rename from packages/plugins/users/src/server/authenticators/password.ts rename to packages/plugins/@nocobase/plugin-users/src/server/authenticators/password.ts diff --git a/packages/plugins/users/src/server/collections/users.ts b/packages/plugins/@nocobase/plugin-users/src/server/collections/users.ts similarity index 100% rename from packages/plugins/users/src/server/collections/users.ts rename to packages/plugins/@nocobase/plugin-users/src/server/collections/users.ts diff --git a/packages/plugins/users/src/server/index.ts b/packages/plugins/@nocobase/plugin-users/src/server/index.ts similarity index 100% rename from packages/plugins/users/src/server/index.ts rename to packages/plugins/@nocobase/plugin-users/src/server/index.ts diff --git a/packages/plugins/users/src/server/jwt-service.ts b/packages/plugins/@nocobase/plugin-users/src/server/jwt-service.ts similarity index 100% rename from packages/plugins/users/src/server/jwt-service.ts rename to packages/plugins/@nocobase/plugin-users/src/server/jwt-service.ts diff --git a/packages/plugins/users/src/server/locale/en-US.ts b/packages/plugins/@nocobase/plugin-users/src/server/locale/en-US.ts similarity index 100% rename from packages/plugins/users/src/server/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-users/src/server/locale/en-US.ts diff --git a/packages/plugins/users/src/server/locale/es-ES.ts b/packages/plugins/@nocobase/plugin-users/src/server/locale/es-ES.ts similarity index 100% rename from packages/plugins/users/src/server/locale/es-ES.ts rename to packages/plugins/@nocobase/plugin-users/src/server/locale/es-ES.ts diff --git a/packages/plugins/users/src/server/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-users/src/server/locale/fr-FR.ts similarity index 100% rename from packages/plugins/users/src/server/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-users/src/server/locale/fr-FR.ts diff --git a/packages/plugins/users/src/server/locale/index.ts b/packages/plugins/@nocobase/plugin-users/src/server/locale/index.ts similarity index 100% rename from packages/plugins/users/src/server/locale/index.ts rename to packages/plugins/@nocobase/plugin-users/src/server/locale/index.ts diff --git a/packages/plugins/users/src/server/locale/ja-JP.ts b/packages/plugins/@nocobase/plugin-users/src/server/locale/ja-JP.ts similarity index 100% rename from packages/plugins/users/src/server/locale/ja-JP.ts rename to packages/plugins/@nocobase/plugin-users/src/server/locale/ja-JP.ts diff --git a/packages/plugins/users/src/server/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-users/src/server/locale/pt-BR.ts similarity index 100% rename from packages/plugins/users/src/server/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-users/src/server/locale/pt-BR.ts diff --git a/packages/plugins/users/src/server/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-users/src/server/locale/zh-CN.ts similarity index 100% rename from packages/plugins/users/src/server/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-users/src/server/locale/zh-CN.ts diff --git a/packages/plugins/users/src/server/middlewares/check.ts b/packages/plugins/@nocobase/plugin-users/src/server/middlewares/check.ts similarity index 100% rename from packages/plugins/users/src/server/middlewares/check.ts rename to packages/plugins/@nocobase/plugin-users/src/server/middlewares/check.ts diff --git a/packages/plugins/users/src/server/middlewares/index.ts b/packages/plugins/@nocobase/plugin-users/src/server/middlewares/index.ts similarity index 100% rename from packages/plugins/users/src/server/middlewares/index.ts rename to packages/plugins/@nocobase/plugin-users/src/server/middlewares/index.ts diff --git a/packages/plugins/users/src/server/middlewares/parseToken.ts b/packages/plugins/@nocobase/plugin-users/src/server/middlewares/parseToken.ts similarity index 100% rename from packages/plugins/users/src/server/middlewares/parseToken.ts rename to packages/plugins/@nocobase/plugin-users/src/server/middlewares/parseToken.ts diff --git a/packages/plugins/users/src/server/migrations/20220818072639-add-users-phone.ts b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20220818072639-add-users-phone.ts similarity index 100% rename from packages/plugins/users/src/server/migrations/20220818072639-add-users-phone.ts rename to packages/plugins/@nocobase/plugin-users/src/server/migrations/20220818072639-add-users-phone.ts diff --git a/packages/plugins/users/src/server/migrations/20230802170800-add-username.ts b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802170800-add-username.ts similarity index 100% rename from packages/plugins/users/src/server/migrations/20230802170800-add-username.ts rename to packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802170800-add-username.ts diff --git a/packages/plugins/users/src/server/migrations/20230802183100-update-username.ts b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802183100-update-username.ts similarity index 100% rename from packages/plugins/users/src/server/migrations/20230802183100-update-username.ts rename to packages/plugins/@nocobase/plugin-users/src/server/migrations/20230802183100-update-username.ts diff --git a/packages/plugins/users/src/server/migrations/20230908164036-update-username-interface.ts b/packages/plugins/@nocobase/plugin-users/src/server/migrations/20230908164036-update-username-interface.ts similarity index 100% rename from packages/plugins/users/src/server/migrations/20230908164036-update-username-interface.ts rename to packages/plugins/@nocobase/plugin-users/src/server/migrations/20230908164036-update-username-interface.ts diff --git a/packages/plugins/users/src/server/server.ts b/packages/plugins/@nocobase/plugin-users/src/server/server.ts similarity index 100% rename from packages/plugins/users/src/server/server.ts rename to packages/plugins/@nocobase/plugin-users/src/server/server.ts diff --git a/packages/plugins/users/src/swagger/index.json b/packages/plugins/@nocobase/plugin-users/src/swagger/index.json similarity index 100% rename from packages/plugins/users/src/swagger/index.json rename to packages/plugins/@nocobase/plugin-users/src/swagger/index.json diff --git a/packages/samples/shop-i18n/.npmignore b/packages/plugins/@nocobase/plugin-verification/.npmignore similarity index 100% rename from packages/samples/shop-i18n/.npmignore rename to packages/plugins/@nocobase/plugin-verification/.npmignore diff --git a/packages/plugins/verification/LICENSE b/packages/plugins/@nocobase/plugin-verification/LICENSE similarity index 100% rename from packages/plugins/verification/LICENSE rename to packages/plugins/@nocobase/plugin-verification/LICENSE diff --git a/packages/plugins/verification/README.md b/packages/plugins/@nocobase/plugin-verification/README.md similarity index 100% rename from packages/plugins/verification/README.md rename to packages/plugins/@nocobase/plugin-verification/README.md diff --git a/packages/plugins/verification/README.zh-CN.md b/packages/plugins/@nocobase/plugin-verification/README.zh-CN.md similarity index 100% rename from packages/plugins/verification/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-verification/README.zh-CN.md diff --git a/packages/samples/shop-i18n/client.d.ts b/packages/plugins/@nocobase/plugin-verification/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-i18n/client.d.ts rename to packages/plugins/@nocobase/plugin-verification/client.d.ts diff --git a/packages/samples/shop-i18n/client.js b/packages/plugins/@nocobase/plugin-verification/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-i18n/client.js rename to packages/plugins/@nocobase/plugin-verification/client.js diff --git a/packages/plugins/verification/package.json b/packages/plugins/@nocobase/plugin-verification/package.json similarity index 96% rename from packages/plugins/verification/package.json rename to packages/plugins/@nocobase/plugin-verification/package.json index 1ab7b640b..387002774 100644 --- a/packages/plugins/verification/package.json +++ b/packages/plugins/@nocobase/plugin-verification/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-verification", - "displayName": "verification", + "displayName": "Verification", "displayName.zh-CN": "验证码", "description": "verification setting.", "description.zh-CN": "验证码配置。", diff --git a/packages/samples/shop-i18n/server.d.ts b/packages/plugins/@nocobase/plugin-verification/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-i18n/server.d.ts rename to packages/plugins/@nocobase/plugin-verification/server.d.ts diff --git a/packages/samples/shop-i18n/server.js b/packages/plugins/@nocobase/plugin-verification/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-i18n/server.js rename to packages/plugins/@nocobase/plugin-verification/server.js diff --git a/packages/plugins/verification/src/client/ProviderOptions.tsx b/packages/plugins/@nocobase/plugin-verification/src/client/ProviderOptions.tsx similarity index 100% rename from packages/plugins/verification/src/client/ProviderOptions.tsx rename to packages/plugins/@nocobase/plugin-verification/src/client/ProviderOptions.tsx diff --git a/packages/plugins/verification/src/client/VerificationProvider.tsx b/packages/plugins/@nocobase/plugin-verification/src/client/VerificationProvider.tsx similarity index 100% rename from packages/plugins/verification/src/client/VerificationProvider.tsx rename to packages/plugins/@nocobase/plugin-verification/src/client/VerificationProvider.tsx diff --git a/packages/plugins/verification/src/client/VerificationProviders.tsx b/packages/plugins/@nocobase/plugin-verification/src/client/VerificationProviders.tsx similarity index 100% rename from packages/plugins/verification/src/client/VerificationProviders.tsx rename to packages/plugins/@nocobase/plugin-verification/src/client/VerificationProviders.tsx diff --git a/packages/plugins/verification/src/client/index.tsx b/packages/plugins/@nocobase/plugin-verification/src/client/index.tsx similarity index 100% rename from packages/plugins/verification/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-verification/src/client/index.tsx diff --git a/packages/plugins/verification/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-verification/src/client/locale/index.ts similarity index 100% rename from packages/plugins/verification/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-verification/src/client/locale/index.ts diff --git a/packages/plugins/verification/src/client/providerTypes/index.ts b/packages/plugins/@nocobase/plugin-verification/src/client/providerTypes/index.ts similarity index 100% rename from packages/plugins/verification/src/client/providerTypes/index.ts rename to packages/plugins/@nocobase/plugin-verification/src/client/providerTypes/index.ts diff --git a/packages/plugins/verification/src/client/providerTypes/sms-aliyun.ts b/packages/plugins/@nocobase/plugin-verification/src/client/providerTypes/sms-aliyun.ts similarity index 100% rename from packages/plugins/verification/src/client/providerTypes/sms-aliyun.ts rename to packages/plugins/@nocobase/plugin-verification/src/client/providerTypes/sms-aliyun.ts diff --git a/packages/plugins/verification/src/client/providerTypes/sms-tencent.ts b/packages/plugins/@nocobase/plugin-verification/src/client/providerTypes/sms-tencent.ts similarity index 100% rename from packages/plugins/verification/src/client/providerTypes/sms-tencent.ts rename to packages/plugins/@nocobase/plugin-verification/src/client/providerTypes/sms-tencent.ts diff --git a/packages/plugins/verification/src/client/schemas/providers.ts b/packages/plugins/@nocobase/plugin-verification/src/client/schemas/providers.ts similarity index 100% rename from packages/plugins/verification/src/client/schemas/providers.ts rename to packages/plugins/@nocobase/plugin-verification/src/client/schemas/providers.ts diff --git a/packages/samples/shop-i18n/src/index.ts b/packages/plugins/@nocobase/plugin-verification/src/index.ts similarity index 100% rename from packages/samples/shop-i18n/src/index.ts rename to packages/plugins/@nocobase/plugin-verification/src/index.ts diff --git a/packages/plugins/verification/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-verification/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/verification/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-verification/src/locale/pt-BR.ts diff --git a/packages/plugins/verification/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-verification/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/verification/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-verification/src/locale/zh-CN.ts diff --git a/packages/plugins/verification/src/server/Plugin.ts b/packages/plugins/@nocobase/plugin-verification/src/server/Plugin.ts similarity index 100% rename from packages/plugins/verification/src/server/Plugin.ts rename to packages/plugins/@nocobase/plugin-verification/src/server/Plugin.ts diff --git a/packages/plugins/verification/src/server/__tests__/Plugin.test.ts b/packages/plugins/@nocobase/plugin-verification/src/server/__tests__/Plugin.test.ts similarity index 100% rename from packages/plugins/verification/src/server/__tests__/Plugin.test.ts rename to packages/plugins/@nocobase/plugin-verification/src/server/__tests__/Plugin.test.ts diff --git a/packages/plugins/verification/src/server/__tests__/collections/authors.ts b/packages/plugins/@nocobase/plugin-verification/src/server/__tests__/collections/authors.ts similarity index 100% rename from packages/plugins/verification/src/server/__tests__/collections/authors.ts rename to packages/plugins/@nocobase/plugin-verification/src/server/__tests__/collections/authors.ts diff --git a/packages/plugins/verification/src/server/__tests__/index.ts b/packages/plugins/@nocobase/plugin-verification/src/server/__tests__/index.ts similarity index 100% rename from packages/plugins/verification/src/server/__tests__/index.ts rename to packages/plugins/@nocobase/plugin-verification/src/server/__tests__/index.ts diff --git a/packages/plugins/verification/src/server/actions/index.ts b/packages/plugins/@nocobase/plugin-verification/src/server/actions/index.ts similarity index 100% rename from packages/plugins/verification/src/server/actions/index.ts rename to packages/plugins/@nocobase/plugin-verification/src/server/actions/index.ts diff --git a/packages/plugins/verification/src/server/actions/verifications.ts b/packages/plugins/@nocobase/plugin-verification/src/server/actions/verifications.ts similarity index 100% rename from packages/plugins/verification/src/server/actions/verifications.ts rename to packages/plugins/@nocobase/plugin-verification/src/server/actions/verifications.ts diff --git a/packages/plugins/verification/src/server/collections/verifications.ts b/packages/plugins/@nocobase/plugin-verification/src/server/collections/verifications.ts similarity index 100% rename from packages/plugins/verification/src/server/collections/verifications.ts rename to packages/plugins/@nocobase/plugin-verification/src/server/collections/verifications.ts diff --git a/packages/plugins/verification/src/server/collections/verifications_providers.ts b/packages/plugins/@nocobase/plugin-verification/src/server/collections/verifications_providers.ts similarity index 100% rename from packages/plugins/verification/src/server/collections/verifications_providers.ts rename to packages/plugins/@nocobase/plugin-verification/src/server/collections/verifications_providers.ts diff --git a/packages/plugins/verification/src/server/constants.ts b/packages/plugins/@nocobase/plugin-verification/src/server/constants.ts similarity index 100% rename from packages/plugins/verification/src/server/constants.ts rename to packages/plugins/@nocobase/plugin-verification/src/server/constants.ts diff --git a/packages/plugins/verification/src/server/index.ts b/packages/plugins/@nocobase/plugin-verification/src/server/index.ts similarity index 100% rename from packages/plugins/verification/src/server/index.ts rename to packages/plugins/@nocobase/plugin-verification/src/server/index.ts diff --git a/packages/plugins/verification/src/server/locale/index.ts b/packages/plugins/@nocobase/plugin-verification/src/server/locale/index.ts similarity index 100% rename from packages/plugins/verification/src/server/locale/index.ts rename to packages/plugins/@nocobase/plugin-verification/src/server/locale/index.ts diff --git a/packages/plugins/verification/src/server/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-verification/src/server/locale/zh-CN.ts similarity index 100% rename from packages/plugins/verification/src/server/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-verification/src/server/locale/zh-CN.ts diff --git a/packages/plugins/verification/src/server/providers/index.ts b/packages/plugins/@nocobase/plugin-verification/src/server/providers/index.ts similarity index 100% rename from packages/plugins/verification/src/server/providers/index.ts rename to packages/plugins/@nocobase/plugin-verification/src/server/providers/index.ts diff --git a/packages/plugins/verification/src/server/providers/sms-aliyun.ts b/packages/plugins/@nocobase/plugin-verification/src/server/providers/sms-aliyun.ts similarity index 100% rename from packages/plugins/verification/src/server/providers/sms-aliyun.ts rename to packages/plugins/@nocobase/plugin-verification/src/server/providers/sms-aliyun.ts diff --git a/packages/plugins/verification/src/server/providers/sms-tencent.ts b/packages/plugins/@nocobase/plugin-verification/src/server/providers/sms-tencent.ts similarity index 100% rename from packages/plugins/verification/src/server/providers/sms-tencent.ts rename to packages/plugins/@nocobase/plugin-verification/src/server/providers/sms-tencent.ts diff --git a/packages/plugins/verification/src/swagger/index.json b/packages/plugins/@nocobase/plugin-verification/src/swagger/index.json similarity index 100% rename from packages/plugins/verification/src/swagger/index.json rename to packages/plugins/@nocobase/plugin-verification/src/swagger/index.json diff --git a/packages/samples/shop-modeling/.npmignore b/packages/plugins/@nocobase/plugin-workflow/.npmignore similarity index 100% rename from packages/samples/shop-modeling/.npmignore rename to packages/plugins/@nocobase/plugin-workflow/.npmignore diff --git a/packages/plugins/workflow/LICENSE b/packages/plugins/@nocobase/plugin-workflow/LICENSE similarity index 100% rename from packages/plugins/workflow/LICENSE rename to packages/plugins/@nocobase/plugin-workflow/LICENSE diff --git a/packages/plugins/workflow/README.md b/packages/plugins/@nocobase/plugin-workflow/README.md similarity index 100% rename from packages/plugins/workflow/README.md rename to packages/plugins/@nocobase/plugin-workflow/README.md diff --git a/packages/plugins/workflow/README.zh-CN.md b/packages/plugins/@nocobase/plugin-workflow/README.zh-CN.md similarity index 100% rename from packages/plugins/workflow/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-workflow/README.zh-CN.md diff --git a/packages/samples/shop-modeling/client.d.ts b/packages/plugins/@nocobase/plugin-workflow/client.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-modeling/client.d.ts rename to packages/plugins/@nocobase/plugin-workflow/client.d.ts diff --git a/packages/samples/shop-modeling/client.js b/packages/plugins/@nocobase/plugin-workflow/client.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-modeling/client.js rename to packages/plugins/@nocobase/plugin-workflow/client.js diff --git a/packages/plugins/workflow/package.json b/packages/plugins/@nocobase/plugin-workflow/package.json similarity index 100% rename from packages/plugins/workflow/package.json rename to packages/plugins/@nocobase/plugin-workflow/package.json diff --git a/packages/samples/shop-modeling/server.d.ts b/packages/plugins/@nocobase/plugin-workflow/server.d.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-modeling/server.d.ts rename to packages/plugins/@nocobase/plugin-workflow/server.d.ts diff --git a/packages/samples/shop-modeling/server.js b/packages/plugins/@nocobase/plugin-workflow/server.js old mode 100755 new mode 100644 similarity index 100% rename from packages/samples/shop-modeling/server.js rename to packages/plugins/@nocobase/plugin-workflow/server.js diff --git a/packages/plugins/workflow/src/client/AddButton.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/AddButton.tsx similarity index 100% rename from packages/plugins/workflow/src/client/AddButton.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/AddButton.tsx diff --git a/packages/plugins/workflow/src/client/Branch.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/Branch.tsx similarity index 100% rename from packages/plugins/workflow/src/client/Branch.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/Branch.tsx diff --git a/packages/plugins/workflow/src/client/CanvasContent.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/CanvasContent.tsx similarity index 100% rename from packages/plugins/workflow/src/client/CanvasContent.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/CanvasContent.tsx diff --git a/packages/plugins/workflow/src/client/ExecutionCanvas.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/ExecutionCanvas.tsx similarity index 100% rename from packages/plugins/workflow/src/client/ExecutionCanvas.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/ExecutionCanvas.tsx diff --git a/packages/plugins/workflow/src/client/ExecutionLink.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/ExecutionLink.tsx similarity index 100% rename from packages/plugins/workflow/src/client/ExecutionLink.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/ExecutionLink.tsx diff --git a/packages/plugins/workflow/src/client/ExecutionPage.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/ExecutionPage.tsx similarity index 100% rename from packages/plugins/workflow/src/client/ExecutionPage.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/ExecutionPage.tsx diff --git a/packages/plugins/workflow/src/client/ExecutionResourceProvider.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/ExecutionResourceProvider.tsx similarity index 100% rename from packages/plugins/workflow/src/client/ExecutionResourceProvider.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/ExecutionResourceProvider.tsx diff --git a/packages/plugins/workflow/src/client/FlowContext.ts b/packages/plugins/@nocobase/plugin-workflow/src/client/FlowContext.ts similarity index 100% rename from packages/plugins/workflow/src/client/FlowContext.ts rename to packages/plugins/@nocobase/plugin-workflow/src/client/FlowContext.ts diff --git a/packages/plugins/workflow/src/client/WorkflowCanvas.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowCanvas.tsx similarity index 100% rename from packages/plugins/workflow/src/client/WorkflowCanvas.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowCanvas.tsx diff --git a/packages/plugins/workflow/src/client/WorkflowLink.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowLink.tsx similarity index 100% rename from packages/plugins/workflow/src/client/WorkflowLink.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowLink.tsx diff --git a/packages/plugins/workflow/src/client/WorkflowPage.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowPage.tsx similarity index 100% rename from packages/plugins/workflow/src/client/WorkflowPage.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowPage.tsx diff --git a/packages/plugins/workflow/src/client/WorkflowProvider.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowProvider.tsx similarity index 100% rename from packages/plugins/workflow/src/client/WorkflowProvider.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowProvider.tsx diff --git a/packages/plugins/workflow/src/client/components/CollectionBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/components/CollectionBlockInitializer.tsx similarity index 100% rename from packages/plugins/workflow/src/client/components/CollectionBlockInitializer.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/components/CollectionBlockInitializer.tsx diff --git a/packages/plugins/workflow/src/client/components/CollectionFieldset.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/components/CollectionFieldset.tsx similarity index 100% rename from packages/plugins/workflow/src/client/components/CollectionFieldset.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/components/CollectionFieldset.tsx diff --git a/packages/plugins/workflow/src/client/components/DrawerDescription.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/components/DrawerDescription.tsx similarity index 100% rename from packages/plugins/workflow/src/client/components/DrawerDescription.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/components/DrawerDescription.tsx diff --git a/packages/plugins/workflow/src/client/components/Duration.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/components/Duration.tsx similarity index 100% rename from packages/plugins/workflow/src/client/components/Duration.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/components/Duration.tsx diff --git a/packages/plugins/workflow/src/client/components/DynamicExpression.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/components/DynamicExpression.tsx similarity index 100% rename from packages/plugins/workflow/src/client/components/DynamicExpression.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/components/DynamicExpression.tsx diff --git a/packages/plugins/workflow/src/client/components/ExecutionStatusSelect.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/components/ExecutionStatusSelect.tsx similarity index 100% rename from packages/plugins/workflow/src/client/components/ExecutionStatusSelect.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/components/ExecutionStatusSelect.tsx diff --git a/packages/plugins/workflow/src/client/components/FieldsSelect.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/components/FieldsSelect.tsx similarity index 100% rename from packages/plugins/workflow/src/client/components/FieldsSelect.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/components/FieldsSelect.tsx diff --git a/packages/plugins/workflow/src/client/components/FilterDynamicComponent.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/components/FilterDynamicComponent.tsx similarity index 100% rename from packages/plugins/workflow/src/client/components/FilterDynamicComponent.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/components/FilterDynamicComponent.tsx diff --git a/packages/plugins/workflow/src/client/components/NullRender.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/components/NullRender.tsx similarity index 100% rename from packages/plugins/workflow/src/client/components/NullRender.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/components/NullRender.tsx diff --git a/packages/plugins/workflow/src/client/components/OpenDrawer.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/components/OpenDrawer.tsx similarity index 100% rename from packages/plugins/workflow/src/client/components/OpenDrawer.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/components/OpenDrawer.tsx diff --git a/packages/plugins/workflow/src/client/components/RadioWithTooltip.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/components/RadioWithTooltip.tsx similarity index 100% rename from packages/plugins/workflow/src/client/components/RadioWithTooltip.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/components/RadioWithTooltip.tsx diff --git a/packages/plugins/workflow/src/client/components/StatusButton.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/components/StatusButton.tsx similarity index 100% rename from packages/plugins/workflow/src/client/components/StatusButton.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/components/StatusButton.tsx diff --git a/packages/plugins/workflow/src/client/components/ValueBlock.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/components/ValueBlock.tsx similarity index 100% rename from packages/plugins/workflow/src/client/components/ValueBlock.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/components/ValueBlock.tsx diff --git a/packages/plugins/workflow/src/client/components/renderEngineReference.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/components/renderEngineReference.tsx similarity index 100% rename from packages/plugins/workflow/src/client/components/renderEngineReference.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/components/renderEngineReference.tsx diff --git a/packages/plugins/workflow/src/client/constants.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/constants.tsx similarity index 100% rename from packages/plugins/workflow/src/client/constants.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/constants.tsx diff --git a/packages/plugins/workflow/src/client/index.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/index.tsx similarity index 100% rename from packages/plugins/workflow/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/index.tsx diff --git a/packages/plugins/workflow/src/client/interfaces/expression.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/interfaces/expression.tsx similarity index 100% rename from packages/plugins/workflow/src/client/interfaces/expression.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/interfaces/expression.tsx diff --git a/packages/plugins/workflow/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-workflow/src/client/locale/index.ts similarity index 100% rename from packages/plugins/workflow/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-workflow/src/client/locale/index.ts diff --git a/packages/plugins/workflow/src/client/nodes/aggregate.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/aggregate.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/aggregate.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/aggregate.tsx diff --git a/packages/plugins/workflow/src/client/nodes/calculation.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/calculation.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/calculation.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/calculation.tsx diff --git a/packages/plugins/workflow/src/client/nodes/condition.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/condition.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/condition.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/condition.tsx diff --git a/packages/plugins/workflow/src/client/nodes/create.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/create.tsx similarity index 94% rename from packages/plugins/workflow/src/client/nodes/create.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/create.tsx index f275a7ccb..7a9508601 100644 --- a/packages/plugins/workflow/src/client/nodes/create.tsx +++ b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/create.tsx @@ -1,4 +1,9 @@ -import { SchemaInitializerItemOptions, useCollectionDataSource, useCollectionManager, useCompile } from '@nocobase/client'; +import { + SchemaInitializerItemOptions, + useCollectionDataSource, + useCollectionManager, + useCompile, +} from '@nocobase/client'; import { appends, collection, values } from '../schemas/collection'; import CollectionFieldset from '../components/CollectionFieldset'; diff --git a/packages/plugins/workflow/src/client/nodes/delay.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/delay.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/delay.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/delay.tsx diff --git a/packages/plugins/workflow/src/client/nodes/destroy.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/destroy.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/destroy.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/destroy.tsx diff --git a/packages/plugins/workflow/src/client/nodes/index.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/index.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/index.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/index.tsx diff --git a/packages/plugins/workflow/src/client/nodes/loop.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/loop.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/loop.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/loop.tsx diff --git a/packages/plugins/workflow/src/client/nodes/manual/AssigneesSelect.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/AssigneesSelect.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/manual/AssigneesSelect.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/AssigneesSelect.tsx diff --git a/packages/plugins/workflow/src/client/nodes/manual/DetailsBlockProvider.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/DetailsBlockProvider.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/manual/DetailsBlockProvider.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/DetailsBlockProvider.tsx diff --git a/packages/plugins/workflow/src/client/nodes/manual/FormBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/FormBlockInitializer.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/manual/FormBlockInitializer.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/FormBlockInitializer.tsx diff --git a/packages/plugins/workflow/src/client/nodes/manual/FormBlockProvider.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/FormBlockProvider.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/manual/FormBlockProvider.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/FormBlockProvider.tsx diff --git a/packages/plugins/workflow/src/client/nodes/manual/ModeConfig.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/ModeConfig.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/manual/ModeConfig.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/ModeConfig.tsx diff --git a/packages/plugins/workflow/src/client/nodes/manual/SchemaConfig.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/SchemaConfig.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/manual/SchemaConfig.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/SchemaConfig.tsx diff --git a/packages/plugins/workflow/src/client/nodes/manual/WorkflowTodo.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/WorkflowTodo.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/manual/WorkflowTodo.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/WorkflowTodo.tsx diff --git a/packages/plugins/workflow/src/client/nodes/manual/WorkflowTodoBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/WorkflowTodoBlockInitializer.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/manual/WorkflowTodoBlockInitializer.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/WorkflowTodoBlockInitializer.tsx diff --git a/packages/plugins/workflow/src/client/nodes/manual/forms/create.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/forms/create.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/manual/forms/create.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/forms/create.tsx diff --git a/packages/plugins/workflow/src/client/nodes/manual/forms/custom.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/forms/custom.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/manual/forms/custom.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/forms/custom.tsx diff --git a/packages/plugins/workflow/src/client/nodes/manual/forms/update.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/forms/update.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/manual/forms/update.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/forms/update.tsx diff --git a/packages/plugins/workflow/src/client/nodes/manual/index.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/index.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/manual/index.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/index.tsx diff --git a/packages/plugins/workflow/src/client/nodes/manual/utils.ts b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/utils.ts similarity index 100% rename from packages/plugins/workflow/src/client/nodes/manual/utils.ts rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/manual/utils.ts diff --git a/packages/plugins/workflow/src/client/nodes/parallel.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/parallel.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/parallel.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/parallel.tsx diff --git a/packages/plugins/workflow/src/client/nodes/query.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/query.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/query.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/query.tsx diff --git a/packages/plugins/workflow/src/client/nodes/request.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/request.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/request.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/request.tsx diff --git a/packages/plugins/workflow/src/client/nodes/sql.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/sql.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/sql.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/sql.tsx diff --git a/packages/plugins/workflow/src/client/nodes/update.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/update.tsx similarity index 100% rename from packages/plugins/workflow/src/client/nodes/update.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/nodes/update.tsx diff --git a/packages/plugins/workflow/src/client/schemas/collection.ts b/packages/plugins/@nocobase/plugin-workflow/src/client/schemas/collection.ts similarity index 100% rename from packages/plugins/workflow/src/client/schemas/collection.ts rename to packages/plugins/@nocobase/plugin-workflow/src/client/schemas/collection.ts diff --git a/packages/plugins/workflow/src/client/schemas/executions.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/schemas/executions.tsx similarity index 100% rename from packages/plugins/workflow/src/client/schemas/executions.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/schemas/executions.tsx diff --git a/packages/plugins/workflow/src/client/schemas/workflows.ts b/packages/plugins/@nocobase/plugin-workflow/src/client/schemas/workflows.ts similarity index 100% rename from packages/plugins/workflow/src/client/schemas/workflows.ts rename to packages/plugins/@nocobase/plugin-workflow/src/client/schemas/workflows.ts diff --git a/packages/plugins/workflow/src/client/style.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/style.tsx similarity index 100% rename from packages/plugins/workflow/src/client/style.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/style.tsx diff --git a/packages/plugins/workflow/src/client/triggers/collection.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/triggers/collection.tsx similarity index 100% rename from packages/plugins/workflow/src/client/triggers/collection.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/triggers/collection.tsx diff --git a/packages/plugins/workflow/src/client/triggers/form.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/triggers/form.tsx similarity index 100% rename from packages/plugins/workflow/src/client/triggers/form.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/triggers/form.tsx diff --git a/packages/plugins/workflow/src/client/triggers/index.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/triggers/index.tsx similarity index 100% rename from packages/plugins/workflow/src/client/triggers/index.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/triggers/index.tsx diff --git a/packages/plugins/workflow/src/client/triggers/schedule/EndsByField.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/triggers/schedule/EndsByField.tsx similarity index 100% rename from packages/plugins/workflow/src/client/triggers/schedule/EndsByField.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/triggers/schedule/EndsByField.tsx diff --git a/packages/plugins/workflow/src/client/triggers/schedule/OnField.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/triggers/schedule/OnField.tsx similarity index 100% rename from packages/plugins/workflow/src/client/triggers/schedule/OnField.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/triggers/schedule/OnField.tsx diff --git a/packages/plugins/workflow/src/client/triggers/schedule/RepeatField.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/triggers/schedule/RepeatField.tsx similarity index 100% rename from packages/plugins/workflow/src/client/triggers/schedule/RepeatField.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/triggers/schedule/RepeatField.tsx diff --git a/packages/plugins/workflow/src/client/triggers/schedule/ScheduleConfig.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/triggers/schedule/ScheduleConfig.tsx similarity index 100% rename from packages/plugins/workflow/src/client/triggers/schedule/ScheduleConfig.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/triggers/schedule/ScheduleConfig.tsx diff --git a/packages/plugins/workflow/src/client/triggers/schedule/constants.ts b/packages/plugins/@nocobase/plugin-workflow/src/client/triggers/schedule/constants.ts similarity index 100% rename from packages/plugins/workflow/src/client/triggers/schedule/constants.ts rename to packages/plugins/@nocobase/plugin-workflow/src/client/triggers/schedule/constants.ts diff --git a/packages/plugins/workflow/src/client/triggers/schedule/index.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/triggers/schedule/index.tsx similarity index 100% rename from packages/plugins/workflow/src/client/triggers/schedule/index.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/triggers/schedule/index.tsx diff --git a/packages/plugins/workflow/src/client/triggers/schedule/locale/Cron.zh-CN.ts b/packages/plugins/@nocobase/plugin-workflow/src/client/triggers/schedule/locale/Cron.zh-CN.ts similarity index 100% rename from packages/plugins/workflow/src/client/triggers/schedule/locale/Cron.zh-CN.ts rename to packages/plugins/@nocobase/plugin-workflow/src/client/triggers/schedule/locale/Cron.zh-CN.ts diff --git a/packages/plugins/workflow/src/client/utils.ts b/packages/plugins/@nocobase/plugin-workflow/src/client/utils.ts similarity index 100% rename from packages/plugins/workflow/src/client/utils.ts rename to packages/plugins/@nocobase/plugin-workflow/src/client/utils.ts diff --git a/packages/plugins/workflow/src/client/variable.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/variable.tsx similarity index 100% rename from packages/plugins/workflow/src/client/variable.tsx rename to packages/plugins/@nocobase/plugin-workflow/src/client/variable.tsx diff --git a/packages/samples/shop-modeling/src/index.ts b/packages/plugins/@nocobase/plugin-workflow/src/index.ts similarity index 100% rename from packages/samples/shop-modeling/src/index.ts rename to packages/plugins/@nocobase/plugin-workflow/src/index.ts diff --git a/packages/plugins/workflow/src/locale/en-US.ts b/packages/plugins/@nocobase/plugin-workflow/src/locale/en-US.ts similarity index 100% rename from packages/plugins/workflow/src/locale/en-US.ts rename to packages/plugins/@nocobase/plugin-workflow/src/locale/en-US.ts diff --git a/packages/plugins/workflow/src/locale/es-ES.ts b/packages/plugins/@nocobase/plugin-workflow/src/locale/es-ES.ts similarity index 100% rename from packages/plugins/workflow/src/locale/es-ES.ts rename to packages/plugins/@nocobase/plugin-workflow/src/locale/es-ES.ts diff --git a/packages/plugins/workflow/src/locale/fr-FR.ts b/packages/plugins/@nocobase/plugin-workflow/src/locale/fr-FR.ts similarity index 100% rename from packages/plugins/workflow/src/locale/fr-FR.ts rename to packages/plugins/@nocobase/plugin-workflow/src/locale/fr-FR.ts diff --git a/packages/plugins/workflow/src/locale/ja-JP.ts b/packages/plugins/@nocobase/plugin-workflow/src/locale/ja-JP.ts similarity index 100% rename from packages/plugins/workflow/src/locale/ja-JP.ts rename to packages/plugins/@nocobase/plugin-workflow/src/locale/ja-JP.ts diff --git a/packages/plugins/workflow/src/locale/pt-BR.ts b/packages/plugins/@nocobase/plugin-workflow/src/locale/pt-BR.ts similarity index 100% rename from packages/plugins/workflow/src/locale/pt-BR.ts rename to packages/plugins/@nocobase/plugin-workflow/src/locale/pt-BR.ts diff --git a/packages/plugins/workflow/src/locale/ru-RU.ts b/packages/plugins/@nocobase/plugin-workflow/src/locale/ru-RU.ts similarity index 100% rename from packages/plugins/workflow/src/locale/ru-RU.ts rename to packages/plugins/@nocobase/plugin-workflow/src/locale/ru-RU.ts diff --git a/packages/plugins/workflow/src/locale/tr-TR.ts b/packages/plugins/@nocobase/plugin-workflow/src/locale/tr-TR.ts similarity index 100% rename from packages/plugins/workflow/src/locale/tr-TR.ts rename to packages/plugins/@nocobase/plugin-workflow/src/locale/tr-TR.ts diff --git a/packages/plugins/workflow/src/locale/zh-CN.ts b/packages/plugins/@nocobase/plugin-workflow/src/locale/zh-CN.ts similarity index 100% rename from packages/plugins/workflow/src/locale/zh-CN.ts rename to packages/plugins/@nocobase/plugin-workflow/src/locale/zh-CN.ts diff --git a/packages/plugins/workflow/src/server/Plugin.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/Plugin.ts similarity index 88% rename from packages/plugins/workflow/src/server/Plugin.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/Plugin.ts index 17ede22db..64bebb7ac 100644 --- a/packages/plugins/workflow/src/server/Plugin.ts +++ b/packages/plugins/@nocobase/plugin-workflow/src/server/Plugin.ts @@ -25,7 +25,9 @@ export default class WorkflowPlugin extends Plugin { instructions: Registry = new Registry(); triggers: Registry = new Registry(); functions: Registry = new Registry(); - private executing = false; + + private ready = false; + private executing: Promise | null = null; private pending: Pending[] = []; private events: [WorkflowModel, any, { context?: any }][] = []; @@ -142,7 +144,7 @@ export default class WorkflowPlugin extends Plugin { }); this.db.addMigrations({ - namespace: 'workflow', + namespace: this.name, directory: path.resolve(__dirname, 'migrations'), context: { plugin: this, @@ -170,6 +172,7 @@ export default class WorkflowPlugin extends Plugin { this.app.on('afterStart', () => { this.app.setMaintainingMessage('check for not started executions'); + this.ready = true; // check for not started executions this.dispatch(); }); @@ -183,6 +186,12 @@ export default class WorkflowPlugin extends Plugin { workflows.forEach((workflow: WorkflowModel) => { this.toggle(workflow, false); }); + + this.ready = false; + await this.prepare(); + if (this.executing) { + await this.executing; + } }); } @@ -203,7 +212,7 @@ export default class WorkflowPlugin extends Plugin { public trigger(workflow: WorkflowModel, context: object, options: { context?: any } = {}): void { // `null` means not to trigger - if (context == null) { + if (!this.ready || context == null) { return; } @@ -304,40 +313,40 @@ export default class WorkflowPlugin extends Plugin { } }; - private async dispatch() { - if (this.executing) { + private dispatch() { + if (!this.ready || this.executing) { return; } - this.executing = true; - - let next: Pending | null = null; - // resuming has high priority - if (this.pending.length) { - next = this.pending.shift() as Pending; - this.getLogger(next[0].workflowId).info(`pending execution (${next[0].id}) ready to process`); - } else { - const execution = (await this.db.getRepository('executions').findOne({ - filter: { - status: EXECUTION_STATUS.QUEUEING, - }, - appends: ['workflow'], - sort: 'createdAt', - })) as ExecutionModel; - if (execution && execution.workflow.enabled) { - this.getLogger(execution.workflowId).info(`execution (${execution.id}) fetched from db`); - next = [execution]; + this.executing = (async () => { + let next: Pending | null = null; + // resuming has high priority + if (this.pending.length) { + next = this.pending.shift() as Pending; + this.getLogger(next[0].workflowId).info(`pending execution (${next[0].id}) ready to process`); + } else { + const execution = (await this.db.getRepository('executions').findOne({ + filter: { + status: EXECUTION_STATUS.QUEUEING, + }, + appends: ['workflow'], + sort: 'createdAt', + })) as ExecutionModel; + if (execution && execution.workflow.enabled) { + this.getLogger(execution.workflowId).info(`execution (${execution.id}) fetched from db`); + next = [execution]; + } + } + if (next) { + await this.process(...next); } - } - if (next) { - await this.process(...next); - } - this.executing = false; + this.executing = null; - if (next) { - this.dispatch(); - } + if (next) { + this.dispatch(); + } + })(); } private async process(execution: ExecutionModel, job?: JobModel) { diff --git a/packages/plugins/workflow/src/server/Processor.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/Processor.ts similarity index 100% rename from packages/plugins/workflow/src/server/Processor.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/Processor.ts diff --git a/packages/plugins/workflow/src/server/__tests__/Plugin.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/Plugin.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/Plugin.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/Plugin.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/Processor.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/Processor.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/Processor.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/Processor.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/actions/executions.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/actions/executions.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/actions/executions.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/actions/executions.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/actions/nodes.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/actions/nodes.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/actions/nodes.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/actions/nodes.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/actions/workflows.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/actions/workflows.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/actions/workflows.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/actions/workflows.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/collections/categories.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/collections/categories.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/collections/categories.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/collections/categories.ts diff --git a/packages/plugins/workflow/src/server/__tests__/collections/comments.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/collections/comments.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/collections/comments.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/collections/comments.ts diff --git a/packages/plugins/workflow/src/server/__tests__/collections/posts.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/collections/posts.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/collections/posts.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/collections/posts.ts diff --git a/packages/plugins/workflow/src/server/__tests__/collections/replies.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/collections/replies.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/collections/replies.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/collections/replies.ts diff --git a/packages/plugins/workflow/src/server/__tests__/collections/tags.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/collections/tags.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/collections/tags.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/collections/tags.ts diff --git a/packages/plugins/workflow/src/server/__tests__/index.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/index.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/index.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/index.ts diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/aggregate.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/aggregate.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/instructions/aggregate.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/aggregate.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/calculation.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/calculation.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/instructions/calculation.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/calculation.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/condition.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/condition.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/instructions/condition.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/condition.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/create.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/create.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/instructions/create.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/create.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/delay.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/delay.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/instructions/delay.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/delay.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/destroy.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/destroy.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/instructions/destroy.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/destroy.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/loop.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/loop.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/instructions/loop.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/loop.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/manual.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/manual.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/instructions/manual.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/manual.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/parallel.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/parallel.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/instructions/parallel.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/parallel.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/query.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/query.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/instructions/query.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/query.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/request.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/request.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/instructions/request.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/request.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/sql.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/sql.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/instructions/sql.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/sql.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/instructions/update.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/update.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/instructions/update.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/instructions/update.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/triggers/collection.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/triggers/collection.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/triggers/collection.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/triggers/collection.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/triggers/form.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/triggers/form.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/triggers/form.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/triggers/form.test.ts diff --git a/packages/plugins/workflow/src/server/__tests__/triggers/schedule.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/triggers/schedule.test.ts similarity index 100% rename from packages/plugins/workflow/src/server/__tests__/triggers/schedule.test.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/triggers/schedule.test.ts diff --git a/packages/plugins/workflow/src/server/actions/executions.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/actions/executions.ts similarity index 100% rename from packages/plugins/workflow/src/server/actions/executions.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/actions/executions.ts diff --git a/packages/plugins/workflow/src/server/actions/index.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/actions/index.ts similarity index 100% rename from packages/plugins/workflow/src/server/actions/index.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/actions/index.ts diff --git a/packages/plugins/workflow/src/server/actions/nodes.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/actions/nodes.ts similarity index 100% rename from packages/plugins/workflow/src/server/actions/nodes.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/actions/nodes.ts diff --git a/packages/plugins/workflow/src/server/actions/workflows.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/actions/workflows.ts similarity index 100% rename from packages/plugins/workflow/src/server/actions/workflows.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/actions/workflows.ts diff --git a/packages/plugins/workflow/src/server/collections/executions.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/collections/executions.ts similarity index 100% rename from packages/plugins/workflow/src/server/collections/executions.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/collections/executions.ts diff --git a/packages/plugins/workflow/src/server/collections/flow_nodes.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/collections/flow_nodes.ts similarity index 100% rename from packages/plugins/workflow/src/server/collections/flow_nodes.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/collections/flow_nodes.ts diff --git a/packages/plugins/workflow/src/server/collections/jobs.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/collections/jobs.ts similarity index 100% rename from packages/plugins/workflow/src/server/collections/jobs.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/collections/jobs.ts diff --git a/packages/plugins/workflow/src/server/collections/workflows.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/collections/workflows.ts similarity index 100% rename from packages/plugins/workflow/src/server/collections/workflows.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/collections/workflows.ts diff --git a/packages/plugins/workflow/src/server/constants.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/constants.ts similarity index 100% rename from packages/plugins/workflow/src/server/constants.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/constants.ts diff --git a/packages/plugins/workflow/src/server/fields/expression-field.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/fields/expression-field.ts similarity index 100% rename from packages/plugins/workflow/src/server/fields/expression-field.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/fields/expression-field.ts diff --git a/packages/plugins/workflow/src/server/fields/index.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/fields/index.ts similarity index 100% rename from packages/plugins/workflow/src/server/fields/index.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/fields/index.ts diff --git a/packages/plugins/workflow/src/server/functions/index.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/functions/index.ts similarity index 100% rename from packages/plugins/workflow/src/server/functions/index.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/functions/index.ts diff --git a/packages/plugins/workflow/src/server/index.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/index.ts similarity index 100% rename from packages/plugins/workflow/src/server/index.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/index.ts diff --git a/packages/plugins/workflow/src/server/instructions/aggregate.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/aggregate.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/aggregate.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/aggregate.ts diff --git a/packages/plugins/workflow/src/server/instructions/calculation.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/calculation.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/calculation.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/calculation.ts diff --git a/packages/plugins/workflow/src/server/instructions/condition.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/condition.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/condition.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/condition.ts diff --git a/packages/plugins/workflow/src/server/instructions/create.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/create.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/create.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/create.ts diff --git a/packages/plugins/workflow/src/server/instructions/delay.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/delay.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/delay.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/delay.ts diff --git a/packages/plugins/workflow/src/server/instructions/destroy.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/destroy.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/destroy.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/destroy.ts diff --git a/packages/plugins/workflow/src/server/instructions/index.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/index.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/index.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/index.ts diff --git a/packages/plugins/workflow/src/server/instructions/loop.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/loop.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/loop.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/loop.ts diff --git a/packages/plugins/workflow/src/server/instructions/manual/actions.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/actions.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/manual/actions.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/actions.ts diff --git a/packages/plugins/workflow/src/server/instructions/manual/collecions/jobs.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/collecions/jobs.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/manual/collecions/jobs.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/collecions/jobs.ts diff --git a/packages/plugins/workflow/src/server/instructions/manual/collecions/users.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/collecions/users.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/manual/collecions/users.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/collecions/users.ts diff --git a/packages/plugins/workflow/src/server/instructions/manual/collecions/users_jobs.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/collecions/users_jobs.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/manual/collecions/users_jobs.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/collecions/users_jobs.ts diff --git a/packages/plugins/workflow/src/server/instructions/manual/forms/create.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/forms/create.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/manual/forms/create.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/forms/create.ts diff --git a/packages/plugins/workflow/src/server/instructions/manual/forms/index.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/forms/index.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/manual/forms/index.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/forms/index.ts diff --git a/packages/plugins/workflow/src/server/instructions/manual/forms/update.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/forms/update.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/manual/forms/update.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/forms/update.ts diff --git a/packages/plugins/workflow/src/server/instructions/manual/index.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/index.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/manual/index.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/manual/index.ts diff --git a/packages/plugins/workflow/src/server/instructions/parallel.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/parallel.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/parallel.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/parallel.ts diff --git a/packages/plugins/workflow/src/server/instructions/query.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/query.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/query.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/query.ts diff --git a/packages/plugins/workflow/src/server/instructions/request.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/request.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/request.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/request.ts diff --git a/packages/plugins/workflow/src/server/instructions/sql.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/sql.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/sql.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/sql.ts diff --git a/packages/plugins/workflow/src/server/instructions/update.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/update.ts similarity index 100% rename from packages/plugins/workflow/src/server/instructions/update.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/instructions/update.ts diff --git a/packages/plugins/workflow/src/server/migrations/20221129153547-calculation-variables.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20221129153547-calculation-variables.ts similarity index 100% rename from packages/plugins/workflow/src/server/migrations/20221129153547-calculation-variables.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20221129153547-calculation-variables.ts diff --git a/packages/plugins/workflow/src/server/migrations/20230221032941-change-request-body-type.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230221032941-change-request-body-type.ts similarity index 100% rename from packages/plugins/workflow/src/server/migrations/20230221032941-change-request-body-type.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230221032941-change-request-body-type.ts diff --git a/packages/plugins/workflow/src/server/migrations/20230221071831-calculation-expression.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230221071831-calculation-expression.ts similarity index 100% rename from packages/plugins/workflow/src/server/migrations/20230221071831-calculation-expression.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230221071831-calculation-expression.ts diff --git a/packages/plugins/workflow/src/server/migrations/20230221121203-condition-calculation.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230221121203-condition-calculation.ts similarity index 100% rename from packages/plugins/workflow/src/server/migrations/20230221121203-condition-calculation.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230221121203-condition-calculation.ts diff --git a/packages/plugins/workflow/src/server/migrations/20230221162902-jsonb-to-json.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230221162902-jsonb-to-json.ts similarity index 100% rename from packages/plugins/workflow/src/server/migrations/20230221162902-jsonb-to-json.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230221162902-jsonb-to-json.ts diff --git a/packages/plugins/workflow/src/server/migrations/20230411034722-manual-multi-form.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230411034722-manual-multi-form.ts similarity index 100% rename from packages/plugins/workflow/src/server/migrations/20230411034722-manual-multi-form.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230411034722-manual-multi-form.ts diff --git a/packages/plugins/workflow/src/server/migrations/20230612021134-manual-collection-block.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230612021134-manual-collection-block.ts similarity index 100% rename from packages/plugins/workflow/src/server/migrations/20230612021134-manual-collection-block.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230612021134-manual-collection-block.ts diff --git a/packages/plugins/workflow/src/server/migrations/20230710115902-manual-action-values.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230710115902-manual-action-values.ts similarity index 100% rename from packages/plugins/workflow/src/server/migrations/20230710115902-manual-action-values.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230710115902-manual-action-values.ts diff --git a/packages/plugins/workflow/src/server/migrations/20230809113132-workflow-options.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230809113132-workflow-options.ts similarity index 100% rename from packages/plugins/workflow/src/server/migrations/20230809113132-workflow-options.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/migrations/20230809113132-workflow-options.ts diff --git a/packages/plugins/workflow/src/server/triggers/collection.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/triggers/collection.ts similarity index 100% rename from packages/plugins/workflow/src/server/triggers/collection.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/triggers/collection.ts diff --git a/packages/plugins/workflow/src/server/triggers/form.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/triggers/form.ts similarity index 100% rename from packages/plugins/workflow/src/server/triggers/form.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/triggers/form.ts diff --git a/packages/plugins/workflow/src/server/triggers/index.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/triggers/index.ts similarity index 100% rename from packages/plugins/workflow/src/server/triggers/index.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/triggers/index.ts diff --git a/packages/plugins/workflow/src/server/triggers/schedule.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/triggers/schedule.ts similarity index 100% rename from packages/plugins/workflow/src/server/triggers/schedule.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/triggers/schedule.ts diff --git a/packages/plugins/workflow/src/server/types/Execution.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/types/Execution.ts similarity index 100% rename from packages/plugins/workflow/src/server/types/Execution.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/types/Execution.ts diff --git a/packages/plugins/workflow/src/server/types/FlowNode.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/types/FlowNode.ts similarity index 100% rename from packages/plugins/workflow/src/server/types/FlowNode.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/types/FlowNode.ts diff --git a/packages/plugins/workflow/src/server/types/Job.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/types/Job.ts similarity index 100% rename from packages/plugins/workflow/src/server/types/Job.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/types/Job.ts diff --git a/packages/plugins/workflow/src/server/types/Workflow.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/types/Workflow.ts similarity index 100% rename from packages/plugins/workflow/src/server/types/Workflow.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/types/Workflow.ts diff --git a/packages/plugins/workflow/src/server/types/index.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/types/index.ts similarity index 100% rename from packages/plugins/workflow/src/server/types/index.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/types/index.ts diff --git a/packages/plugins/workflow/src/server/utils.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/utils.ts similarity index 100% rename from packages/plugins/workflow/src/server/utils.ts rename to packages/plugins/@nocobase/plugin-workflow/src/server/utils.ts diff --git a/packages/plugins/workflow/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-workflow/src/swagger/index.ts similarity index 100% rename from packages/plugins/workflow/src/swagger/index.ts rename to packages/plugins/@nocobase/plugin-workflow/src/swagger/index.ts diff --git a/packages/plugins/api-keys/client.js b/packages/plugins/api-keys/client.js deleted file mode 100755 index 51c2d2bdb..000000000 --- a/packages/plugins/api-keys/client.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -var _index = _interopRequireWildcard(require("./dist/client")); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _exportNames = {}; -Object.defineProperty(exports, "default", { - enumerable: true, - get: function get() { - return _index.default; - } -}); - -Object.keys(_index).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - if (key in exports && exports[key] === _index[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _index[key]; - } - }); -}); diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Brush.js b/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Brush.js deleted file mode 100644 index a28a1561b..000000000 --- a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Brush.js +++ /dev/null @@ -1,59 +0,0 @@ -import * as React from 'react'; - -function Brush(props) { - return /*#__PURE__*/ React.createElement( - 'svg', - Object.assign( - { - width: '1em', - height: '1em', - viewBox: '0 0 14 18', - xmlns: 'http://www.w3.org/2000/svg', - xmlnsXlink: 'http://www.w3.org/1999/xlink', - }, - props, - { - style: Object.assign( - { - verticalAlign: '-0.125em', - }, - props.style, - ), - className: ['nanqu-token-panel-icon', props.className].filter(Boolean).join(' '), - }, - ), - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Brush-\u9875\u9762-1', - stroke: 'none', - strokeWidth: 1, - fill: 'none', - fillRule: 'evenodd', - fillOpacity: 0.649999976, - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Brush-\u4E3B\u9898\u7F16\u8F91\u5668---\u591A\u4E3B\u9898', - transform: 'translate(-17.000000, -121.000000)', - fill: 'currentColor', - fillRule: 'nonzero', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Brush-brush', - transform: 'translate(14.000000, 120.000000)', - }, - /*#__PURE__*/ React.createElement('path', { - d: 'M8.20652175,3.2826087 L8.20652175,4.10326086 C8.20652175,4.55649455 7.83910325,4.92391304 7.38586957,4.92391304 C6.93263588,4.92391304 6.56521738,4.55649455 6.56521738,4.10326086 L6.56521738,3.2826087 L4.92391304,3.2826087 L4.92391304,8.20652175 L14.7717391,8.20652175 L14.7717391,3.2826087 L13.1304348,3.2826087 L13.1304348,5.74456522 C13.1304348,6.19779891 12.7630163,6.5652174 12.3097826,6.5652174 C11.8565489,6.5652174 11.4891304,6.19779891 11.4891304,5.74456522 L11.4891304,3.2826087 L8.20652175,3.2826087 Z M4.92391304,9.84782609 L4.92391304,11.4891304 L7.72233695,11.4891304 C8.08431263,11.4890155 8.42799204,11.6482243 8.66197039,11.9244136 C8.89594874,12.2006029 8.99650752,12.5657753 8.93690217,12.9228098 L8.60043479,14.9399728 C8.51784643,15.435105 8.73592476,15.9322123 9.15616576,16.2067558 C9.57640676,16.4812994 10.1192454,16.4812994 10.5394864,16.2067558 C10.9597274,15.9322123 11.1778057,15.435105 11.0952174,14.9399728 L10.75875,12.9228098 C10.6991446,12.5657753 10.7997034,12.2006029 11.0336818,11.9244136 C11.2676601,11.6482243 11.6113395,11.4890155 11.9733152,11.4891304 L14.7717391,11.4891304 L14.7717391,9.84782609 L4.92391304,9.84782609 Z M12.7143641,14.6699783 C12.9035912,15.807501 12.4022968,16.9492894 11.4368082,17.5798421 C10.4713197,18.2103948 9.2243325,18.2103948 8.25884395,17.5798421 C7.2933554,16.9492894 6.79206095,15.807501 6.98128804,14.6699783 L7.23815217,13.1304348 L4.92391304,13.1304348 C4.48861206,13.1304348 4.07113988,12.9575121 3.76333561,12.6497079 C3.45553133,12.3419036 3.2826087,11.9244314 3.2826087,11.4891304 L3.2826087,3.2826087 C3.2826087,2.84730772 3.45553133,2.42983554 3.76333561,2.12203126 C4.07113988,1.81422698 4.48861206,1.64130434 4.92391304,1.64130434 L14.7717391,1.64130434 C15.2070401,1.64130434 15.6245123,1.81422698 15.9323166,2.12203126 C16.2401208,2.42983554 16.4130435,2.84730772 16.4130435,3.2826087 L16.4130435,11.4891304 C16.4130435,11.9244314 16.2401208,12.3419036 15.9323166,12.6497079 C15.6245123,12.9575121 15.2070401,13.1304348 14.7717391,13.1304348 L12.4575,13.1304348 L12.7143641,14.6699783 L12.7143641,14.6699783 Z', - id: 'Brush-\u5F62\u72B6', - }), - ), - ), - ), - ); -} - -export default Brush; diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Dark.js b/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Dark.js deleted file mode 100644 index 77f8ceacd..000000000 --- a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Dark.js +++ /dev/null @@ -1,73 +0,0 @@ -import * as React from 'react'; - -function Dark(props) { - return /*#__PURE__*/ React.createElement( - 'svg', - Object.assign( - { - width: '1em', - height: '1em', - viewBox: '0 0 17 17', - xmlns: 'http://www.w3.org/2000/svg', - xmlnsXlink: 'http://www.w3.org/1999/xlink', - }, - props, - { - style: Object.assign( - { - verticalAlign: '-0.125em', - }, - props.style, - ), - className: ['nanqu-token-panel-icon', props.className].filter(Boolean).join(' '), - }, - ), - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Dark-\u9875\u9762-1', - stroke: 'none', - strokeWidth: 1, - fill: 'none', - fillRule: 'evenodd', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Dark-\u9ED8\u8BA4', - transform: 'translate(-9.000000, -49.500000)', - fill: 'currentColor', - fillRule: 'nonzero', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Dark-\u7F16\u7EC4-17', - transform: 'translate(0.000000, 42.500000)', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Dark-moon', - transform: 'translate(9.268811, 7.500000)', - }, - /*#__PURE__*/ React.createElement('rect', { - id: 'Dark-\u77E9\u5F62', - opacity: 0, - x: 0, - y: 0, - width: 16, - height: 16, - }), - /*#__PURE__*/ React.createElement('path', { - d: 'M8,1.33333333 C8.14933333,1.33333333 8.29688889,1.33844444 8.44266667,1.34866666 C8.14755556,1.98422221 8,2.64577777 8,3.33333333 C8,3.96533333 8.12333333,4.56955555 8.37,5.146 C8.61666667,5.72244445 8.94822222,6.21888889 9.36466667,6.63533333 C9.78111112,7.05177777 10.2775556,7.38333332 10.854,7.63 C11.4304444,7.87666668 12.0346667,8.00000001 12.6666667,8 C13.3542222,8 14.0157778,7.85244444 14.6513333,7.55733333 C14.6615556,7.70311111 14.6666667,7.85066667 14.6666667,8 C14.6666667,8.604 14.5868889,9.19422222 14.4273333,9.77066667 C14.2677778,10.3471111 14.0446667,10.8793333 13.758,11.3673333 C13.4713333,11.8553333 13.1233333,12.3042222 12.714,12.714 C12.3046667,13.1237778 11.8557778,13.4717778 11.3673333,13.758 C10.8788889,14.0442222 10.3466667,14.2673333 9.77066667,14.4273333 C9.19466667,14.5873333 8.60444445,14.6671111 8,14.6666685 C7.39555555,14.6662222 6.80533333,14.5864444 6.22933333,14.4273333 C5.65333333,14.2682222 5.1211111,14.0451111 4.63266666,13.758 C4.14422221,13.4708889 3.69533332,13.1228889 3.28599998,12.714 C2.87666665,12.3051111 2.52866665,11.8562222 2.24199998,11.3673333 C1.95533332,10.8784444 1.73222221,10.3462222 1.57266666,9.77066667 C1.4131111,9.19511112 1.33333333,8.6048889 1.33333333,8 C1.33333333,7.3951111 1.4131111,6.80488888 1.57266666,6.22933333 C1.73222221,5.65377778 1.95533332,5.12155555 2.24199998,4.63266666 C2.52866665,4.14377776 2.87666665,3.69488887 3.28599998,3.28599998 C3.69533332,2.8771111 4.14422221,2.5291111 4.63266666,2.24199998 C5.1211111,1.95488887 5.65333333,1.73177776 6.22933333,1.57266666 C6.80533333,1.41355555 7.39555555,1.33377778 8,1.33333333 Z M6.68733333,2.828 C6.11444444,2.97377778 5.58066667,3.20977778 5.086,3.536 C4.59133333,3.86222222 4.166,4.24933333 3.81,4.69733333 C3.454,5.14533333 3.17444444,5.65488889 2.97133333,6.226 C2.76822221,6.79711111 2.66666666,7.38822222 2.66666666,7.99933333 C2.66666666,8.72155555 2.80733332,9.41155555 3.08866666,10.0693333 C3.36999999,10.7271111 3.74933332,11.2948889 4.22666666,11.7726667 C4.70399999,12.2504444 5.27177777,12.6297778 5.92999998,12.9106667 C6.5882222,13.1915556 7.2782222,13.3322222 7.99999998,13.3326667 C8.6111111,13.3326667 9.20222221,13.2311111 9.77333331,13.028 C10.3444444,12.8248889 10.854,12.5453333 11.302,12.1893333 C11.75,11.8333333 12.1371111,11.408 12.4633333,10.9133333 C12.7895555,10.4186666 13.0255555,9.88488887 13.1713333,9.31199998 C13.022,9.32577777 12.8535555,9.33266666 12.666,9.33266666 C11.8535555,9.33266666 11.0775555,9.17377777 10.338,8.85599998 C9.59844443,8.5382222 8.96044443,8.11111109 8.42399998,7.57466666 C7.88755554,7.03822222 7.46044443,6.40022222 7.14266666,5.66066666 C6.82488889,4.92111109 6.66599999,4.14511109 6.66599998,3.33266666 C6.66599998,3.1451111 6.67288888,2.97666666 6.68666666,2.82733333 L6.68733333,2.828 Z', - id: 'Dark-\u5F62\u72B6', - }), - ), - ), - ), - ), - ); -} - -export default Dark; diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Light.js b/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Light.js deleted file mode 100644 index 8ee964120..000000000 --- a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Light.js +++ /dev/null @@ -1,87 +0,0 @@ -import * as React from 'react'; - -function Light(props) { - return /*#__PURE__*/ React.createElement( - 'svg', - Object.assign( - { - width: '1em', - height: '1em', - viewBox: '0 0 13 13', - xmlns: 'http://www.w3.org/2000/svg', - xmlnsXlink: 'http://www.w3.org/1999/xlink', - }, - props, - { - style: Object.assign( - { - verticalAlign: '-0.125em', - }, - props.style, - ), - className: ['nanqu-token-panel-icon', props.className].filter(Boolean).join(' '), - }, - ), - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Light-\u9875\u9762-1', - stroke: 'none', - strokeWidth: 1, - fill: 'none', - fillRule: 'evenodd', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Light-\u4E3B\u9898\u5305', - transform: 'translate(-2943.000000, -292.000000)', - fill: 'currentColor', - fillRule: 'nonzero', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Light-\u7F16\u7EC4-12', - transform: 'translate(2415.000000, 222.000000)', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Light-\u89C6\u56FE\u5207\u6362-\u7F16\u8F91\u6001', - transform: 'translate(518.000000, 60.000000)', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Light-eye', - transform: 'translate(8.000000, 8.000000)', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Light-sun', - transform: 'translate(2.000000, 2.000000)', - }, - /*#__PURE__*/ React.createElement('rect', { - id: 'Light-\u77E9\u5F62', - opacity: 0, - x: 0, - y: 0, - width: 13, - height: 13, - }), - /*#__PURE__*/ React.createElement('path', { - d: 'M6.5,9.75 C4.7051875,9.75 3.25,8.2948125 3.25,6.5 C3.25,4.7051875 4.7051875,3.25 6.5,3.25 C8.2948125,3.25 9.75,4.7051875 9.75,6.5 C9.75,8.2948125 8.2948125,9.75 6.5,9.75 Z M6.5,8.66666667 C7.69661696,8.66666667 8.66666667,7.69661696 8.66666667,6.5 C8.66666667,5.30338304 7.69661696,4.33333333 6.5,4.33333333 C5.30338305,4.33333333 4.33333336,5.30338305 4.33333336,6.5 C4.33333336,7.69661695 5.30338305,8.66666667 6.5,8.66666667 Z M5.95833333,1.08333333 C5.95833333,0.784179087 6.20084576,0.541666658 6.5,0.541666658 C6.79915424,0.541666658 7.04166667,0.784179087 7.04166667,1.08333333 L7.04166667,2.16666667 C7.04166667,2.46582091 6.79915424,2.70833334 6.5,2.70833334 C6.20084576,2.70833334 5.95833333,2.46582091 5.95833333,2.16666667 L5.95833333,1.08333333 L5.95833333,1.08333333 Z M5.95833333,10.8333333 C5.95833333,10.5341791 6.20084576,10.2916667 6.5,10.2916667 C6.79915424,10.2916667 7.04166667,10.5341791 7.04166667,10.8333333 L7.04166667,11.9166667 C7.04166667,12.2158209 6.79915424,12.4583333 6.5,12.4583333 C6.20084576,12.4583333 5.95833333,12.2158209 5.95833333,11.9166667 L5.95833333,10.8333333 L5.95833333,10.8333333 Z M1.08333333,7.04166667 C0.784179087,7.04166667 0.541666658,6.79915424 0.541666658,6.5 C0.541666658,6.20084576 0.784179087,5.95833333 1.08333333,5.95833333 L2.16666667,5.95833333 C2.46582091,5.95833333 2.70833334,6.20084576 2.70833334,6.5 C2.70833334,6.79915424 2.46582091,7.04166667 2.16666667,7.04166667 L1.08333333,7.04166667 L1.08333333,7.04166667 Z M10.8333333,7.04166667 C10.5341791,7.04166667 10.2916667,6.79915424 10.2916667,6.5 C10.2916667,6.20084576 10.5341791,5.95833333 10.8333333,5.95833333 L11.9166667,5.95833333 C12.2158209,5.95833333 12.4583333,6.20084576 12.4583333,6.5 C12.4583333,6.79915424 12.2158209,7.04166667 11.9166667,7.04166667 L10.8333333,7.04166667 L10.8333333,7.04166667 Z M2.05454167,2.82045833 C1.84926545,2.60791971 1.85220137,2.27007933 2.06114035,2.06114035 C2.27007933,1.85220137 2.60791971,1.84926545 2.82045833,2.05454167 L3.63295833,2.86704167 C3.83823455,3.07958029 3.83529863,3.41742067 3.62635965,3.62635965 C3.41742067,3.83529863 3.07958029,3.83823455 2.86704167,3.63295833 L2.05454167,2.82045833 L2.05454167,2.82045833 Z M9.36704167,10.1329583 C9.16176545,9.92041971 9.16470137,9.58257933 9.37364035,9.37364035 C9.58257933,9.16470137 9.92041971,9.16176545 10.1329583,9.36704167 L10.9454583,10.1795417 C11.1507346,10.3920803 11.1477986,10.7299207 10.9388596,10.9388596 C10.7299207,11.1477986 10.3920803,11.1507346 10.1795417,10.9454583 L9.36704167,10.1329583 L9.36704167,10.1329583 Z M2.82045833,10.9454583 C2.60791971,11.1507346 2.27007933,11.1477986 2.06114035,10.9388596 C1.85220137,10.7299207 1.84926545,10.3920803 2.05454167,10.1795417 L2.86704167,9.36704167 C3.07958029,9.16176545 3.41742067,9.16470137 3.62635965,9.37364035 C3.83529863,9.58257933 3.83823455,9.92041971 3.63295833,10.1329583 L2.82045833,10.9454583 L2.82045833,10.9454583 Z M10.1329583,3.63295833 C9.92041971,3.83823455 9.58257933,3.83529863 9.37364035,3.62635965 C9.16470137,3.41742067 9.16176545,3.07958029 9.36704167,2.86704167 L10.1795417,2.05454167 C10.3920803,1.84926545 10.7299207,1.85220137 10.9388596,2.06114035 C11.1477986,2.27007933 11.1507346,2.60791971 10.9454583,2.82045833 L10.1329583,3.63295833 L10.1329583,3.63295833 Z', - id: 'Light-\u5F62\u72B6', - }), - ), - ), - ), - ), - ), - ), - ); -} - -export default Light; diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Margin.js b/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Margin.js deleted file mode 100644 index bf5c3e889..000000000 --- a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Margin.js +++ /dev/null @@ -1,59 +0,0 @@ -import * as React from 'react'; - -function Margin(props) { - return /*#__PURE__*/ React.createElement( - 'svg', - Object.assign( - { - width: '1em', - height: '1em', - viewBox: '0 0 16 17', - xmlns: 'http://www.w3.org/2000/svg', - xmlnsXlink: 'http://www.w3.org/1999/xlink', - }, - props, - { - style: Object.assign( - { - verticalAlign: '-0.125em', - }, - props.style, - ), - className: ['nanqu-token-panel-icon', props.className].filter(Boolean).join(' '), - }, - ), - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Margin-\u9875\u9762-1', - stroke: 'none', - strokeWidth: 1, - fill: 'none', - fillRule: 'evenodd', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Margin-margin', - transform: 'translate(0.000000, 0.942377)', - fill: 'currentColor', - fillRule: 'nonzero', - }, - /*#__PURE__*/ React.createElement('rect', { - id: 'Margin-\u77E9\u5F62', - opacity: 0, - x: 0, - y: 0, - width: 16, - height: 15.9807923, - }), - /*#__PURE__*/ React.createElement('path', { - d: 'M11.6666667,2.75858915 L4.33333333,2.75858915 C4.01904762,2.75858915 3.80952382,2.54931688 3.80952382,2.23540845 C3.80952382,1.92150003 4.01904763,1.71222775 4.33333334,1.71222775 L11.6666667,1.71222775 C11.9809524,1.71222775 12.1904762,1.92150003 12.1904762,2.23540845 C12.1904762,2.54931688 11.9809524,2.75858915 11.6666667,2.75858915 Z M11.6666667,14.2685646 L4.33333333,14.2685646 C4.01904762,14.2685646 3.8095238,14.0592923 3.8095238,13.7453839 C3.8095238,13.4314755 4.01904762,13.2222032 4.33333333,13.2222032 L11.6666667,13.2222032 C11.9809524,13.2222032 12.1904762,13.4314755 12.1904762,13.7453839 C12.1904762,14.0592923 11.9809524,14.2685646 11.6666667,14.2685646 Z M13.7619048,12.1758418 C13.447619,12.1758418 13.2380952,11.9665695 13.2380952,11.6526611 L13.2380952,4.32813125 C13.2380952,4.01422283 13.4476191,3.80495055 13.7619048,3.80495055 C14.0761905,3.80495055 14.2857143,4.01422283 14.2857143,4.32813125 L14.2857143,11.6526611 C14.2857143,11.9665695 14.0761905,12.1758418 13.7619048,12.1758418 Z M2.23809524,12.1758418 C1.92380953,12.1758418 1.71428572,11.9665695 1.71428572,11.6526611 L1.71428572,4.32813125 C1.71428572,4.01422283 1.92380953,3.80495055 2.23809524,3.80495055 C2.55238096,3.80495055 2.76190477,4.01422283 2.76190477,4.32813125 L2.76190477,11.6526611 C2.76190477,11.9665695 2.55238096,12.1758418 2.23809524,12.1758418 Z M11.6666667,12.1758418 L4.33333333,12.1758418 C4.01904762,12.1758418 3.8095238,11.9665695 3.8095238,11.6526611 L3.8095238,4.32813125 C3.8095238,4.01422283 4.01904763,3.80495055 4.33333334,3.80495055 L11.6666667,3.80495055 C11.9809524,3.80495055 12.1904762,4.01422283 12.1904762,4.32813125 L12.1904762,11.6526611 C12.1904762,11.9665695 11.9809524,12.1758418 11.6666667,12.1758418 Z M4.85714286,11.1294804 L11.1428571,11.1294804 L11.1428571,4.85131196 L4.85714286,4.85131196 L4.85714286,11.1294804 Z', - id: 'Margin-\u5F62\u72B6', - }), - ), - ), - ); -} - -export default Margin; diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Motion.js b/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Motion.js deleted file mode 100644 index 2f4dc5fc4..000000000 --- a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Motion.js +++ /dev/null @@ -1,59 +0,0 @@ -import * as React from 'react'; - -function Motion(props) { - return /*#__PURE__*/ React.createElement( - 'svg', - Object.assign( - { - width: '1em', - height: '1em', - viewBox: '0 0 16 17', - xmlns: 'http://www.w3.org/2000/svg', - xmlnsXlink: 'http://www.w3.org/1999/xlink', - }, - props, - { - style: Object.assign( - { - verticalAlign: '-0.125em', - }, - props.style, - ), - className: ['nanqu-token-panel-icon', props.className].filter(Boolean).join(' '), - }, - ), - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Motion-\u9875\u9762-1', - stroke: 'none', - strokeWidth: 1, - fill: 'none', - fillRule: 'evenodd', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Motion-\u5BCC\u6587\u672C\u7F16\u8F91\u5668_\u52A8\u6548', - transform: 'translate(0.000000, 0.903962)', - fill: 'currentColor', - fillRule: 'nonzero', - }, - /*#__PURE__*/ React.createElement('rect', { - id: 'Motion-\u77E9\u5F62', - opacity: 0, - x: 0, - y: 0, - width: 16, - height: 15.9807923, - }), - /*#__PURE__*/ React.createElement('path', { - d: 'M6.55644444,12.5262777 L7.99555556,13.9627734 C8.13290682,14.0984321 8.18701716,14.2971622 8.13737053,14.4836147 C8.0877239,14.6700672 7.94192169,14.8156943 7.75524511,14.8652814 C7.56856853,14.9148684 7.36959959,14.860823 7.23377778,14.7236366 L5.79555556,13.2862532 C5.60250935,13.0737079 5.61045949,12.7472435 5.8136232,12.5443237 C6.01678692,12.3414038 6.3436437,12.3334632 6.55644444,12.5262777 L6.55644444,12.5262777 Z M12.2435556,12.6630023 L13.3857778,13.8038533 C13.5231286,13.9395121 13.5772386,14.138242 13.527592,14.3246942 C13.4779453,14.5111464 13.3321433,14.6567734 13.145467,14.7063605 C12.9587906,14.7559476 12.7598219,14.7019025 12.624,14.5647165 L11.4817778,13.4238655 C11.3444269,13.2882067 11.2903169,13.0894768 11.3399636,12.9030246 C11.3896103,12.7165724 11.5354123,12.5709454 11.7220886,12.5213583 C11.9087649,12.4717712 12.1077337,12.5258163 12.2435556,12.6630023 L12.2435556,12.6630023 Z M7.29511111,0.990809123 C7.37066667,1.03342457 7.43377778,1.09645992 7.47644444,1.17192476 L9.23911111,4.29439403 L12.7564444,5.00376364 C12.9258902,5.03768098 13.0638332,5.16026877 13.1172645,5.32441904 C13.1706959,5.4885693 13.1313024,5.66874209 13.0142222,5.79570068 L10.5866667,8.43430705 L10.9982222,11.9953603 C11.018176,12.1667991 10.94398,12.3356549 10.8041422,12.4370491 C10.6643043,12.5384432 10.4805781,12.5566027 10.3235556,12.4845501 L7.06133333,10.9930095 L3.79733333,12.4845501 C3.64031082,12.5566027 3.45658456,12.5384432 3.3167467,12.4370491 C3.17690884,12.3356549 3.10271286,12.1667991 3.12266667,11.9953603 L3.53511111,8.43519487 L1.10577778,5.79570068 C0.988697555,5.66874209 0.949304077,5.4885693 1.00273546,5.32441904 C1.05616684,5.16026877 1.19410976,5.03768098 1.36355556,5.00376364 L4.88177778,4.29439403 L6.64266667,1.17192476 C6.70502264,1.06136833 6.80886024,0.980137913 6.93126543,0.94615878 C7.05367063,0.912179648 7.18458201,0.928244805 7.29511111,0.990809123 Z M7.05955556,2.62440123 L5.57688889,5.25235374 L2.61688889,5.84808216 L4.65955556,8.07030012 L4.31288889,11.0666987 L7.05955556,9.81131866 L9.80533333,11.0666987 L9.45866667,8.07030012 L11.5031111,5.84896999 L8.54222222,5.25235374 L7.05866667,2.62440123 L7.05955556,2.62440123 Z M13.1528889,7.76045031 L14.5911111,9.19694597 C14.7892424,9.40878705 14.7837079,9.73933037 14.5785954,9.9444359 C14.373483,10.1495414 14.0425491,10.1554552 13.8302222,9.95780926 L12.3911111,8.5213136 C12.2537603,8.38565475 12.1996502,8.18692487 12.2492969,8.00047265 C12.2989436,7.81402043 12.4447456,7.66839345 12.6314219,7.61880637 C12.8180983,7.56921929 13.017067,7.62326436 13.1528889,7.76045031 L13.1528889,7.76045031 Z', - id: 'Motion-\u5F62\u72B6', - }), - ), - ), - ); -} - -export default Motion; diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Pick.js b/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Pick.js deleted file mode 100644 index edb12f8bc..000000000 --- a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/Pick.js +++ /dev/null @@ -1,87 +0,0 @@ -import * as React from 'react'; - -function Pick(props) { - return /*#__PURE__*/ React.createElement( - 'svg', - Object.assign( - { - width: '1em', - height: '1em', - viewBox: '0 0 14 14', - xmlns: 'http://www.w3.org/2000/svg', - xmlnsXlink: 'http://www.w3.org/1999/xlink', - }, - props, - { - style: Object.assign( - { - verticalAlign: '-0.125em', - }, - props.style, - ), - className: ['nanqu-token-panel-icon', props.className].filter(Boolean).join(' '), - }, - ), - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Pick-\u9875\u9762-1', - stroke: 'none', - strokeWidth: 1, - fill: 'none', - fillRule: 'evenodd', - fillOpacity: 0.65, - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Pick-\u4E3B\u9898\u7F16\u8F91\u5668---\u591A\u4E3B\u9898', - transform: 'translate(-541.000000, -387.000000)', - fill: 'currentColor', - fillRule: 'nonzero', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Pick-\u7F16\u7EC4-11', - transform: 'translate(76.000000, 340.000000)', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Pick-Map-Token-\u9762\u677F', - transform: 'translate(0.000000, 27.000000)', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Pick-token-\u663E\u793A', - transform: 'translate(-1.002041, -1.000000)', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Pick-\u7F16\u7EC4-2', - transform: 'translate(12.024490, 20.000000)', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'Pick-shangyeguanxi', - transform: 'translate(453.924490, 1.000000)', - }, - /*#__PURE__*/ React.createElement('path', { - d: 'M12.6274816,8.17204883 C12.6358384,8.04673242 12.6401539,7.92030859 12.6401539,7.79288672 C12.6401539,5.50309375 11.2701899,3.53286719 9.30406641,2.65472266 C9.31862927,2.54983203 9.32632854,2.44274023 9.32632854,2.33384375 C9.32632854,1.05430664 8.28750187,0.0169394531 7.00623025,0.0169394531 C5.72484902,0.0169394531 4.68607715,1.05430664 4.68607715,2.33384375 C4.68607715,2.44267188 4.69376272,2.54968164 4.70829819,2.65451758 C2.74188703,3.53256641 1.37158055,5.50290234 1.37158055,7.79288672 C1.37158055,7.92044531 1.37592338,8.04699219 1.38428025,8.17243164 C0.593775725,8.54169531 0.0460860491,9.34289453 0.0460860491,10.2719531 C0.0460860491,11.5515449 1.08474833,12.5888574 2.36612955,12.5888574 C2.80723496,12.5888574 3.21958454,12.4658926 3.57069612,12.2524336 C4.52158393,12.9838105 5.71288912,13.4188223 7.00595625,13.4188223 C8.30016046,13.4188223 9.49238354,12.9830449 10.4436412,12.2505195 C10.7943281,12.4630762 11.2059516,12.5854668 11.6462213,12.5854668 C12.9274382,12.5854668 13.9661004,11.5489746 13.9661004,10.2703672 C13.9661004,9.34171875 13.4181916,8.54095703 12.6274816,8.17204883 Z M7.00623025,1.00913477 C7.73549676,1.00913477 8.32698463,1.59684766 8.33166995,2.32357617 C8.33168365,2.32647461 8.33177955,2.32935938 8.33177955,2.33225781 C8.33177955,2.69178711 8.18805519,3.01775195 7.95488499,3.25620313 C7.71417991,3.50236523 7.37813809,3.65527148 7.00623025,3.65527148 C6.6343361,3.65527148 6.29829428,3.50236523 6.0575618,3.25620313 C5.8243779,3.01775195 5.68062614,2.69178711 5.68062614,2.33225781 C5.68062614,2.32931836 5.68072204,2.32639258 5.68073574,2.32345313 C5.68547586,1.59679297 6.27704593,1.00913477 7.00623025,1.00913477 Z M2.36612955,11.5993965 C1.63399978,11.5993965 1.04047065,11.0058047 1.04047065,10.2734297 C1.04047065,9.84645703 1.24229576,9.46667969 1.55566445,9.22416797 C1.7797654,9.05074023 2.06088482,8.94746289 2.36614325,8.94746289 C2.41639403,8.94746289 2.46597352,8.95036133 2.51477213,8.95580273 C3.17696454,9.02969922 3.69181585,9.59136719 3.69181585,10.273416 C3.69181585,10.4903613 3.6397293,10.6951113 3.5473928,10.8758809 C3.39166744,11.1807637 3.12143934,11.4173555 2.79339819,11.5289863 C2.65931847,11.574623 2.51562151,11.5993965 2.36612955,11.5993965 Z M7.00127093,12.4178633 C5.99141928,12.4178633 5.0570808,12.0957402 4.29537321,11.549084 C4.53905114,11.1824316 4.68111783,10.7425937 4.68111783,10.2695605 C4.68111783,8.99117188 3.64429132,7.95466602 2.36460887,7.95280664 C2.3626772,7.89787305 2.36134833,7.84278906 2.36134833,7.78737695 C2.36134833,5.92565039 3.46242679,4.32079102 5.05001172,3.58529883 C5.46299149,4.22481445 6.18258597,4.64830078 7.00128463,4.64830078 C7.81990109,4.64830078 8.53950926,4.22481445 8.95248903,3.58529883 C10.5400329,4.32079102 11.6411113,5.92565039 11.6411113,7.78737695 C11.6411113,7.84277539 11.6397824,7.89787305 11.6378508,7.95280664 C10.3582094,7.95465234 9.32139662,8.99040625 9.32139662,10.2679746 C9.32139662,10.7413906 9.4639017,11.1815293 9.70827832,11.5482363 C8.94635153,12.0953848 8.01158836,12.4178633 7.00127093,12.4178633 Z M11.6459473,8.94746289 C11.9510962,8.94746289 12.2321197,9.0506582 12.4561658,9.22397656 C12.7696578,9.46647461 12.9715652,9.84632031 12.9715652,10.273375 C12.9715652,11.0056953 12.3780634,11.5993418 11.6459473,11.5993418 C11.4964143,11.5993418 11.3526762,11.574541 11.2185828,11.528877 C10.8907472,11.4172324 10.6206287,11.1807227 10.464917,10.8759902 C10.3725257,10.6951797 10.320398,10.490375 10.320398,10.273375 C10.320398,9.59128516 10.8354138,9.0295625 11.4976062,8.95577539 C11.5463226,8.95034766 11.5957925,8.94746289 11.6459473,8.94746289 Z M7.00557266,6.21029883 C7.91351399,6.21029883 8.64954587,6.94483166 8.64954587,7.85092383 C8.64954587,8.757016 7.91351399,9.49154883 7.00557266,9.49154883 C6.09763132,9.49154883 5.36159944,8.757016 5.36159944,7.85092383 C5.36159944,6.94483166 6.09763132,6.21029883 7.00557266,6.21029883 Z', - id: 'Pick-\u5F62\u72B6', - }), - ), - ), - ), - ), - ), - ), - ), - ); -} - -export default Pick; diff --git a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/ShapeLine.js b/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/ShapeLine.js deleted file mode 100644 index c31221b0a..000000000 --- a/packages/plugins/theme-editor/src/client/antd-token-previewer/icons/ShapeLine.js +++ /dev/null @@ -1,59 +0,0 @@ -import * as React from 'react'; - -function ShapeLine(props) { - return /*#__PURE__*/ React.createElement( - 'svg', - Object.assign( - { - width: '1em', - height: '1em', - viewBox: '0 0 16 17', - xmlns: 'http://www.w3.org/2000/svg', - xmlnsXlink: 'http://www.w3.org/1999/xlink', - }, - props, - { - style: Object.assign( - { - verticalAlign: '-0.125em', - }, - props.style, - ), - className: ['nanqu-token-panel-icon', props.className].filter(Boolean).join(' '), - }, - ), - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'ShapeLine-\u9875\u9762-1', - stroke: 'none', - strokeWidth: 1, - fill: 'none', - fillRule: 'evenodd', - }, - /*#__PURE__*/ React.createElement( - 'g', - { - id: 'ShapeLine-shape-line', - transform: 'translate(0.000000, 0.923169)', - fill: 'currentColor', - fillRule: 'nonzero', - }, - /*#__PURE__*/ React.createElement('rect', { - id: 'ShapeLine-\u77E9\u5F62', - opacity: 0, - x: 0, - y: 0, - width: 16, - height: 15.9807923, - }), - /*#__PURE__*/ React.createElement('path', { - d: 'M5.22,13.3173269 C4.90928357,14.1946577 4.03334945,14.7416208 3.10760502,14.6363783 C2.18186059,14.5311359 1.45139881,13.801551 1.34602985,12.8769179 C1.24066088,11.9522848 1.78828141,11.0774022 2.66666667,10.7670588 L2.66666667,5.21373349 C1.78828141,4.90339007 1.24066088,4.02850749 1.34602985,3.1038744 C1.45139881,2.1792413 2.18186059,1.44965643 3.10760502,1.34441396 C4.03334945,1.23917149 4.90928357,1.78613461 5.22,2.66346539 L10.78,2.66346539 C11.0907164,1.78613461 11.9666505,1.23917149 12.892395,1.34441396 C13.8181394,1.44965643 14.5486012,2.1792413 14.6539702,3.1038744 C14.7593391,4.02850749 14.2117186,4.90339007 13.3333333,5.21373349 L13.3333333,10.7670588 C14.2117186,11.0774022 14.7593391,11.9522848 14.6539702,12.8769179 C14.5486012,13.801551 13.8181394,14.5311359 12.892395,14.6363783 C11.9666505,14.7416208 11.0907164,14.1946577 10.78,13.3173269 L5.22,13.3173269 Z M5.22,11.9855942 L10.78,11.9855942 C10.9819939,11.4165133 11.430235,10.9688103 12,10.7670588 L12,5.21373349 C11.430235,5.01198206 10.9819939,4.56427905 10.78,3.99519808 L5.22,3.99519808 C5.01800608,4.56427905 4.56976496,5.01198206 4,5.21373349 L4,10.7670588 C4.56976496,10.9688103 5.01800608,11.4165133 5.22,11.9855942 Z M3.33333333,3.99519809 C3.5715347,3.9952345 3.79165744,3.86832906 3.91076865,3.66229434 C4.02987987,3.45625961 4.02987987,3.20240385 3.91076865,2.99636913 C3.79165744,2.79033441 3.5715347,2.66342897 3.33333333,2.66346538 C2.96518335,2.66352168 2.66676872,2.96162371 2.66676872,3.32933173 C2.66676872,3.69703976 2.96518335,3.99514178 3.33333333,3.99519809 L3.33333333,3.99519809 Z M12.6666667,3.99519809 C12.904868,3.9952345 13.1249908,3.86832906 13.244102,3.66229434 C13.3632132,3.45625961 13.3632132,3.20240385 13.244102,2.99636913 C13.1249908,2.79033441 12.904868,2.66342897 12.6666667,2.66346538 C12.2985167,2.66352168 12.0001021,2.96162371 12.0001021,3.32933173 C12.0001021,3.69703976 12.2985167,3.99514178 12.6666667,3.99519809 L12.6666667,3.99519809 Z M12.6666667,13.3173269 C12.904868,13.3173633 13.1249908,13.1904579 13.244102,12.9844232 C13.3632132,12.7783885 13.3632132,12.5245327 13.244102,12.318498 C13.1249908,12.1124633 12.904868,11.9855578 12.6666667,11.9855942 C12.2985167,11.9856505 12.0001021,12.2837526 12.0001021,12.6514606 C12.0001021,13.0191686 12.2985167,13.3172706 12.6666667,13.3173269 L12.6666667,13.3173269 Z M3.33333333,13.3173269 C3.5715347,13.3173633 3.79165744,13.1904579 3.91076865,12.9844232 C4.02987987,12.7783885 4.02987987,12.5245327 3.91076865,12.318498 C3.79165744,12.1124633 3.5715347,11.9855578 3.33333333,11.9855942 C2.96518335,11.9856505 2.66676872,12.2837526 2.66676872,12.6514606 C2.66676872,13.0191686 2.96518335,13.3172706 3.33333333,13.3173269 L3.33333333,13.3173269 Z', - id: 'ShapeLine-\u5F62\u72B6', - }), - ), - ), - ); -} - -export default ShapeLine; diff --git a/packages/presets/nocobase/src/server/index.ts b/packages/presets/nocobase/src/server/index.ts index abbd9d08f..6bab45eb6 100644 --- a/packages/presets/nocobase/src/server/index.ts +++ b/packages/presets/nocobase/src/server/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from '@nocobase/server'; +import { Plugin, PluginManager } from '@nocobase/server'; import _ from 'lodash'; import path from 'path'; @@ -7,7 +7,7 @@ export class PresetNocoBase extends Plugin { 'error-handler', 'collection-manager', 'ui-schema-storage', - 'ui-routes-storage', + // 'ui-routes-storage', 'file-manager', 'system-settings', 'sequence-field', @@ -71,19 +71,27 @@ export class PresetNocoBase extends Plugin { }, }); this.app.on('beforeUpgrade', async () => { - await this.createIfNotExist(); + await this.createIfNotExists(); }); } get allPlugins() { return this.builtInPlugins .map((name) => { - return { name, enabled: true, builtIn: true } as any; + const packageName = PluginManager.getPackageName(name); + const packageJson = PluginManager.getPackageJson(packageName); + return { name, packageName, enabled: true, builtIn: true, version: packageJson.version } as any; }) - .concat(this.localPlugins.map((name) => ({ name }))); + .concat( + this.localPlugins.map((name) => { + const packageName = PluginManager.getPackageName(name); + const packageJson = PluginManager.getPackageJson(packageName); + return { name, packageName, version: packageJson.version }; + }), + ); } - async createIfNotExist() { + async createIfNotExists() { const repository = this.app.db.getRepository('applicationPlugins'); const existPlugins = await repository.find(); const existPluginNames = existPlugins.map((item) => item.name); @@ -92,11 +100,8 @@ export class PresetNocoBase extends Plugin { } async install() { - const repository = this.app.db.getRepository('applicationPlugins'); - const existPlugins = await repository.find(); - const existPluginNames = existPlugins.map((item) => item.name); - const plugins = this.allPlugins.filter((item) => !existPluginNames.includes(item.name)); - await repository.create({ values: plugins }); + const repository = this.db.getRepository('applicationPlugins'); + await this.createIfNotExists(); this.log.debug('install preset plugins'); await repository.init(); await this.app.pm.load(); diff --git a/storage/.gitignore b/storage/.gitignore index bde6210e9..f07f9574d 100644 --- a/storage/.gitignore +++ b/storage/.gitignore @@ -1 +1,3 @@ -.pm2 \ No newline at end of file +.pm2 +tmp +app.watch.ts \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index f9bcb1a7a..77419b51e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,33 +18,14 @@ "downlevelIteration": true, "baseUrl": ".", "paths": { - "@nocobase/app-*": [ - "packages/app/*/src" - ], - "@nocobase/plugin-sample-*": [ - "packages/samples/*/src" - ], - "@nocobase/plugin-pro-*": [ - "packages/pro-plugins/*/src" - ], - "@nocobase/plugin-*": [ - "packages/plugins/*/src" - ], - "@nocobase/preset-*": [ - "packages/presets/*/src" - ], - "@nocobase/evaluators/client": [ - "packages/core/evaluators/src/client" - ], - "@nocobase/utils/client": [ - "packages/core/utils/src/client" - ], - "@nocobase/*": [ - "packages/core/*/src" - ], - "@@/*": [ - ".dumi/tmp/*" - ] + "@nocobase/app-*": ["packages/app/*/src"], + "@nocobase/plugin-*": ["packages/plugins/@nocobase/plugin-*/src"], + "@nocobase/preset-*": ["packages/presets/*/src"], + "@nocobase/evaluators/client": ["packages/core/evaluators/src/client"], + "@nocobase/utils/plugin-symlink": ["packages/core/utils/plugin-symlink"], + "@nocobase/utils/client": ["packages/core/utils/src/client"], + "@nocobase/*": ["packages/core/*/src"], + "@@/*": [".dumi/tmp/*"] } }, "ts-node": { @@ -52,12 +33,7 @@ "module": "commonjs" } }, - "include": [ - "packages/**/*", - ".dumi/**/*", - ".dumirc.ts", - "scripts/setupVitest.ts" - ], + "include": ["packages/**/*", ".dumi/**/*", ".dumirc.ts", "scripts/setupVitest.ts"], "exclude": [ "packages/**/node_modules", "packages/**/dist", diff --git a/yarn.lock b/yarn.lock index a5ddcd6f9..605d3a154 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5659,6 +5659,13 @@ dependencies: "@types/ms" "*" +"@types/decompress@4.2.4": + version "4.2.4" + resolved "https://registry.npmmirror.com/@types/decompress/-/decompress-4.2.4.tgz#dd2715d3ac1f566d03e6e302d1a26ffab59f8c5c" + integrity sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA== + dependencies: + "@types/node" "*" + "@types/ejs@^3.1.1": version "3.1.2" resolved "https://registry.npmmirror.com/@types/ejs/-/ejs-3.1.2.tgz#75d277b030bc11b3be38c807e10071f45ebc78d9" @@ -5768,6 +5775,11 @@ version "2.0.1" resolved "https://registry.npmmirror.com/@types/http-errors/-/http-errors-2.0.1.tgz#20172f9578b225f6c7da63446f56d4ce108d5a65" +"@types/ini@^1.3.31": + version "1.3.31" + resolved "https://registry.npmmirror.com/@types/ini/-/ini-1.3.31.tgz#c78541a187bd88d5c73e990711c9d85214800d1b" + integrity sha512-8ecxxaG4AlVEM1k9+BsziMw8UsX0qy3jYI1ad/71RrDZ+rdL6aZB0wLfAuflQiDhkD5o4yJ0uPK3OSUic3fG0w== + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.4" resolved "https://registry.npmmirror.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" @@ -6137,6 +6149,14 @@ dependencies: "@types/superagent" "*" +"@types/tar@^6.1.5": + version "6.1.5" + resolved "https://registry.npmmirror.com/@types/tar/-/tar-6.1.5.tgz#90ccb3b6a35430e7427410d50eed564e85feaaff" + integrity sha512-qm2I/RlZij5RofuY7vohTpYNaYcrSQlN2MyjucQc7ZweDwaEWkdN/EeNh6e9zjK6uEm6PwjdMXkcj05BxZdX1Q== + dependencies: + "@types/node" "*" + minipass "^4.0.0" + "@types/testing-library__jest-dom@^5.9.1": version "5.14.6" resolved "https://registry.npmmirror.com/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.6.tgz#4887f6e1af11215428ab02777873bcede98a53b0" @@ -10076,7 +10096,7 @@ decompress-unzip@^4.0.1: pify "^2.3.0" yauzl "^2.4.2" -decompress@^4.2.1: +decompress@4.2.1, decompress@^4.2.1: version "4.2.1" resolved "https://registry.npmmirror.com/decompress/-/decompress-4.2.1.tgz#007f55cc6a62c055afa37c07eb6a4ee1b773f118" dependencies: @@ -11647,7 +11667,7 @@ fast-glob@3.2.12: merge2 "^1.3.0" micromatch "^4.0.4" -fast-glob@3.3.0, fast-glob@^3.2.11, fast-glob@^3.2.12, fast-glob@^3.2.9: +fast-glob@^3.2.11, fast-glob@^3.2.12, fast-glob@^3.2.9: version "3.3.0" resolved "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.3.0.tgz#7c40cb491e1e2ed5664749e87bfb516dbe8727c0" dependencies: @@ -11657,6 +11677,17 @@ fast-glob@3.3.0, fast-glob@^3.2.11, fast-glob@^3.2.12, fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@^3.3.1: + version "3.3.1" + resolved "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" + integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-patch@^3.0.0-1: version "3.1.1" resolved "https://registry.npmmirror.com/fast-json-patch/-/fast-json-patch-3.1.1.tgz#85064ea1b1ebf97a3f7ad01e23f9337e72c66947" @@ -13415,6 +13446,11 @@ ini@^1.3.2, ini@^1.3.3, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: version "1.3.8" resolved "https://registry.npmmirror.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" +ini@^4.1.1: + version "4.1.1" + resolved "https://registry.npmmirror.com/ini/-/ini-4.1.1.tgz#d95b3d843b1e906e56d6747d5447904ff50ce7a1" + integrity sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g== + init-package-json@^2.0.2: version "2.0.5" resolved "https://registry.npmmirror.com/init-package-json/-/init-package-json-2.0.5.tgz#78b85f3c36014db42d8f32117252504f68022646" @@ -16756,6 +16792,11 @@ minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: dependencies: yallist "^4.0.0" +minipass@^4.0.0: + version "4.2.8" + resolved "https://registry.npmmirror.com/minipass/-/minipass-4.2.8.tgz#f0010f64393ecfc1d1ccb5f582bcaf45f48e1a3a" + integrity sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ== + minipass@^5.0.0: version "5.0.0" resolved "https://registry.npmmirror.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" @@ -18465,7 +18506,7 @@ pkg-types@^1.0.3: mlly "^1.2.0" pathe "^1.1.0" -pkg-up@3.1.0, pkg-up@^3.1.0: +pkg-up@^3.1.0: version "3.1.0" resolved "https://registry.npmmirror.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" dependencies: @@ -22008,6 +22049,18 @@ tar@^6.0.2, tar@^6.1.0, tar@^6.1.11, tar@^6.1.13, tar@^6.1.2: mkdirp "^1.0.3" yallist "^4.0.0" +tar@^6.2.0: + version "6.2.0" + resolved "https://registry.npmmirror.com/tar/-/tar-6.2.0.tgz#b14ce49a79cb1cd23bc9b016302dea5474493f73" + integrity sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^5.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + temp-dir@^1.0.0: version "1.0.0" resolved "https://registry.npmmirror.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d"