diff --git a/lerna.json b/lerna.json index 4ebda0322..f4734927c 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "npmClient": "yarn", "useWorkspaces": true, "npmClientArgs": [ diff --git a/packages/app/client/package.json b/packages/app/client/package.json index e1cfcc96e..097ddd1d0 100644 --- a/packages/app/client/package.json +++ b/packages/app/client/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/app-client", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "scripts": { "start": "umi dev", "build": "umi build", @@ -9,7 +9,7 @@ "test:coverage": "umi-test --coverage" }, "devDependencies": { - "@nocobase/client": "0.6.2-alpha.8", + "@nocobase/client": "0.6.2-alpha.12", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "@umijs/test": "^3.5.20", diff --git a/packages/app/server/package.json b/packages/app/server/package.json index e501d602e..f8c2a5e52 100644 --- a/packages/app/server/package.json +++ b/packages/app/server/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/app-server", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "description": "", "license": "MIT", "main": "./lib/index.js", @@ -11,19 +11,19 @@ "build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm" }, "dependencies": { - "@nocobase/database": "0.6.2-alpha.8", - "@nocobase/plugin-acl": "0.6.2-alpha.8", - "@nocobase/plugin-china-region": "0.6.2-alpha.8", - "@nocobase/plugin-client": "0.6.2-alpha.8", - "@nocobase/plugin-collection-manager": "0.6.2-alpha.8", - "@nocobase/plugin-error-handler": "0.6.2-alpha.8", - "@nocobase/plugin-file-manager": "0.6.2-alpha.8", - "@nocobase/plugin-system-settings": "0.6.2-alpha.8", - "@nocobase/plugin-ui-routes-storage": "0.6.2-alpha.8", - "@nocobase/plugin-ui-schema-storage": "0.6.2-alpha.8", - "@nocobase/plugin-users": "0.6.2-alpha.8", - "@nocobase/plugin-workflow": "0.6.2-alpha.8", - "@nocobase/server": "0.6.2-alpha.8" + "@nocobase/database": "0.6.2-alpha.12", + "@nocobase/plugin-acl": "0.6.2-alpha.12", + "@nocobase/plugin-china-region": "0.6.2-alpha.12", + "@nocobase/plugin-client": "0.6.2-alpha.12", + "@nocobase/plugin-collection-manager": "0.6.2-alpha.12", + "@nocobase/plugin-error-handler": "0.6.2-alpha.12", + "@nocobase/plugin-file-manager": "0.6.2-alpha.12", + "@nocobase/plugin-system-settings": "0.6.2-alpha.12", + "@nocobase/plugin-ui-routes-storage": "0.6.2-alpha.12", + "@nocobase/plugin-ui-schema-storage": "0.6.2-alpha.12", + "@nocobase/plugin-users": "0.6.2-alpha.12", + "@nocobase/plugin-workflow": "0.6.2-alpha.12", + "@nocobase/server": "0.6.2-alpha.12" }, "repository": { "type": "git", diff --git a/packages/core/acl/package.json b/packages/core/acl/package.json index 9c1662da7..0f44256a4 100644 --- a/packages/core/acl/package.json +++ b/packages/core/acl/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/acl", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "description": "", "license": "MIT", "main": "./lib/index.js", @@ -11,7 +11,7 @@ "build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm" }, "dependencies": { - "@nocobase/resourcer": "0.6.2-alpha.8", + "@nocobase/resourcer": "0.6.2-alpha.12", "json-templates": "^4.2.0" }, "repository": { diff --git a/packages/core/actions/package.json b/packages/core/actions/package.json index 8d9694873..fa1b1b5b0 100644 --- a/packages/core/actions/package.json +++ b/packages/core/actions/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/actions", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "description": "", "license": "MIT", "main": "./lib/index.js", @@ -11,8 +11,8 @@ "build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm" }, "dependencies": { - "@nocobase/database": "0.6.2-alpha.8", - "@nocobase/resourcer": "0.6.2-alpha.8" + "@nocobase/database": "0.6.2-alpha.12", + "@nocobase/resourcer": "0.6.2-alpha.12" }, "repository": { "type": "git", diff --git a/packages/core/client/package.json b/packages/core/client/package.json index c5d25fae7..f259f2136 100644 --- a/packages/core/client/package.json +++ b/packages/core/client/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/client", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "license": "MIT", "main": "lib", "module": "esm", @@ -23,7 +23,7 @@ "@formily/antd": "^2.0.15", "@formily/core": "^2.0.15", "@formily/react": "^2.0.15", - "@nocobase/utils": "0.6.2-alpha.8", + "@nocobase/utils": "0.6.2-alpha.12", "ahooks": "^3.0.5", "antd": "^4.18.9", "axios": "^0.24.0", diff --git a/packages/core/create-nocobase-app/.npmignore b/packages/core/create-nocobase-app/.npmignore index 461574b2f..b1800debb 100644 --- a/packages/core/create-nocobase-app/.npmignore +++ b/packages/core/create-nocobase-app/.npmignore @@ -3,5 +3,4 @@ node_modules docs __tests__ tsconfig.json -src -.fatherrc.ts \ No newline at end of file +.fatherrc.ts diff --git a/packages/core/create-nocobase-app/package.json b/packages/core/create-nocobase-app/package.json index d07e0f03b..fbb950c52 100755 --- a/packages/core/create-nocobase-app/package.json +++ b/packages/core/create-nocobase-app/package.json @@ -1,12 +1,7 @@ { "name": "create-nocobase-app", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "src/index.js", - "files": [ - "lib", - "bin", - "templates" - ], "license": "MIT", "dependencies": { "@nocobase/utils": "^0.5.0-alpha.38", diff --git a/packages/core/database/package.json b/packages/core/database/package.json index 1063560c5..76a76847c 100644 --- a/packages/core/database/package.json +++ b/packages/core/database/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/database", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "description": "", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -11,7 +11,7 @@ "build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm" }, "dependencies": { - "@nocobase/utils": "0.6.2-alpha.8", + "@nocobase/utils": "0.6.2-alpha.12", "async-mutex": "^0.3.2", "deepmerge": "^4.2.2", "flat": "^5.0.2", diff --git a/packages/core/resourcer/package.json b/packages/core/resourcer/package.json index 3ed9eb824..a26ba4566 100644 --- a/packages/core/resourcer/package.json +++ b/packages/core/resourcer/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/resourcer", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "description": "", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/core/server/package.json b/packages/core/server/package.json index 131d0c1ab..5998f90cb 100644 --- a/packages/core/server/package.json +++ b/packages/core/server/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/server", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "lib/index.js", "types": "./lib/index.d.ts", "license": "MIT", @@ -12,10 +12,10 @@ "dependencies": { "@koa/cors": "^3.1.0", "@koa/router": "^9.4.0", - "@nocobase/acl": "0.6.2-alpha.8", - "@nocobase/actions": "0.6.2-alpha.8", - "@nocobase/database": "0.6.2-alpha.8", - "@nocobase/resourcer": "0.6.2-alpha.8", + "@nocobase/acl": "0.6.2-alpha.12", + "@nocobase/actions": "0.6.2-alpha.12", + "@nocobase/database": "0.6.2-alpha.12", + "@nocobase/resourcer": "0.6.2-alpha.12", "commander": "^8.1.0", "dotenv": "^8.2.0", "find-package-json": "^1.2.0", diff --git a/packages/core/server/src/__tests__/config.test.ts b/packages/core/server/src/__tests__/config.test.ts index bbf3d957e..f93d02ac2 100644 --- a/packages/core/server/src/__tests__/config.test.ts +++ b/packages/core/server/src/__tests__/config.test.ts @@ -10,6 +10,7 @@ const configurationDir = path.join(__dirname, './config'); describe('config', () => { it('should read configuration from directory', async () => { const config = await readConfig(configurationDir); + expect(config['fake']).toBeUndefined(); expect(config['not-exists']).toBeUndefined(); expect(config['database']).toEqual(databaseConfiguration); expect(config['database']).toEqual(databaseConfiguration); diff --git a/packages/core/server/src/__tests__/config/fake.d.ts b/packages/core/server/src/__tests__/config/fake.d.ts new file mode 100644 index 000000000..b6b7deb80 --- /dev/null +++ b/packages/core/server/src/__tests__/config/fake.d.ts @@ -0,0 +1 @@ +type a = number; diff --git a/packages/core/server/src/read-config.ts b/packages/core/server/src/read-config.ts index a567ca312..5faa9e728 100644 --- a/packages/core/server/src/read-config.ts +++ b/packages/core/server/src/read-config.ts @@ -41,6 +41,10 @@ export async function loadConfiguration(configurationDir: string, repository: Co if (file.isDirectory()) { await getConfigurationFiles(path.join(dir, file.name), [...prefix, file.name]); } else { + if (!['ts', 'js'].includes(file.name.split('.').slice(1).join('.'))) { + continue; + } + const filePath = path.join(dir, file.name); const keyName = path.parse(filePath).name; const configuration = require(filePath).default; diff --git a/packages/core/test/package.json b/packages/core/test/package.json index 9d7a82da9..edeadbe19 100644 --- a/packages/core/test/package.json +++ b/packages/core/test/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/test", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "lib/index.js", "types": "./lib/index.d.ts", "license": "MIT", @@ -10,7 +10,7 @@ "build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm" }, "dependencies": { - "@nocobase/server": "0.6.2-alpha.8", + "@nocobase/server": "0.6.2-alpha.12", "@types/supertest": "^2.0.11", "mockjs": "^1.1.0", "mysql2": "^2.1.0", diff --git a/packages/core/utils/package.json b/packages/core/utils/package.json index 869f9da8f..35372d784 100644 --- a/packages/core/utils/package.json +++ b/packages/core/utils/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/utils", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "lib/index.js", "types": "./lib/index.d.ts", "license": "MIT", diff --git a/packages/plugins/acl/package.json b/packages/plugins/acl/package.json index b0148245f..96b01fd65 100644 --- a/packages/plugins/acl/package.json +++ b/packages/plugins/acl/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-acl", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "description": "", "license": "MIT", "main": "./lib/index.js", @@ -11,9 +11,9 @@ "build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm" }, "dependencies": { - "@nocobase/acl": "0.6.2-alpha.8", - "@nocobase/database": "0.6.2-alpha.8", - "@nocobase/server": "0.6.2-alpha.8" + "@nocobase/acl": "0.6.2-alpha.12", + "@nocobase/database": "0.6.2-alpha.12", + "@nocobase/server": "0.6.2-alpha.12" }, "repository": { "type": "git", diff --git a/packages/plugins/action-logs/package.json b/packages/plugins/action-logs/package.json index 798bb6ab6..f08387a96 100644 --- a/packages/plugins/action-logs/package.json +++ b/packages/plugins/action-logs/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-action-logs", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "lib/index.js", "license": "MIT", "scripts": { @@ -9,7 +9,7 @@ "build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm" }, "devDependencies": { - "@nocobase/test": "0.6.2-alpha.8" + "@nocobase/test": "0.6.2-alpha.12" }, "gitHead": "e7df1f93c4e23b9a666d99ee7372c02bdaec97c4" } diff --git a/packages/plugins/china-region/package.json b/packages/plugins/china-region/package.json index 3c2edd7dd..424b3cc3d 100644 --- a/packages/plugins/china-region/package.json +++ b/packages/plugins/china-region/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-china-region", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "lib/index.js", "license": "MIT", "scripts": { @@ -12,7 +12,7 @@ "china-division": "^2.4.0" }, "devDependencies": { - "@nocobase/test": "0.6.2-alpha.8" + "@nocobase/test": "0.6.2-alpha.12" }, "gitHead": "e7df1f93c4e23b9a666d99ee7372c02bdaec97c4" } diff --git a/packages/plugins/client/package.json b/packages/plugins/client/package.json index c796e6951..3c958c225 100644 --- a/packages/plugins/client/package.json +++ b/packages/plugins/client/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-client", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "lib/index.js", "license": "MIT", "scripts": { @@ -9,10 +9,10 @@ "build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm" }, "dependencies": { - "@nocobase/server": "0.6.2-alpha.8" + "@nocobase/server": "0.6.2-alpha.12" }, "devDependencies": { - "@nocobase/test": "0.6.2-alpha.8" + "@nocobase/test": "0.6.2-alpha.12" }, "gitHead": "e7df1f93c4e23b9a666d99ee7372c02bdaec97c4" } diff --git a/packages/plugins/collection-manager/package.json b/packages/plugins/collection-manager/package.json index a76caa14a..9eef0abae 100644 --- a/packages/plugins/collection-manager/package.json +++ b/packages/plugins/collection-manager/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-collection-manager", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "lib/index.js", "license": "MIT", "scripts": { @@ -9,7 +9,7 @@ "build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm" }, "devDependencies": { - "@nocobase/test": "0.6.2-alpha.8" + "@nocobase/test": "0.6.2-alpha.12" }, "gitHead": "e7df1f93c4e23b9a666d99ee7372c02bdaec97c4" } diff --git a/packages/plugins/error-handler/package.json b/packages/plugins/error-handler/package.json index 19488b08f..48066ca3d 100644 --- a/packages/plugins/error-handler/package.json +++ b/packages/plugins/error-handler/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-error-handler", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "description": "", "license": "MIT", "main": "./lib/index.js", @@ -11,7 +11,7 @@ "build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm" }, "dependencies": { - "@nocobase/server": "0.6.2-alpha.8" + "@nocobase/server": "0.6.2-alpha.12" }, "repository": { "type": "git", diff --git a/packages/plugins/file-manager/package.json b/packages/plugins/file-manager/package.json index 1c00d727d..bc582b358 100644 --- a/packages/plugins/file-manager/package.json +++ b/packages/plugins/file-manager/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-file-manager", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "lib/index.js", "license": "MIT", "scripts": { @@ -10,7 +10,7 @@ }, "dependencies": { "@koa/multer": "^3.0.0", - "@nocobase/server": "0.6.2-alpha.8", + "@nocobase/server": "0.6.2-alpha.12", "aws-sdk": "^2.2.32", "koa-static": "^5.0.0", "mime-match": "^1.0.2", @@ -19,7 +19,7 @@ "multer-s3": "^2.10.0" }, "devDependencies": { - "@nocobase/test": "0.6.2-alpha.8", + "@nocobase/test": "0.6.2-alpha.12", "@types/koa-multer": "^1.0.1", "@types/multer": "^1.4.5" }, diff --git a/packages/plugins/multiple-apps/package.json b/packages/plugins/multiple-apps/package.json index ccad10e4a..346eaf677 100644 --- a/packages/plugins/multiple-apps/package.json +++ b/packages/plugins/multiple-apps/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-multiple-apps", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "lib/index.js", "license": "MIT", "scripts": { @@ -9,6 +9,6 @@ "build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm" }, "dependencies": { - "@nocobase/server": "0.6.2-alpha.8" + "@nocobase/server": "0.6.2-alpha.12" } } diff --git a/packages/plugins/notifications/package.json b/packages/plugins/notifications/package.json index 908e74201..756abadeb 100644 --- a/packages/plugins/notifications/package.json +++ b/packages/plugins/notifications/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-notifications", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "lib/index.js", "license": "MIT", "scripts": { @@ -12,7 +12,7 @@ "nodemailer": "^6.6.1" }, "devDependencies": { - "@nocobase/test": "0.6.2-alpha.8", + "@nocobase/test": "0.6.2-alpha.12", "@types/nodemailer": "6.4.4", "nodemailer-mock": "^1.5.11" }, diff --git a/packages/plugins/system-settings/package.json b/packages/plugins/system-settings/package.json index 6df2643ff..992befba7 100644 --- a/packages/plugins/system-settings/package.json +++ b/packages/plugins/system-settings/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-system-settings", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "lib/index.js", "license": "MIT", "scripts": { @@ -9,7 +9,7 @@ "build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm" }, "devDependencies": { - "@nocobase/test": "0.6.2-alpha.8" + "@nocobase/test": "0.6.2-alpha.12" }, "gitHead": "e7df1f93c4e23b9a666d99ee7372c02bdaec97c4" } diff --git a/packages/plugins/ui-routes-storage/package.json b/packages/plugins/ui-routes-storage/package.json index 1abaaed42..85d45a393 100644 --- a/packages/plugins/ui-routes-storage/package.json +++ b/packages/plugins/ui-routes-storage/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-ui-routes-storage", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "lib/index.js", "license": "MIT", "scripts": { @@ -12,7 +12,7 @@ "flat-to-nested": "^1.1.1" }, "devDependencies": { - "@nocobase/test": "0.6.2-alpha.8" + "@nocobase/test": "0.6.2-alpha.12" }, "gitHead": "e7df1f93c4e23b9a666d99ee7372c02bdaec97c4" } diff --git a/packages/plugins/ui-schema-storage/package.json b/packages/plugins/ui-schema-storage/package.json index accba1535..9992679fb 100644 --- a/packages/plugins/ui-schema-storage/package.json +++ b/packages/plugins/ui-schema-storage/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-ui-schema-storage", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "lib/index.js", "license": "MIT", "scripts": { @@ -10,7 +10,7 @@ }, "devDependencies": { "@formily/json-schema": "^2.0.15", - "@nocobase/test": "0.6.2-alpha.8" + "@nocobase/test": "0.6.2-alpha.12" }, "gitHead": "e7df1f93c4e23b9a666d99ee7372c02bdaec97c4" } diff --git a/packages/plugins/users/package.json b/packages/plugins/users/package.json index 6224847cb..13056eb36 100644 --- a/packages/plugins/users/package.json +++ b/packages/plugins/users/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-users", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "lib/index.js", "license": "MIT", "scripts": { @@ -12,7 +12,7 @@ "jsonwebtoken": "^8.5.1" }, "devDependencies": { - "@nocobase/test": "0.6.2-alpha.8", + "@nocobase/test": "0.6.2-alpha.12", "@types/jsonwebtoken": "^8.5.8" }, "gitHead": "e7df1f93c4e23b9a666d99ee7372c02bdaec97c4" diff --git a/packages/plugins/workflow/package.json b/packages/plugins/workflow/package.json index 8aea16802..33cd0e0ac 100644 --- a/packages/plugins/workflow/package.json +++ b/packages/plugins/workflow/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-workflow", - "version": "0.6.2-alpha.8", + "version": "0.6.2-alpha.12", "main": "lib/index.js", "license": "MIT", "scripts": { @@ -9,14 +9,14 @@ "build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm" }, "dependencies": { - "@nocobase/actions": "0.6.2-alpha.8", - "@nocobase/database": "0.6.2-alpha.8", - "@nocobase/server": "0.6.2-alpha.8", - "@nocobase/utils": "0.6.2-alpha.8", + "@nocobase/actions": "0.6.2-alpha.12", + "@nocobase/database": "0.6.2-alpha.12", + "@nocobase/server": "0.6.2-alpha.12", + "@nocobase/utils": "0.6.2-alpha.12", "json-templates": "^4.2.0" }, "devDependencies": { - "@nocobase/test": "0.6.2-alpha.8" + "@nocobase/test": "0.6.2-alpha.12" }, "gitHead": "f0b335ac30f29f25c95d7d137655fa64d8d67f1e" }