Merge branch 'next' into upgrade/antd

This commit is contained in:
Zeke Zhang 2024-11-06 15:23:59 +08:00
commit 03f4ed7456
105 changed files with 510 additions and 410 deletions

View File

@ -16,7 +16,7 @@ on:
default: beta
push:
tags:
- 'v*-beta'
- 'v*'
jobs:
write-changelog-and-release:
@ -25,11 +25,13 @@ jobs:
- name: Get info
id: get-info
run: |
if [[ "${{ inputs.version }}" == "alpha" ]]; then
if [[ "${{ inputs.version }}" == "alpha" || ${{ github.ref_name }} =~ "alpha" ]]; then
echo "branch=$(echo 'next')" >> $GITHUB_OUTPUT
echo "version=$(echo 'alpha')" >> $GITHUB_OUTPUT
echo "proRepos=$(echo '${{ vars.NEXT_PRO_PLUGIN_REPOS }}')" >> $GITHUB_OUTPUT
else
echo "branch=$(echo 'main')" >> $GITHUB_OUTPUT
echo "version=$(echo 'beta')" >> $GITHUB_OUTPUT
echo "proRepos=$(echo '${{ vars.PRO_PLUGIN_REPOS }}')" >> $GITHUB_OUTPUT
fi
- uses: actions/create-github-app-token@v1
@ -81,11 +83,12 @@ jobs:
- name: Run script
shell: bash
run: |
node scripts/release/changelogAndRelease.js --ver ${{ inputs.version }} --cmsURL ${{ secrets.CMS_URL }} --cmsToken ${{ secrets.CMS_TOKEN }}
node scripts/release/changelogAndRelease.js --ver ${{ steps.get-info.outputs.version }} --cmsURL ${{ secrets.CMS_URL }} --cmsToken ${{ secrets.CMS_TOKEN }}
env:
PRO_PLUGIN_REPOS: ${{ steps.get-info.outputs.proRepos }}
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Commit and push
if: ${{ steps.get-info.outputs.version == 'beta' }}
run: |
git pull origin main
git add .

View File

@ -0,0 +1,86 @@
name: Manual release next
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.NOCOBASE_APP_ID }}
private-key: ${{ secrets.NOCOBASE_APP_PRIVATE_KEY }}
repositories: nocobase,pro-plugins,${{ join(fromJSON(vars.NEXT_PRO_PLUGIN_REPOS), ',') }},${{ join(fromJSON(vars.CUSTOM_PRO_PLUGIN_REPOS), ',') }}
skip-token-revoke: true
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Checkout
uses: actions/checkout@v4
with:
repository: nocobase/nocobase
token: ${{ steps.app-token.outputs.token }}
persist-credentials: true
fetch-depth: 0
ref: next
- name: Checkout pro-plugins
uses: actions/checkout@v4
with:
repository: nocobase/pro-plugins
path: packages/pro-plugins
fetch-depth: 0
ref: next
token: ${{ steps.app-token.outputs.token }}
persist-credentials: true
- name: Clone pro repos
shell: bash
run: |
for repo in ${{ join(fromJSON(vars.NEXT_PRO_PLUGIN_REPOS), ' ') }} ${{ join(fromJSON(vars.CUSTOM_PRO_PLUGIN_REPOS), ' ') }}
do
git clone -b next https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo
done
- name: Set Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Lerna
run: npm install -g lerna@4 auto-changelog@2
- name: Run release.sh
shell: bash
run: |
cd ./packages/pro-plugins
git checkout next
for repo in ${{ join(fromJSON(vars.NEXT_PRO_PLUGIN_REPOS), ' ') }} ${{ join(fromJSON(vars.CUSTOM_PRO_PLUGIN_REPOS), ' ') }}
do
echo "@nocobase/$repo" >> .git/info/exclude
done
echo "$(<.git/info/exclude )"
cd ./../..
git checkout next
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
echo "packages/pro-plugins" >> .git/info/exclude
bash release.sh
env:
PRO_PLUGIN_REPOS: ${{ vars.NEXT_PRO_PLUGIN_REPOS }}
CUSTOM_PRO_PLUGIN_REPOS: ${{ vars.CUSTOM_PRO_PLUGIN_REPOS }}
- name: Push
run: |
for repo in ${{ join(fromJSON(vars.NEXT_PRO_PLUGIN_REPOS), ' ') }} ${{ join(fromJSON(vars.CUSTOM_PRO_PLUGIN_REPOS), ' ') }}
do
cd ./packages/pro-plugins/@nocobase/$repo
git push origin next --atomic --tags
cd ../../../../
done
cd ./packages/pro-plugins
git push origin next --atomic --tags
cd ../../
git push origin next --tags --atomic

View File

@ -6,10 +6,6 @@ concurrency:
on:
workflow_dispatch:
inputs:
is_feat:
description: 'is feat'
type: boolean
jobs:
pre-merge-main-into-next:
@ -110,9 +106,8 @@ jobs:
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
echo "packages/pro-plugins" >> .git/info/exclude
bash release.sh $IS_FEAT
bash release.sh
env:
IS_FEAT: ${{ inputs.is_feat && '--is-feat' || '' }}
PRO_PLUGIN_REPOS: ${{ vars.PRO_PLUGIN_REPOS }}
CUSTOM_PRO_PLUGIN_REPOS: ${{ vars.CUSTOM_PRO_PLUGIN_REPOS }}
- name: Push and merge into next

View File

@ -1,160 +0,0 @@
name: Release next
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- name: Set Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.NOCOBASE_APP_ID }}
private-key: ${{ secrets.NOCOBASE_APP_PRIVATE_KEY }}
repositories: nocobase,pro-plugins,${{ join(fromJSON(vars.NEXT_PRO_PLUGIN_REPOS), ',') }},${{ join(fromJSON(vars.CUSTOM_PRO_PLUGIN_REPOS), ',') }}
skip-token-revoke: true
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Checkout
uses: actions/checkout@v4
with:
repository: nocobase/nocobase
ref: next
token: ${{ steps.app-token.outputs.token }}
persist-credentials: true
fetch-depth: 0
- name: Send curl request and parse response
env:
PKG_USERNAME: ${{ secrets.PKG_USERNAME }}
PKG_PASSWORD: ${{ secrets.PKG_PASSWORD }}
run: |
mkdir git-ci-cache
apt-get update && apt-get install -y jq gh
response1=$(curl -s 'https://pkg.nocobase.com/-/verdaccio/sec/login' \
-H 'content-type: application/json' \
--data-raw '{"username":"'$PKG_USERNAME'","password":"'$PKG_PASSWORD'"}')
token1=$(echo $response1 | jq -r '.token')
response2=$(curl -s 'https://pkg-src.nocobase.com/-/verdaccio/sec/login' \
-H 'content-type: application/json' \
--data-raw '{"username":"'$PKG_USERNAME'","password":"'$PKG_PASSWORD'"}')
token2=$(echo $response2 | jq -r '.token')
echo "PKG_NOCOBASE_TOKEN=$token1" >> $GITHUB_ENV
echo "PKG_SRC_NOCOBASE_TOKEN=$token2" >> $GITHUB_ENV
- name: restore cache
id: cache
uses: actions/cache@v3
with:
path: ./git-ci-cache
key: new-next-version-${{ github.run_id }}
- name: Set NEWVERSION variable
id: set_version
run: |
cd ./git-ci-cache
if [ -f newversion.txt ]; then
NEWVERSION=$(cat newversion.txt)
else
NEWVERSION=$(cat ../lerna.json | jq -r '.version').$(date +'%Y%m%d%H%M%S')
echo "$NEWVERSION" > newversion.txt
fi
echo "NEWVERSION=$NEWVERSION" >> $GITHUB_ENV
- name: Print NEWVERSION
run: echo "The new version is ${{ env.NEWVERSION }}"
- name: Save NEWVERSION to cache
run: echo "NEWVERSION=$NEWVERSION" >> ./git-ci-cache/newversion.txt
- name: save cache
id: save-cache
uses: actions/cache/save@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ./git-ci-cache
key: new-next-version-${{ github.run_id }}
- name: publish npmjs.org
continue-on-error: true
run: |
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
git config --global --add safe.directory /__w/nocobase/nocobase
npm config set access public
npm config set registry https://registry.npmjs.org/
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
yarn config set access public
yarn config set registry https://registry.npmjs.org/
yarn config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
yarn install
yarn lerna version ${{ env.NEWVERSION }} -y --no-git-tag-version
yarn build
echo "# test" >> Release.md
git add .
git commit -m "chore(versions): test publish packages xxx"
cat lerna.json
yarn release:force --no-verify-access --no-git-reset --registry https://registry.npmjs.org/ --dist-tag=next
- name: Checkout pro-plugins
uses: actions/checkout@v3
with:
repository: nocobase/pro-plugins
path: packages/pro-plugins
ref: next
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
- name: Clone pro repos
shell: bash
run: |
for repo in ${{ join(fromJSON(vars.NEXT_PRO_PLUGIN_REPOS), ' ') }} ${{ join(fromJSON(vars.CUSTOM_PRO_PLUGIN_REPOS), ' ') }}
do
git clone -b next https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo
done
- name: Build Pro plugins
run: |
yarn config set registry https://registry.npmjs.org/
yarn install
yarn lerna version ${{ env.NEWVERSION }} -y --no-git-tag-version
yarn build packages/pro-plugins
- name: publish pkg.nocobase.com
run: |
git reset --hard
npm config set //pkg.nocobase.com/:_authToken=${{ env.PKG_NOCOBASE_TOKEN }}
yarn release:force --no-verify-access --no-git-reset --registry https://pkg.nocobase.com --dist-tag=next
- name: publish pkg-src.nocobase.com
run: |
git reset --hard
bash generate-npmignore.sh ignore-src
npm config set //pkg-src.nocobase.com/:_authToken=${{ env.PKG_SRC_NOCOBASE_TOKEN }}
yarn release:force --no-verify-access --no-git-reset --registry https://pkg-src.nocobase.com --dist-tag=next
- name: Tag
run: |
git reset --hard HEAD~
git tag v${{ env.NEWVERSION }}
git push origin v${{ env.NEWVERSION }}
cd ./packages/pro-plugins
git reset --hard
git tag v${{ env.NEWVERSION }}
git push origin v${{ env.NEWVERSION }}
cd ../../
for repo in ${{ join(fromJSON(vars.NEXT_PRO_PLUGIN_REPOS), ' ') }} ${{ join(fromJSON(vars.CUSTOM_PRO_PLUGIN_REPOS), ' ') }}
do
cd ./packages/pro-plugins/@nocobase/$repo
git reset --hard
git tag v${{ env.NEWVERSION }}
git push origin v${{ env.NEWVERSION }}
cd ../../../../
done
- name: Run release script
shell: bash
run: |
git fetch
node scripts/release/changelogAndRelease.js --ver alpha --cmsURL ${{ secrets.CMS_URL }} --cmsToken ${{ secrets.CMS_TOKEN }}
env:
PRO_PLUGIN_REPOS: ${{ vars.NEXT_PRO_PLUGIN_REPOS }}
GH_TOKEN: ${{ steps.app-token.outputs.token }}

View File

@ -5,24 +5,35 @@ concurrency:
cancel-in-progress: true
on:
workflow_dispatch:
push:
tags:
- 'v*-beta'
- 'v*'
jobs:
publish-npm:
runs-on: ubuntu-latest
container: node:18
steps:
- name: Get info
id: get-info
run: |
if [[ "${{ github.ref_name }}" =~ "beta" ]]; then
echo "proRepos=$(echo '${{ vars.PRO_PLUGIN_REPOS }}')" >> $GITHUB_OUTPUT
else
echo "proRepos=$(echo '${{ vars.NEXT_PRO_PLUGIN_REPOS }}')" >> $GITHUB_OUTPUT
fi
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.NOCOBASE_APP_ID }}
private-key: ${{ secrets.NOCOBASE_APP_PRIVATE_KEY }}
repositories: nocobase,pro-plugins,${{ join(fromJSON(vars.PRO_PLUGIN_REPOS), ',') }},${{ join(fromJSON(vars.CUSTOM_PRO_PLUGIN_REPOS), ',') }}
repositories: nocobase,pro-plugins,${{ join(fromJSON(steps.get-info.outputs.proRepos), ',') }},${{ join(fromJSON(vars.CUSTOM_PRO_PLUGIN_REPOS), ',') }}
skip-token-revoke: true
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- name: Send curl request and parse response
env:
PKG_USERNAME: ${{ secrets.PKG_USERNAME }}
@ -67,13 +78,14 @@ jobs:
with:
repository: nocobase/pro-plugins
path: packages/pro-plugins
ref: ${{ github.ref_name }}
token: ${{ steps.app-token.outputs.token }}
- name: Clone pro repos
shell: bash
run: |
for repo in ${{ join(fromJSON(vars.PRO_PLUGIN_REPOS), ' ') }} ${{ join(fromJSON(vars.CUSTOM_PRO_PLUGIN_REPOS), ' ') }}
for repo in ${{ join(fromJSON(steps.get-info.outputs.proRepos), ' ') }} ${{ join(fromJSON(vars.CUSTOM_PRO_PLUGIN_REPOS), ' ') }}
do
git clone -b main https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo
git clone -b ${{ github.ref_name }} https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo
done
- name: Build Pro plugins
run: |
@ -95,6 +107,14 @@ jobs:
runs-on: ubuntu-latest
needs: publish-npm
steps:
- name: Get info
id: get-info
run: |
if [[ "${{ github.ref_name }}" =~ "beta" ]]; then
echo "defaultTag=$(echo 'latest')" >> $GITHUB_OUTPUT
else
echo "defaultTag=$(echo 'next')" >> $GITHUB_OUTPUT
fi
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
@ -129,4 +149,4 @@ jobs:
context: ./docker/nocobase
platforms: linux/amd64,linux/arm64
push: true
tags: nocobase/nocobase:latest,${{ steps.meta.outputs.tags }},${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}/nocobase/nocobase:latest,${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}/${{ steps.meta.outputs.tags }}
tags: nocobase/nocobase:${{ steps.get-info.outputs.defaultTag }},${{ steps.meta.outputs.tags }},${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}/nocobase/nocobase:${{ steps.get-info.outputs.defaultTag }},${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}/${{ steps.meta.outputs.tags }}

View File

@ -1,5 +1,5 @@
{
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"npmClient": "yarn",
"useWorkspaces": true,
"npmClientArgs": ["--ignore-engines"],

View File

@ -1,13 +1,13 @@
{
"name": "@nocobase/acl",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"dependencies": {
"@nocobase/resourcer": "1.4.0-alpha",
"@nocobase/utils": "1.4.0-alpha",
"@nocobase/resourcer": "1.4.0-alpha.1",
"@nocobase/utils": "1.4.0-alpha.1",
"minimatch": "^5.1.1"
},
"repository": {

View File

@ -1,14 +1,14 @@
{
"name": "@nocobase/actions",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"dependencies": {
"@nocobase/cache": "1.4.0-alpha",
"@nocobase/database": "1.4.0-alpha",
"@nocobase/resourcer": "1.4.0-alpha"
"@nocobase/cache": "1.4.0-alpha.1",
"@nocobase/database": "1.4.0-alpha.1",
"@nocobase/resourcer": "1.4.0-alpha.1"
},
"repository": {
"type": "git",

View File

@ -1,17 +1,17 @@
{
"name": "@nocobase/app",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"dependencies": {
"@nocobase/database": "1.4.0-alpha",
"@nocobase/preset-nocobase": "1.4.0-alpha",
"@nocobase/server": "1.4.0-alpha"
"@nocobase/database": "1.4.0-alpha.1",
"@nocobase/preset-nocobase": "1.4.0-alpha.1",
"@nocobase/server": "1.4.0-alpha.1"
},
"devDependencies": {
"@nocobase/client": "1.4.0-alpha"
"@nocobase/client": "1.4.0-alpha.1"
},
"repository": {
"type": "git",

View File

@ -1,16 +1,16 @@
{
"name": "@nocobase/auth",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"dependencies": {
"@nocobase/actions": "1.4.0-alpha",
"@nocobase/cache": "1.4.0-alpha",
"@nocobase/database": "1.4.0-alpha",
"@nocobase/resourcer": "1.4.0-alpha",
"@nocobase/utils": "1.4.0-alpha",
"@nocobase/actions": "1.4.0-alpha.1",
"@nocobase/cache": "1.4.0-alpha.1",
"@nocobase/database": "1.4.0-alpha.1",
"@nocobase/resourcer": "1.4.0-alpha.1",
"@nocobase/utils": "1.4.0-alpha.1",
"@types/jsonwebtoken": "^8.5.8",
"jsonwebtoken": "^8.5.1"
},

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/build",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "Library build tool based on rollup.",
"main": "lib/index.js",
"types": "./lib/index.d.ts",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/cache",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",

View File

@ -11,6 +11,14 @@ if (require('semver').satisfies(process.version, '<16')) {
process.exit(1);
}
if (__dirname.includes(' ')) {
console.error(chalk.red(`[nocobase cli]: PathError: Invalid path "${process.cwd()}"`));
console.error(
chalk.red('[nocobase cli]: PathError: The path cannot contain spaces. Please modify the path and try again.'),
);
process.exit(1);
}
// if (require('semver').satisfies(process.version, '>16') && !process.env.UNSET_NODE_OPTIONS) {
// if (process.env.NODE_OPTIONS) {
// let opts = process.env.NODE_OPTIONS;

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/cli",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "",
"license": "AGPL-3.0",
"main": "./src/index.js",
@ -8,7 +8,7 @@
"nocobase": "./bin/index.js"
},
"dependencies": {
"@nocobase/app": "1.4.0-alpha",
"@nocobase/app": "1.4.0-alpha.1",
"@types/fs-extra": "^11.0.1",
"@umijs/utils": "3.5.20",
"chalk": "^4.1.1",
@ -25,7 +25,7 @@
"tsx": "^4.19.0"
},
"devDependencies": {
"@nocobase/devtools": "1.4.0-alpha"
"@nocobase/devtools": "1.4.0-alpha.1"
},
"repository": {
"type": "git",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/client",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "lib/index.js",
"module": "es/index.mjs",
@ -11,7 +11,7 @@
"@ant-design/icons": "^5.1.4",
"@ant-design/pro-layout": "^7.16.11",
"@antv/g2plot": "^2.4.18",
"@budibase/handlebars-helpers": "^0.13.2",
"@budibase/handlebars-helpers": "^0.14.0",
"@ctrl/tinycolor": "^3.6.0",
"@dnd-kit/core": "^5.0.1",
"@dnd-kit/modifiers": "^6.0.0",
@ -27,13 +27,13 @@
"@formily/reactive-react": "^2.2.27",
"@formily/shared": "^2.2.27",
"@formily/validator": "^2.2.27",
"@nocobase/evaluators": "1.4.0-alpha",
"@nocobase/sdk": "1.4.0-alpha",
"@nocobase/utils": "1.4.0-alpha",
"@nocobase/evaluators": "1.4.0-alpha.1",
"@nocobase/sdk": "1.4.0-alpha.1",
"@nocobase/utils": "1.4.0-alpha.1",
"ahooks": "^3.7.2",
"antd": "5.13.3",
"axios": "^1.7.0",
"antd-style": "3.7.1",
"axios": "^1.7.0",
"bignumber.js": "^9.1.2",
"classnames": "^2.3.1",
"cronstrue": "^2.11.0",

View File

@ -345,7 +345,7 @@ export const useACLFieldWhitelist = () => {
return {
whitelist,
schemaInWhitelist: useCallback(
(fieldSchema: Schema, isSkip?) => {
(fieldSchema: Schema | any, isSkip?) => {
if (isSkip) {
return true;
}
@ -359,7 +359,8 @@ export const useACLFieldWhitelist = () => {
return true;
}
const [key1, key2] = fieldSchema['x-collection-field'].split('.');
return whitelist?.includes(key2 || key1);
const [associationField] = fieldSchema['name'].split('.');
return whitelist?.includes(associationField || key2 || key1);
},
[whitelist],
),

View File

@ -446,14 +446,7 @@ export function Uploader({ rules, ...props }: UploadProps) {
</Tooltip>
</div>
{selectable && QRCodeUploader && (
<QRCodeUploader
value={value}
onChange={(value) => {
// TODO
console.log(value);
// onChange(value);
}}
/>
<QRCodeUploader disabled={disabled} multiple={multiple} value={value} onChange={onChange} />
)}
</>
);

View File

@ -1,6 +1,6 @@
{
"name": "create-nocobase-app",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "src/index.js",
"license": "AGPL-3.0",
"dependencies": {

View File

@ -1,16 +1,16 @@
{
"name": "@nocobase/data-source-manager",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"dependencies": {
"@nocobase/actions": "1.4.0-alpha",
"@nocobase/cache": "1.4.0-alpha",
"@nocobase/database": "1.4.0-alpha",
"@nocobase/resourcer": "1.4.0-alpha",
"@nocobase/utils": "1.4.0-alpha",
"@nocobase/actions": "1.4.0-alpha.1",
"@nocobase/cache": "1.4.0-alpha.1",
"@nocobase/database": "1.4.0-alpha.1",
"@nocobase/resourcer": "1.4.0-alpha.1",
"@nocobase/utils": "1.4.0-alpha.1",
"@types/jsonwebtoken": "^8.5.8",
"jsonwebtoken": "^8.5.1"
},

View File

@ -1,13 +1,13 @@
{
"name": "@nocobase/database",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"license": "AGPL-3.0",
"dependencies": {
"@nocobase/logger": "1.4.0-alpha",
"@nocobase/utils": "1.4.0-alpha",
"@nocobase/logger": "1.4.0-alpha.1",
"@nocobase/utils": "1.4.0-alpha.1",
"async-mutex": "^0.3.2",
"chalk": "^4.1.1",
"cron-parser": "4.4.0",

View File

@ -19,7 +19,7 @@ export class ToOneInterface extends BaseInterface {
return null;
}
const { filterKey, targetCollection, transaction } = ctx;
const { filterKey, associationField, targetCollection, transaction } = ctx;
const targetInstance = await targetCollection.repository.findOne({
filter: {
@ -31,8 +31,9 @@ export class ToOneInterface extends BaseInterface {
if (!targetInstance) {
throw new Error(`"${str}" not found in ${targetCollection.model.name} ${filterKey}`);
}
const primaryKeyAttribute = targetCollection.model.primaryKeyAttribute;
return targetInstance[primaryKeyAttribute];
const targetKey = associationField.targetKey || targetCollection.model.primaryKeyAttribute;
return targetInstance[targetKey];
}
}

View File

@ -1,13 +1,13 @@
{
"name": "@nocobase/devtools",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "",
"license": "AGPL-3.0",
"main": "./src/index.js",
"dependencies": {
"@nocobase/build": "1.4.0-alpha",
"@nocobase/client": "1.4.0-alpha",
"@nocobase/test": "1.4.0-alpha",
"@nocobase/build": "1.4.0-alpha.1",
"@nocobase/client": "1.4.0-alpha.1",
"@nocobase/test": "1.4.0-alpha.1",
"@types/koa": "^2.13.4",
"@types/koa-bodyparser": "^4.3.4",
"@types/lodash": "^4.14.177",

View File

@ -1,13 +1,13 @@
{
"name": "@nocobase/evaluators",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"license": "AGPL-3.0",
"dependencies": {
"@formulajs/formulajs": "4.2.0",
"@nocobase/utils": "1.4.0-alpha",
"@nocobase/utils": "1.4.0-alpha.1",
"mathjs": "^10.6.0"
},
"repository": {

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/logger",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "nocobase logging library",
"license": "AGPL-3.0",
"main": "./lib/index.js",

View File

@ -1,12 +1,12 @@
{
"name": "@nocobase/resourcer",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"license": "AGPL-3.0",
"dependencies": {
"@nocobase/utils": "1.4.0-alpha",
"@nocobase/utils": "1.4.0-alpha.1",
"deepmerge": "^4.2.2",
"koa-compose": "^4.1.0",
"lodash": "^4.17.21",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/sdk",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "lib/index.js",
"types": "lib/index.d.ts",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/server",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "lib/index.js",
"types": "./lib/index.d.ts",
"license": "AGPL-3.0",
@ -10,18 +10,18 @@
"@koa/cors": "^3.1.0",
"@koa/multer": "^3.0.2",
"@koa/router": "^9.4.0",
"@nocobase/acl": "1.4.0-alpha",
"@nocobase/actions": "1.4.0-alpha",
"@nocobase/auth": "1.4.0-alpha",
"@nocobase/cache": "1.4.0-alpha",
"@nocobase/data-source-manager": "1.4.0-alpha",
"@nocobase/database": "1.4.0-alpha",
"@nocobase/evaluators": "1.4.0-alpha",
"@nocobase/logger": "1.4.0-alpha",
"@nocobase/resourcer": "1.4.0-alpha",
"@nocobase/sdk": "1.4.0-alpha",
"@nocobase/telemetry": "1.4.0-alpha",
"@nocobase/utils": "1.4.0-alpha",
"@nocobase/acl": "1.4.0-alpha.1",
"@nocobase/actions": "1.4.0-alpha.1",
"@nocobase/auth": "1.4.0-alpha.1",
"@nocobase/cache": "1.4.0-alpha.1",
"@nocobase/data-source-manager": "1.4.0-alpha.1",
"@nocobase/database": "1.4.0-alpha.1",
"@nocobase/evaluators": "1.4.0-alpha.1",
"@nocobase/logger": "1.4.0-alpha.1",
"@nocobase/resourcer": "1.4.0-alpha.1",
"@nocobase/sdk": "1.4.0-alpha.1",
"@nocobase/telemetry": "1.4.0-alpha.1",
"@nocobase/utils": "1.4.0-alpha.1",
"@types/decompress": "4.2.7",
"@types/ini": "^1.3.31",
"@types/koa-send": "^4.1.3",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/telemetry",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "nocobase telemetry library",
"license": "AGPL-3.0",
"main": "./lib/index.js",
@ -11,7 +11,7 @@
"directory": "packages/telemetry"
},
"dependencies": {
"@nocobase/utils": "1.4.0-alpha",
"@nocobase/utils": "1.4.0-alpha.1",
"@opentelemetry/api": "^1.7.0",
"@opentelemetry/instrumentation": "^0.46.0",
"@opentelemetry/resources": "^1.19.0",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/test",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "lib/index.js",
"module": "./src/index.ts",
"types": "./lib/index.d.ts",
@ -51,7 +51,7 @@
},
"dependencies": {
"@faker-js/faker": "8.1.0",
"@nocobase/server": "1.4.0-alpha",
"@nocobase/server": "1.4.0-alpha.1",
"@playwright/test": "^1.45.3",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.0.0",

View File

@ -1,10 +1,11 @@
{
"name": "@nocobase/utils",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "lib/index.js",
"types": "./lib/index.d.ts",
"license": "AGPL-3.0",
"dependencies": {
"@budibase/handlebars-helpers": "^0.14.0",
"@hapi/topo": "^6.0.0",
"@rc-component/mini-decimal": "^1.1.0",
"dayjs": "^1.11.9",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "权限控制",
"description": "Based on roles, resources, and actions, access control can precisely manage interface configuration permissions, data operation permissions, menu access permissions, and plugin permissions.",
"description.zh-CN": "基于角色、资源和操作的权限控制,可以精确控制界面配置权限、数据操作权限、菜单访问权限、插件权限。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/acl",

View File

@ -43,6 +43,11 @@ function createWithACLMetaMiddleware() {
const Model = collection.model;
// skip if collection is multi filter target key
if (collection.isMultiFilterTargetKey()) {
return;
}
// @ts-ignore
const primaryKeyField = Model.primaryKeyField || Model.primaryKeyAttribute;
@ -136,6 +141,11 @@ function createWithACLMetaMiddleware() {
return listData.map((item) => item[primaryKeyField]);
})();
// if all ids are empty, skip
if (ids.filter(Boolean).length == 0) {
return;
}
const conditions = [];
const allAllowed = [];

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-action-bulk-edit",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-bulk-edit",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-bulk-edit",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-action-bulk-update",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-bulk-update",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-bulk-update",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-action-custom-request",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-custom-request",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-custom-request",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-action-duplicate",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-duplicate",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-duplicate",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "操作:导出记录",
"description": "Export filtered records to excel, you can configure which fields to export.",
"description.zh-CN": "导出筛选后的记录到 Excel 中,可以配置导出哪些字段。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-export",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "操作:导入记录",
"description": "Import records using excel templates. You can configure which fields to import and templates will be generated automatically.",
"description.zh-CN": "使用 Excel 模板导入数据,可以配置导入哪些字段,自动生成模板。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-import",

View File

@ -281,6 +281,151 @@ describe('xlsx importer', () => {
});
});
describe('import with belongs to association', async () => {
let Profile;
let User;
beforeEach(async () => {
Profile = app.db.collection({
name: 'profiles',
autoGenId: false,
fields: [
{
type: 'bigInt',
name: 'id',
primaryKey: true,
autoIncrement: true,
},
{
type: 'string',
name: 'name',
},
{
type: 'string',
name: 'userName',
},
{
type: 'belongsTo',
name: 'user',
target: 'users',
foreignKey: 'userName',
targetKey: 'name',
},
],
});
User = app.db.collection({
name: 'users',
autoGenId: false,
fields: [
{
type: 'bigInt',
name: 'id',
primaryKey: true,
autoIncrement: true,
},
{
type: 'string',
name: 'name',
unique: true,
},
],
});
await app.db.sync();
const user = await User.repository.create({
values: {
name: 'User1',
},
});
});
it('should import with foreignKey', async () => {
const columns = [
{
dataIndex: ['name'],
defaultTitle: '名称',
},
{
dataIndex: ['userName'],
defaultTitle: '用户名',
},
];
const templateCreator = new TemplateCreator({
collection: Profile,
columns,
});
const template = await templateCreator.run();
const worksheet = template.Sheets[template.SheetNames[0]];
XLSX.utils.sheet_add_aoa(worksheet, [['test', 'User1']], {
origin: 'A2',
});
const importer = new XlsxImporter({
collectionManager: app.mainDataSource.collectionManager,
collection: Profile,
columns,
workbook: template,
});
await importer.run();
const profile = await Profile.repository.findOne({
appends: ['user'],
});
expect(profile.get('user').get('name')).toBe('User1');
expect(profile.get('name')).toBe('test');
});
it('should import with association field', async () => {
const columns = [
{
dataIndex: ['name'],
defaultTitle: '名称',
},
{
dataIndex: ['user', 'name'],
defaultTitle: '用户名',
},
];
const templateCreator = new TemplateCreator({
collection: Profile,
columns,
});
const template = await templateCreator.run();
const worksheet = template.Sheets[template.SheetNames[0]];
XLSX.utils.sheet_add_aoa(worksheet, [['test', 'User1']], {
origin: 'A2',
});
const importer = new XlsxImporter({
collectionManager: app.mainDataSource.collectionManager,
collection: Profile,
columns,
workbook: template,
});
await importer.run();
const profile = await Profile.repository.findOne({
appends: ['user'],
});
expect(profile.get('user').get('name')).toBe('User1');
expect(profile.get('name')).toBe('test');
});
});
describe('import with associations', () => {
let User;
let Post;

View File

@ -172,6 +172,7 @@ export class XlsxImporter extends EventEmitter {
};
if (column.dataIndex.length > 1) {
ctx.associationField = field;
ctx.targetCollection = (field as IRelationField).targetCollection();
ctx.filterKey = column.dataIndex[1];
}

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-action-print",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-print",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-print",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-api-doc",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"displayName": "API documentation",
"displayName.zh-CN": "API 文档",
"description": "An OpenAPI documentation generator for NocoBase HTTP API.",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "认证API 密钥",
"description": "Allows users to use API key to access application's HTTP API",
"description.zh-CN": "允许用户使用 API 密钥访问应用的 HTTP API",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/api-keys",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-audit-logs",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"displayName": "Audit logs (deprecated)",
"displayName.zh-CN": "审计日志(废弃)",
"description": "This plugin is deprecated. There will be a new audit log plugin in the future.",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "认证:短信",
"description": "SMS authentication.",
"description.zh-CN": "通过短信验证码认证身份。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/auth-sms",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/auth-sms",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-auth",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/auth",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/auth",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "应用的备份与还原(废弃)",
"description": "Backup and restore applications for scenarios such as application replication, migration, and upgrades.",
"description.zh-CN": "备份和还原应用,可用于应用的复制、迁移、升级等场景。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/backup-restore",

View File

@ -4,7 +4,7 @@
"displayName.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": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/block-iframe",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-block-workbench",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"displayName": "Block: Action panel",
"displayName.zh-CN": "区块:操作面板",
"description": "Centrally manages and displays various actions, allowing users to efficiently perform tasks. It supports extensibility, with current action types including pop-ups, links, scanning, and custom requests.",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-calendar",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"displayName": "Calendar",
"displayName.zh-CN": "日历",
"description": "Provides callendar collection template and block for managing date data, typically for date/time related information such as events, appointments, tasks, and so on.",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "图表(废弃)",
"description": "The plugin has been deprecated, please use the data visualization plugin instead.",
"description.zh-CN": "已废弃插件,请使用数据可视化插件代替。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "./dist/server/index.js",
"license": "AGPL-3.0",
"devDependencies": {

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "WEB 客户端",
"description": "Provides a client interface for the NocoBase server",
"description.zh-CN": "为 NocoBase 服务端提供客户端界面",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "./dist/server/index.js",
"license": "AGPL-3.0",
"devDependencies": {

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "数据表: SQL",
"description": "Provides SQL collection template",
"description.zh-CN": "提供 SQL 数据表模板",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"homepage": "https://docs-cn.nocobase.com/handbook/collection-sql",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/collection-sql",
"main": "dist/server/index.js",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-collection-tree",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"displayName": "Collection: Tree",
"displayName.zh-CN": "数据表:树",
"description": "Provides tree collection template",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "数据源:主数据库",
"description": "NocoBase main database, supports relational databases such as PostgreSQL, MySQL, MariaDB and so on.",
"description.zh-CN": "NocoBase 主数据库,支持 PostgreSQL、MySQL、MariaDB 等关系型数据库。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/data-source-main",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/data-source-main",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-data-source-manager",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "dist/server/index.js",
"displayName": "Data source manager",
"displayName.zh-CN": "数据源管理",
@ -12,8 +12,7 @@
"@nocobase/client": "1.x",
"@nocobase/plugin-acl": "1.x",
"@nocobase/server": "1.x",
"@nocobase/test": "1.x",
"@nocobase/plugin-acl": "1.x"
"@nocobase/test": "1.x"
},
"keywords": [
"Data model tools"

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-data-visualization",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"displayName": "Data visualization",
"displayName.zh-CN": "数据可视化",
"description": "Provides data visualization feature, including chart block and chart filter block, support line charts, area charts, bar charts and more than a dozen kinds of charts, you can also extend more chart types.",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-disable-pm-add",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "./dist/server/index.js",
"peerDependencies": {
"@nocobase/client": "1.x",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "错误处理器",
"description": "Handling application errors and exceptions.",
"description.zh-CN": "处理应用程序中的错误和异常。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-field-china-region",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"displayName": "Administrative divisions of China",
"displayName.zh-CN": "中国行政区划",
"description": "Provides data and field type for administrative divisions of China.",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "数据表字段:公式",
"description": "Configure and store the results of calculations between multiple field values in the same record, supporting both Math.js and Excel formula functions.",
"description.zh-CN": "可以配置并存储同一条记录的多字段值之间的计算结果,支持 Math.js 和 Excel formula functions 两种引擎",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/field-formula",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "数据表字段:多对多 (数组)",
"description": "Allows to create many to many relationships between two models by storing an array of unique keys of the target model.",
"description.zh-CN": "支持通过在数组中存储目标表唯一键的方式建立多对多关系。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "dist/server/index.js",
"peerDependencies": {
"@nocobase/client": "1.x",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "数据表字段Markdown(Vditor)",
"description": "Used to store Markdown and render it using Vditor editor, supports common Markdown syntax such as list, code, quote, etc., and supports uploading images, recordings, etc.It also allows for instant rendering, where what you see is what you get.",
"description.zh-CN": "用于存储 Markdown并使用 Vditor 编辑器渲染,支持常见 Markdown 语法,如列表,代码,引用等,并支持上传图片,录音等。同时可以做到即时渲染,所见即所得。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/field-markdown-vditor",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "数据表字段:自动编码",
"description": "Automatically generate codes based on configured rules, supporting combinations of dates, numbers, and text.",
"description.zh-CN": "根据配置的规则自动生成编码,支持日期、数字、文本的组合。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/field-sequence",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-file-manager",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"displayName": "File manager",
"displayName.zh-CN": "文件管理器",
"description": "Provides files storage services with files collection template and attachment field.",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-gantt",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"displayName": "Block: Gantt",
"displayName.zh-CN": "区块:甘特图",
"description": "Provides Gantt block.",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "可视化数据表管理",
"description": "An ER diagram-like tool. Currently only the Master database is supported.",
"description.zh-CN": "类似 ER 图的工具,目前只支持主数据库。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/graph-collection-manager",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-kanban",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/block-kanban",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/block-kanban",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-localization",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/localization-management",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/localization-management",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "日志",
"description": "Server-side logs, mainly including API request logs and system runtime logs, and allows to package and download log files.",
"description.zh-CN": "服务端日志,主要包括接口请求日志和系统运行日志,并支持打包和下载日志文件。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/logger",

View File

@ -2,7 +2,7 @@
"name": "@nocobase/plugin-map",
"displayName": "Block: Map",
"displayName.zh-CN": "区块:地图",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "Map block, support Gaode map and Google map, you can also extend more map types.",
"description.zh-CN": "地图区块,支持高德地图和 Google 地图,你也可以扩展更多地图类型。",
"license": "AGPL-3.0",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-mobile-client",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/mobile-client",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/mobile-client",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-mobile",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/mobile",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/mobile",
@ -11,25 +11,25 @@
"description.zh-CN": "提供移动端页面配置的能力。",
"peerDependencies": {
"@nocobase/client": "1.x",
"@nocobase/plugin-acl": "1.x",
"@nocobase/server": "1.x",
"@nocobase/test": "1.x",
"@nocobase/plugin-acl": "1.x"
"@nocobase/test": "1.x"
},
"devDependencies": {
"@ant-design/icons": "5.x",
"@emotion/css": "11.x",
"@formily/antd-v5": "1.x",
"@formily/core": "2.x",
"@formily/react": "2.x",
"@formily/shared": "2.x",
"@types/react": "17.x",
"@types/react-dom": "17.x",
"ahooks": "3.x",
"antd": "5.x",
"antd-mobile": "^5.38",
"lodash": "4.x",
"re-resizable": "6.6.0",
"react-device-detect": "2.2.3",
"@emotion/css": "11.x",
"ahooks": "3.x",
"lodash": "4.x",
"@formily/core": "2.x",
"antd": "5.x",
"react-i18next": "11.x"
}
}

View File

@ -2,7 +2,7 @@
"name": "@nocobase/plugin-mock-collections",
"displayName": "mock-collections",
"description": "mock-collections",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "./dist/server/index.js",
"license": "AGPL-3.0",
"peerDependencies": {

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "多应用管理器",
"description": "Dynamically create multiple apps without separate deployments.",
"description.zh-CN": "无需单独部署即可动态创建多个应用。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/multi-app-manager",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "多应用数据表共享",
"description": "",
"description.zh-CN": "",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "./dist/server/index.js",
"devDependencies": {
"@formily/react": "2.x",

View File

@ -1,14 +1,14 @@
{
"name": "@nocobase/plugin-notification-email",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"displayName": "Notification: Email",
"displayName.zh-CN": "通知:电子邮件",
"description": "Used for sending email notifications with built-in SMTP transport.",
"description.zh-CN": "通过电子邮件渠道发送通知,目前只支持 SMTP 传输方式。",
"main": "dist/server/index.js",
"devDependencies": {
"nodemailer": "^6.x",
"@types/nodemailer": "^6.x"
"@types/nodemailer": "^6.x",
"nodemailer": "^6.x"
},
"peerDependencies": {
"@nocobase/client": "1.x",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-notification-in-app-message",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"displayName": "Notification: In-app message",
"displayName.zh-CN": "通知:站内信",
"description": "It supports users in receiving real-time message notifications within the NocoBase application.",

View File

@ -4,10 +4,8 @@
"description": "Provides a unified management service that includes channel configuration, logging, and other features, supporting the configuration of various notification channels, including in-app message and email.",
"displayName.zh-CN": "通知管理",
"description.zh-CN": "提供统一的管理服务,涵盖渠道配置、日志记录等功能,支持多种通知渠道的配置,包括站内信和电子邮件等。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "dist/server/index.js",
"dependencies": {
},
"devDependencies": {
"@ant-design/icons": "5.x",
"@formily/antd-v5": "^1.x",
@ -23,10 +21,10 @@
"@nocobase/actions": "1.x",
"@nocobase/client": "1.x",
"@nocobase/database": "1.x",
"@nocobase/plugin-workflow": ">=0.17.0-alpha.3",
"@nocobase/server": "1.x",
"@nocobase/test": "1.x",
"@nocobase/utils": "1.x",
"@nocobase/plugin-workflow": ">=0.17.0-alpha.3"
"@nocobase/utils": "1.x"
},
"keywords": [
"Notification"

View File

@ -51,6 +51,7 @@ export class NotificationManager implements NotificationManager {
const instance = new Channel(this.plugin.app);
logData.channelTitle = channel.title;
logData.notificationType = channel.notificationType;
logData.receivers = params.receivers;
const result = await instance.send({ message: params.message, channel, receivers: params.receivers });
logData.status = result.status;
logData.reason = result.reason;

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-notifications",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"description": "",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",

View File

@ -1,8 +1,7 @@
{
"name": "@nocobase/plugin-public-forms",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "dist/server/index.js",
"dependencies": {},
"displayName": "Public forms",
"displayName.zh-CN": "公开表单",
"description": "Share public forms externally to collect information from anonymous users",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-sample-hello",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "./dist/server/index.js",
"displayName": "Hello",
"displayName.zh-CN": "Hello",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "数据表字段:关系快照",
"description": "When adding a new record, create a snapshot for its relational record and save in the new record. The snapshot will not be updated when the relational record is updated.",
"description.zh-CN": "在添加数据时,为它的关系数据创建快照,并保存在当前的数据中。关系数据更新时,快照不会更新。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/field-snapshot",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "系统设置",
"description": "Used to adjust the system title, logo, language, etc.",
"description.zh-CN": "用于调整系统的标题、LOGO、语言等。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/system-settings",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-theme-editor",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/theme-editor",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/theme-editor",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "UI schema 存储服务",
"description": "Provides centralized UI schema storage service.",
"description.zh-CN": "提供中心化的 UI schema 存储服务。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/ui-schema-storage",

View File

@ -4,9 +4,8 @@
"displayName.zh-CN": "用户数据同步",
"description": "Provide user data source management and user data synchronization interface. The data source can be DingTalk, WeCom, etc., and can be expanded.",
"description.zh-CN": "提供用户数据源管理,用户数据同步接口,数据源可为钉钉、企业微信等,可扩展。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"main": "dist/server/index.js",
"dependencies": {},
"peerDependencies": {
"@nocobase/client": "1.x",
"@nocobase/server": "1.x",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "用户",
"description": "Provides basic user model, as well as created by and updated by fields.",
"description.zh-CN": "提供了基础的用户模型,以及创建人和最后更新人字段。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/users",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "验证码",
"description": "verification setting.",
"description.zh-CN": "验证码配置。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/verification",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "工作流:操作后事件",
"description": "Triggered after the completion of a request initiated through an action button or API, such as after adding, updating, deleting data, or \"submit to workflow\". Suitable for data processing, sending notifications, etc., after actions are completed.",
"description.zh-CN": "通过操作按钮或 API 发起请求并在执行完成后触发,比如新增、更新、删除数据或者“提交至工作流”之后。适用于在操作完成后进行数据处理、发送通知等。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/plugins/workflow-action-trigger",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "工作流:聚合查询节点",
"description": "Used to aggregate data against the database in workflow, such as: statistics, sum, average, etc.",
"description.zh-CN": "可用于在工作流中对数据库进行聚合查询,如:统计数量、求和、平均值等。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/workflow-aggregate",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "工作流:延时节点",
"description": "Could be used in workflow parallel branch for waiting other branches.",
"description.zh-CN": "可用于工作流并行分支中等待其他分支执行完成。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/workflow-delay",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "工作流:动态表达式计算节点",
"description": "Useful plugin for doing dynamic calculation based on expression collection records in workflow.",
"description.zh-CN": "用于在工作流中进行基于数据行的动态表达式计算。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/workflow-dynamic-calculation",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "工作流:循环节点",
"description": "Used to repeat the sub-process processing of each value in an array, and can also be used for fixed times of sub-process processing.",
"description.zh-CN": "用于对一个数组中的每个值进行重复的子流程处理,也可用于固定次数的重复子流程处理。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/workflow-loop",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "工作流:邮件发送节点",
"description": "Send email in workflow.",
"description.zh-CN": "可用于在工作流中发送电子邮件。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/workflow-smtp-mailer",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "工作流:人工处理节点",
"description": "Could be used for workflows which some of decisions are made by users.",
"description.zh-CN": "用于人工控制部分决策的流程。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/workflow-manual",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "工作流:通知节点",
"description": "Send notification in workflow.",
"description.zh-CN": "可用于在工作流中发送各类通知。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/workflow-smtp-mailer",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "工作流:并行分支节点",
"description": "Could be used for parallel execution of branch processes in the workflow.",
"description.zh-CN": "用于在工作流中需要并行执行的分支流程。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/workflow-parallel",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "工作流HTTP 请求节点",
"description": "Send HTTP requests to any HTTP service for data interaction in workflow.",
"description.zh-CN": "可用于在工作流中向任意 HTTP 服务发送请求,进行数据交互。",
"version": "1.4.0-alpha",
"version": "1.4.0-alpha.1",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/workflow-request",

Some files were not shown because too many files have changed in this diff Show More