From b71bcc1889962891ba895d8046288531a6c06a1d Mon Sep 17 00:00:00 2001 From: YANG QIA <2013xile@gmail.com> Date: Mon, 29 Apr 2024 00:46:21 +0800 Subject: [PATCH] =?UTF-8?q?chore(versions):=20=F0=9F=98=8A=20publish=20v1.?= =?UTF-8?q?0.0-alpha.1=20(#4186)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: rename plugin-collection-manager to plugin-data-source-main (#4136) * feat: rename plugin * feat: rename * chore: rename classes of data-source-main * chore: use name for migrating instead of packageName * chore: rename china-region to field-china-region (#4167) * chore: rename china-region to field-china-region * chore: update yarn.lock * chore: rename classes * chore: use name instead of pkgName * chore: rename export to action-export (#4169) * chore: rename export to action-export * chore: rename classes * chore: use name * chore: rename formula-field to field-formula (#4170) * chore: rename formula-field to field-formula * chore: use name * chore: rename localization-management to localization (#4173) * chore: rename localization-management to localization * fix: test * chore: rename sequence-field to field-sequence (#4174) * chore: rename sequence-field to field-sequence * chore: use name * chore: rename custom-request to action-custom-request (#4168) * chore: rename custom-request to action-custom-request * chore: rename classes * chore: use name * fix: ns * chore: rename iframe-block to block-iframe (#4171) * chore: rename iframe-block to block-iframe * chore: use name * chore: rename sms-auth to auth-sms (#4175) * chore: rename sms-auth to auth-sms * chore: use name * chore: rename import to action-import (#4172) * chore: rename import to action-import * chore: use name * fix: ns * fix: packages * test: add rename test * fix: move rename migrations to preset * fix: version * fix(localization): remove duplicate records (#4182) * fix: locale ns * fix(localization): remove duplicate records * chore: merge * fix: migration * fix: test * feat: improve pm add command (#4198) * chore: remove sso auth plugins and add upgrade warning (#4192) * chore: remove sso auth plugins and add upgrade warning * chore: remove sso plugins dir * chore: remove dependencies * fix: names * refactor: move to migration * chore: adjust log * feat: allows to remove plugins from sub apps * fix: pm remove * chore: add test * chore: just for pro plugins * refactor: optimize migration * test: add test * fix: auth-sms * fix: add transaction --------- Co-authored-by: chenos * chore: make e2e more stable * chore(license): update LICENSE to AGPL-3.0 (#4207) * fix: improve pm (#4200) * fix: improve pm * feat: improve pm update * fix: test error * fix: rename plugin * fix: remove only * refactor(e2e): extract * fix: await * fix: nameOrPkg * feat: remove multi-app-share-collection from local --------- Co-authored-by: Zeke Zhang <958414905@qq.com> * chore: add new line * chore: rename migration * fix: version * fix: test * feat: v1.0.0-alpha.1 * fix: multi-app-share-collection --------- Co-authored-by: chenos Co-authored-by: Chareice Co-authored-by: katherinehhh Co-authored-by: Zeke Zhang <958414905@qq.com> --- lerna.json | 2 +- package.json | 6 +- packages/core/acl/LICENSE | 798 ++++++++++++++---- packages/core/acl/package.json | 8 +- packages/core/actions/LICENSE | 798 ++++++++++++++---- packages/core/actions/package.json | 10 +- packages/core/app/package.json | 10 +- packages/core/auth/LICENSE | 798 ++++++++++++++---- packages/core/auth/package.json | 14 +- packages/core/build/LICENSE | 798 ++++++++++++++---- packages/core/build/package.json | 4 +- packages/core/cache/LICENSE | 798 ++++++++++++++---- packages/core/cache/package.json | 4 +- packages/core/cli/LICENSE | 798 ++++++++++++++---- packages/core/cli/package.json | 8 +- .../cli/templates/plugin/package.json.tpl | 6 +- packages/core/client/LICENSE | 798 ++++++++++++++---- packages/core/client/package.json | 10 +- .../src/nocobase-buildin-plugin/index.tsx | 2 +- packages/core/create-nocobase-app/LICENSE | 798 ++++++++++++++---- .../core/create-nocobase-app/package.json | 4 +- packages/core/data-source-manager/LICENSE | 798 ++++++++++++++---- .../core/data-source-manager/package.json | 14 +- packages/core/database/LICENSE | 798 ++++++++++++++---- packages/core/database/package.json | 8 +- packages/core/devtools/LICENSE | 798 ++++++++++++++---- packages/core/devtools/package.json | 10 +- .../plugin-cas => core/evaluators}/LICENSE | 0 packages/core/evaluators/package.json | 6 +- packages/core/logger/LICENSE | 798 ++++++++++++++---- packages/core/logger/package.json | 4 +- packages/core/logger/src/system-logger.ts | 26 +- packages/core/resourcer/LICENSE | 798 ++++++++++++++---- packages/core/resourcer/package.json | 6 +- packages/core/sdk/LICENSE | 798 ++++++++++++++---- packages/core/sdk/package.json | 4 +- packages/core/server/LICENSE | 798 ++++++++++++++---- packages/core/server/package.json | 28 +- .../core/server/src/__tests__/gateway.test.ts | 1 + .../server/src/__tests__/gateway/ipc.test.ts | 2 +- packages/core/server/src/commands/pm.ts | 42 +- packages/core/server/src/index.ts | 1 + packages/core/server/src/locale/locale.ts | 5 +- .../20240427235620-rename-plugins.ts | 16 + .../src/plugin-manager/options/resource.ts | 11 +- .../plugin-manager-repository.ts | 10 + .../src/plugin-manager/plugin-manager.ts | 277 ++++-- .../core/server/src/plugin-manager/utils.ts | 13 +- packages/core/telemetry/LICENSE | 798 ++++++++++++++---- packages/core/telemetry/package.json | 6 +- packages/core/test/LICENSE | 798 ++++++++++++++---- packages/core/test/package.json | 6 +- packages/core/utils/LICENSE | 798 ++++++++++++++---- packages/core/utils/package.json | 4 +- .../plugins/@nocobase/plugin-acl/package.json | 18 +- .../src/server/__tests__/prepare.ts | 10 +- .../src/server/__tests__/role-check.test.ts | 2 +- .../server/__tests__/role-resource.test.ts | 2 +- .../plugin-action-bulk-edit/package.json | 8 +- .../plugin-action-bulk-update/package.json | 8 +- .../.npmignore | 0 .../LICENSE | 0 .../client.d.ts | 0 .../client.js | 0 .../package.json | 10 +- .../server.d.ts | 0 .../server.js | 0 .../src/client/__e2e__/schemaSettings.test.ts | 0 .../client/components/CustomRequestAction.tsx | 0 .../CustomRequestActionDesigner.tsx | 0 .../src/client/components/index.ts | 0 .../src/client/constants.ts | 0 .../src/client/hooks/index.ts | 0 .../hooks/useCustomRequestVariableOptions.ts | 0 .../client/hooks/useCustomRequestsResource.ts | 0 .../hooks/useCustomizeRequestActionProps.ts | 0 .../src/client/hooks/useGetCustomRequest.ts | 0 .../src/client/index.tsx | 4 +- .../initializer/CustomRequestInitializer.tsx | 0 .../src/client/initializer/index.ts | 0 .../src/client/locale.ts | 2 +- .../src/client/schemaSettings.ts | 0 .../src/client/schemas/CustomRequestACL.ts | 0 .../CustomRequestConfigurationFields.ts | 0 .../src/client/schemas/index.ts | 0 .../src/index.ts | 0 .../src/locale/ko_KR.json | 0 .../src/locale/zh-CN.json | 0 .../__snapshots__/actions.test.ts.snap | 0 .../src/server/__tests__/actions.test.ts | 2 +- .../src/server/actions/listByCurrentRole.ts | 0 .../src/server/actions/send.ts | 2 +- .../src/server/collections/.gitkeep | 0 .../src/server/collections/customRequest.ts | 0 .../server/collections/customRequestsRoles.ts | 0 .../src/server/index.ts | 0 .../20240425205017-change-locale-module.ts | 21 + .../src/server/plugin.ts | 4 +- .../plugin-action-duplicate/package.json | 8 +- .../.npmignore | 0 .../LICENSE | 0 .../README.md | 0 .../README.zh-CN.md | 0 .../client.d.ts | 0 .../client.js | 0 .../package.json | 16 +- .../server.d.ts | 0 .../server.js | 0 .../src/client/ExportActionInitializer.tsx | 0 .../src/client/ExportDesigner.tsx | 1 + .../src/client/ExportPluginProvider.tsx | 0 .../src/client/index.ts | 4 +- .../src/client/locale/index.ts | 2 +- .../src/client/schemaSettings.ts | 1 + .../src/client/useExportAction.tsx | 0 .../src/client/useFields.ts | 0 .../src/client/useShared.ts | 0 .../src/index.ts | 0 .../src/locale/en-US.json | 0 .../src/locale/zh-CN.json | 0 .../src/server/__tests__/utils/utils.test.ts | 0 .../src/server/actions}/.gitkeep | 0 .../src/server/actions/export-xlsx.ts | 0 .../src/server/actions/index.ts | 0 .../src/server/collections}/.gitkeep | 0 .../src/server/index.ts | 4 +- .../20240425220631-change-locale-module.ts | 21 + .../src/server/models}/.gitkeep | 0 .../src/server/renders/index.ts | 0 .../src/server/renders/renders.ts | 5 +- .../src/server/repositories}/.gitkeep | 0 .../src/server/utils/columns2Appends.ts | 0 .../src/server/utils/index.ts | 0 .../src/swagger/index.json | 0 .../.npmignore | 0 .../LICENSE | 0 .../README.md | 0 .../README.zh-CN.md | 0 .../client.d.ts | 0 .../client.js | 0 .../package.json | 16 +- .../server.d.ts | 0 .../server.js | 0 .../src/client/ImportActionInitializer.tsx | 0 .../src/client/ImportDesigner.tsx | 0 .../src/client/ImportModal.tsx | 0 .../src/client/ImportPluginProvider.tsx | 0 .../src/client/constants.ts | 1 + .../src/client/context.ts | 0 .../src/client/index.ts | 4 +- .../src/client/locale/index.ts | 2 +- .../src/client/schemaSettings.ts | 0 .../src/client/useFields.ts | 0 .../src/client/useImportAction.ts | 0 .../src/client/useShared.ts | 0 .../src/index.ts | 0 .../src/locale/en-US.json | 0 .../src/locale/es-ES.json | 0 .../src/locale/ko_KR.json | 0 .../src/locale/pt-BR.json | 0 .../src/locale/zh-CN.json | 0 .../src/server/actions}/.gitkeep | 0 .../server/actions/downloadXlsxTemplate.ts | 0 .../src/server/actions/importXlsx.ts | 0 .../src/server/actions/index.ts | 0 .../src/server/collections/.gitkeep | 0 .../src/server/index.ts | 4 +- .../src/server/locale/en-US.ts | 0 .../src/server/locale/fr-FR.ts | 0 .../src/server/locale/index.ts | 0 .../src/server/locale/zh-CN.ts | 0 .../src/server/middleware/index.ts | 0 .../20240425223956-change-locale-module.ts | 21 + .../src/server/models}/.gitkeep | 0 .../src/server/repositories}/.gitkeep | 0 .../src/server/utils/index.ts | 0 .../src/server/utils/transform.ts | 0 .../src/swagger/index.json | 0 .../plugin-action-print/package.json | 8 +- .../@nocobase/plugin-api-doc/package.json | 8 +- .../@nocobase/plugin-api-keys/package.json | 16 +- .../@nocobase/plugin-audit-logs/package.json | 10 +- .../.npmignore | 0 .../LICENSE | 0 .../README.md | 0 .../client.d.ts | 0 .../client.js | 0 .../package.json | 18 +- .../server.d.ts | 0 .../server.js | 0 .../src/client/Options.tsx | 0 .../src/client/SigninPage.tsx | 2 +- .../src/client/VerificationCode.tsx | 0 .../src/client/index.tsx | 4 +- .../src/client/locale/index.ts | 2 +- .../src/constants.ts | 0 .../src/index.ts | 0 .../src/locale/en-US.json | 0 .../src/locale/ko_KR.json | 0 .../src/locale/zh-CN.json | 0 .../src/server/__tests__/signin.test.ts | 2 +- .../src/server/collections}/.gitkeep | 0 .../src/server/index.ts | 0 .../src/server/locale/en-US.ts | 0 .../src/server/locale/fr-FR.ts | 0 .../src/server/locale/index.ts | 0 .../src/server/locale/ja-JP.ts | 0 .../src/server/locale/pt-BR.ts | 0 .../src/server/locale/zh-CN.ts | 0 .../20230607180000-sms-authenticator.ts | 0 .../20240425230310-change-locale-module.ts | 21 + .../src/server/plugin.ts | 14 +- .../src/server/sms-auth.ts | 2 +- .../@nocobase/plugin-auth/package.json | 14 +- .../plugin-backup-restore/package.json | 14 +- .../src/server/__tests__/api.test.ts | 2 +- .../.npmignore | 0 .../LICENSE | 0 .../README.md | 0 .../README.zh-CN.md | 0 .../client.d.ts | 0 .../client.js | 0 .../package.json | 14 +- .../server.d.ts | 0 .../server.js | 0 .../src/client/Iframe.Designer.tsx | 0 .../src/client/Iframe.tsx | 0 .../src/client/IframeBlockInitializer.tsx | 0 .../src/client/IframeBlockProvider.tsx | 0 .../src/client/index.ts | 4 +- .../src/client/schemaSettings.ts | 0 .../src/index.ts | 0 .../src/server/actions/index.ts | 0 .../src/server/collections}/.gitkeep | 0 .../src/server/collections/iframe-html.ts | 0 .../src/server/index.ts | 0 .../src/server/plugin.ts | 4 +- .../src/swagger/index.ts | 0 .../@nocobase/plugin-calendar/package.json | 8 +- .../plugins/@nocobase/plugin-cas/README.md | 12 - .../@nocobase/plugin-cas/README.zh-CN.md | 12 - .../plugins/@nocobase/plugin-cas/package.json | 30 - .../plugin-cas/src/client/Options.tsx | 42 - .../plugin-cas/src/client/SigninPage.tsx | 42 - .../@nocobase/plugin-cas/src/client/index.tsx | 19 - .../plugin-cas/src/client/locale/index.ts | 11 - .../@nocobase/plugin-cas/src/constants.ts | 4 - .../plugins/@nocobase/plugin-cas/src/index.ts | 1 - .../plugin-cas/src/locale/en-US.json | 7 - .../plugin-cas/src/locale/ko_KR.json | 8 - .../plugin-cas/src/locale/zh-CN.json | 7 - .../src/server/__tests__/cas.test.ts | 160 ---- .../plugin-cas/src/server/actions/login.ts | 11 - .../plugin-cas/src/server/actions/service.ts | 31 - .../@nocobase/plugin-cas/src/server/auth.ts | 92 -- .../@nocobase/plugin-cas/src/server/plugin.ts | 38 - .../@nocobase/plugin-charts/package.json | 12 +- .../@nocobase/plugin-client/package.json | 12 +- .../src/client/index.ts | 7 - .../.npmignore | 0 .../LICENSE | 0 .../README.md | 0 .../README.zh-CN.md | 0 .../client.d.ts | 0 .../client.js | 0 .../package.json | 16 +- .../server.d.ts | 0 .../server.js | 0 .../collection-template/calendar.test.ts | 0 .../connectToDatabaseView.test.ts | 0 .../collection-template/expression.test.ts | 0 .../__e2e__/collection-template/file.test.ts | 0 .../collection-template/general.test.ts | 0 .../__e2e__/collection-template/sql.test.ts | 0 .../__e2e__/collection-template/tree.test.ts | 0 .../attachment/schemaInitializer.test.ts | 0 .../fields/attachment/schemaSettings.test.ts | 0 .../belongsTo/schemaInitializer.test.ts | 0 .../fields/belongsTo/schemaSettings.test.ts | 0 .../fields/checkbox/schemaInitializer.test.ts | 0 .../fields/checkbox/schemaSettings.test.ts | 0 .../checkboxGroup/schemaInitializer.test.ts | 0 .../checkboxGroup/schemaSettings.test.ts | 0 .../chinaRegion/schemaInitializer.test.ts | 0 .../fields/chinaRegion/schemaSettings.test.ts | 0 .../collection/schemaInitializer.test.ts | 0 .../fields/collection/schemaSettings.test.ts | 0 .../fields/color/schemaInitializer.test.ts | 0 .../fields/color/schemaSettings.test.ts | 0 .../createdAt/schemaInitializer.test.ts | 0 .../fields/createdAt/schemaSettings.test.ts | 0 .../createdBy/schemaInitializer.test.ts | 0 .../fields/createdBy/schemaSettings.test.ts | 0 .../fields/datetime/schemaInitializer.test.ts | 0 .../fields/datetime/schemaSettings.test.ts | 0 .../fields/email/schemaInitializer.test.ts | 0 .../fields/email/schemaSettings.test.ts | 0 .../fields/formula/schemaInitializer.test.ts | 0 .../fields/formula/schemaSettings.test.ts | 0 .../fields/hasOne/schemaInitializer.test.ts | 0 .../fields/hasOne/schemaSettings.test.ts | 0 .../fields/icon/schemaInitializer.test.ts | 0 .../fields/icon/schemaSettings.test.ts | 0 .../fields/id/schemaInitializer.test.ts | 0 .../__e2e__/fields/id/schemaSettings.test.ts | 0 .../fields/integer/schemaInitializer.test.ts | 0 .../fields/integer/schemaSettings.test.ts | 0 .../fields/json/schemaInitializer.test.ts | 0 .../fields/json/schemaSettings.test.ts | 0 .../lastUpdatedAt/schemaInitializer.test.ts | 0 .../lastUpdatedAt/schemaSettings.test.ts | 0 .../lastUpdatedBy/schemaInitializer.test.ts | 0 .../lastUpdatedBy/schemaSettings.test.ts | 0 .../fields/longText/schemaInitializer.test.ts | 0 .../fields/longText/schemaSettings.test.ts | 0 .../manyToMany/schemaInitializer.test.ts | 0 .../fields/manyToMany/schemaSettings1.test.ts | 0 .../fields/manyToMany/schemaSettings2.test.ts | 0 .../fields/manyToMany/schemaSettings3.test.ts | 0 .../fields/manyToMany/schemaSettings4.test.ts | 0 .../fields/manyToMany/schemaSettings5.test.ts | 0 .../manyToOne/schemaInitializer.test.ts | 0 .../fields/manyToOne/schemaSettings.test.ts | 0 .../fields/manyToOne/templatesOfBug.ts | 0 .../fields/markdown/schemaInitializer.test.ts | 0 .../fields/markdown/schemaSettings.test.ts | 0 .../mutipleSelect/schemaInitializer.test.ts | 0 .../mutipleSelect/schemaSettings.test.ts | 0 .../fields/number/schemaInitializer.test.ts | 0 .../fields/number/schemaSettings.test.ts | 0 .../oneToMany/schemaInitializer.test.ts | 0 .../fields/oneToMany/schemaSettings.test.ts | 0 .../fields/password/schemaInitializer.test.ts | 0 .../fields/password/schemaSettings.test.ts | 0 .../fields/percent/schemaInitializer.test.ts | 0 .../fields/percent/schemaSettings.test.ts | 0 .../fields/phone/schemaInitializer.test.ts | 0 .../fields/phone/schemaSettings.test.ts | 0 .../radioGroup/schemaInitializer.test.ts | 0 .../fields/radioGroup/schemaSettings.test.ts | 0 .../fields/richText/schemaInitializer.test.ts | 0 .../fields/richText/schemaSettings.test.ts | 0 .../fields/sequence/schemaInitializer.test.ts | 0 .../fields/sequence/schemaSettings.test.ts | 0 .../singleLineText/schemaInitializer.test.ts | 0 .../singleLineText/schemaSettings.test.ts | 0 .../singleSelect/schemaInitializer.test.ts | 0 .../singleSelect/schemaSettings.test.ts | 0 .../fields/tableOID/schemaInitializer.test.ts | 0 .../fields/tableOID/schemaSettings.test.ts | 0 .../fields/time/schemaInitializer.test.ts | 0 .../fields/time/schemaSettings.test.ts | 0 .../fields/url/schemaInitializer.test.ts | 0 .../__e2e__/fields/url/schemaSettings.test.ts | 0 .../src/client/__e2e__/utils.ts | 0 .../src/client/index.ts | 7 + .../src/index.ts | 0 .../src/server/__tests__/action.test.ts | 0 .../reference-integerity-check.test.ts | 0 .../__tests__/beforeInitOptions.test.ts | 0 .../__tests__/collection-categories.test.ts | 0 .../server/__tests__/collection-load.test.ts | 0 ...ollection-without-id-primary-field.test.ts | 0 .../__tests__/collections.repository.test.ts | 4 +- .../field-options/default-value.test.ts | 0 .../__tests__/field-options/indexes.test.ts | 0 .../__tests__/fields.repository.test.ts | 0 .../__tests__/fields/belongs-to-many.test.ts | 0 .../__tests__/fields/belongs-to.test.ts | 0 .../server/__tests__/fields/belongsTo.test.ts | 183 ++++ .../server/__tests__/fields/destroy.test.ts | 0 .../server/__tests__/fields/hasMany.test.ts | 0 .../server/__tests__/fields/hasOne.test.ts | 0 .../__tests__/fields/reverseField.test.ts | 0 .../src/server/__tests__/fields/uuid.test.ts | 0 .../http-api/belongs-to-many.test.ts | 0 .../__tests__/http-api/collections.test.ts | 0 .../server/__tests__/http-api/find.test.ts | 0 .../__tests__/http-api/has-many.test.ts | 0 .../http-api/inherited-collection.test.ts | 0 .../__tests__/http-api/recreate.test.ts | 0 .../server/__tests__/http-api/tree.test.ts | 0 .../http-api/validate-update-action.test.ts | 0 .../http-api/view-collection.test.ts | 0 .../src/server/__tests__/index.ts | 2 +- .../inherits/inherited-collection.test.ts | 0 .../inhertied-collection-with-schema.test.ts | 0 ...04151410-update-collections-hidden.test.ts | 0 .../20240420105949-add-sort-field.test.ts | 0 .../drop-ui-schema-relation.test.ts | 0 .../migrations/fix-created-by-field.test.ts | 0 .../migrations/set-collection-schema.test.ts | 0 .../migrations/update-id-to-bigint.test.ts | 0 .../src/server/__tests__/primary-key.test.ts | 0 .../__tests__/reference-integerity.test.ts | 0 .../__tests__/remove-collection.test.ts | 0 .../resources/collections.fields.test.ts | 0 .../__tests__/resources/collections.test.ts | 0 .../__tests__/sql/sql-collection.test.ts | 2 +- .../src/server/__tests__/sync.test.ts | 0 .../src/server/__tests__/through.test.ts | 4 +- .../__tests__/view/view-collection.test.ts | 0 .../view/view-with-filter-target-key.test.ts | 0 .../collections/collectionCategories.ts | 0 .../src/server/collections/collections.ts | 0 .../src/server/collections/fields.ts | 0 .../hooks/afterCreateForForeignKeyField.ts | 0 .../hooks/afterCreateForReverseField.ts | 0 .../hooks/afterDestroyForForeignKeyField.ts | 69 ++ .../beforeCreateForChildrenCollection.ts | 35 + .../hooks/beforeCreateForReverseField.ts | 0 .../hooks/beforeCreateForValidateField.ts | 0 .../hooks/beforeCreateForViewCollection.ts | 0 .../server/hooks/beforeDestroyForeignKey.ts | 0 .../src/server/hooks/beforeInitOptions.ts | 0 .../src/server/hooks/index.ts | 0 .../src/server/index.ts | 0 .../20220613103214-alert-sub-table.ts | 0 .../20220704225714-drop-foreign-keys.ts | 0 .../20221101111110-update-foreign-fields.ts | 0 ...0221104151410-update-collections-hidden.ts | 0 .../20221121111110-update-fk-type.ts | 0 .../20221121111113-update-id-to-bigint.ts | 0 .../migrations/20221221103220-timestamps.ts | 0 .../20230225111112-drop-ui-schema-relation.ts | 0 .../20230509111114-alert-ui-schema.ts | 0 .../migrations/20230623145414-number-step.ts | 0 .../migrations/20230704222935-tableoid.ts | 0 .../20230918024546-set-collection-schema.ts | 0 .../20240220153103-install-main-datasource.ts | 0 ...40419182147-fix-created-by-field-target.ts | 0 .../20240420105949-add-sort-field.ts | 0 .../src/server/models/collection.ts | 2 +- .../src/server/models/field.ts | 0 .../src/server/models/index.ts | 0 .../repositories/collection-repository.ts | 0 .../src/server/repositories/index.ts | 0 .../src/server/resourcers/collections.ts | 0 .../src/server/resourcers/sql.ts | 0 .../src/server/resourcers/views.ts | 0 .../src/server/server.ts | 6 +- .../src/swagger/index.ts | 0 .../plugin-data-source-manager/package.json | 8 +- .../plugin-data-visualization/package.json | 16 +- .../plugin-disable-pm-add/package.json | 8 +- .../plugin-error-handler/package.json | 12 +- .../.npmignore | 0 .../LICENSE | 0 .../README.md | 0 .../README.zh-CN.md | 0 .../build.config.ts | 0 .../client.d.ts | 0 .../client.js | 0 .../package.json | 12 +- .../server.d.ts | 0 .../server.js | 0 .../src/client/ChinaRegionProvider.tsx | 3 + .../src/client/index.tsx | 4 +- .../src/index.ts | 0 .../src/server/__tests__/action.test.ts | 2 +- .../src/server/collections/chinaRegions.ts | 0 .../src/server/index.ts | 4 +- .../src/swagger/index.json | 0 .../.npmignore | 0 .../LICENSE | 0 .../README.md | 0 .../README.zh-CN.md | 0 .../client.d.ts | 0 .../client.js | 0 .../package.json | 16 +- .../server.d.ts | 0 .../server.js | 0 .../client/FormulaComponentFieldSettings.tsx | 0 .../src/client/__e2e__/form-create.test.ts | 0 .../src/client/__e2e__/utils.ts | 0 .../client/components/Formula/Expression.tsx | 0 .../src/client/components/Formula/Result.tsx | 0 .../client/components/Formula/demos/demo2.tsx | 0 .../src/client/components/Formula/index.md | 0 .../src/client/components/Formula/index.tsx | 0 .../src/client/components/index.ts | 0 .../src/client/index.tsx | 4 +- .../src/client/interfaces/formula.tsx | 0 .../src/client/locale/index.ts | 2 +- .../src/client/scopes.tsx | 0 .../src/index.ts | 0 .../src/locale/en-US.json | 0 .../src/locale/ko_KR.json | 0 .../src/locale/zh-CN.json | 0 .../server/__tests__/formula-field.test.ts | 0 .../src/server/formula-field.ts | 0 .../src/server/index.ts | 0 .../migrations/20230213161904-alter-field.ts | 0 .../20240425222058-change-locale-module.ts | 21 + .../src/server/plugin.ts | 4 +- .../src/utils/index.ts | 0 .../plugin-field-markdown-vditor/package.json | 8 +- .../.npmignore | 0 .../LICENSE | 0 .../README.md | 0 .../README.zh-CN.md | 0 .../client.d.ts | 0 .../client.js | 0 .../package.json | 18 +- .../server.d.ts | 0 .../server.js | 0 .../src/client/SequenceFieldProvider.tsx | 0 .../src/client/index.tsx | 4 +- .../src/client/locale/index.ts | 2 +- .../src/client/sequence.tsx | 0 .../src/index.ts | 0 .../src/locale/en-US.json | 0 .../src/locale/es-ES.json | 0 .../src/locale/fr-FR.json | 0 .../src/locale/ko_KR.json | 0 .../src/locale/pt-BR.json | 0 .../src/locale/zh-CN.json | 0 .../src/server/Plugin.ts | 2 +- .../server/__tests__/sequence-field.test.ts | 2 +- .../src/server/collections/sequences.ts | 0 .../src/server/fields/sequence-field.ts | 0 .../src/server/index.ts | 0 .../20221207022250-sequence-field-key.ts | 0 .../20240425225438-change-locale-module.ts | 21 + .../plugin-file-manager/package.json | 14 +- .../src/client/__e2e__/block.test.ts | 618 +------------- .../src/client/__e2e__/templates.ts | 602 +++++++++++++ .../@nocobase/plugin-gantt/package.json | 8 +- .../package.json | 12 +- .../plugin-import/src/client/constants.ts | 1 - .../@nocobase/plugin-kanban/package.json | 8 +- .../.npmignore | 0 .../LICENSE | 0 .../README.md | 0 .../client.d.ts | 0 .../client.js | 0 .../package.json | 18 +- .../server.d.ts | 0 .../server.js | 0 .../src/client/Localization.tsx | 0 .../src/client/index.tsx | 2 +- .../src/client/locale/index.ts | 2 +- .../src/client/schemas/localization.tsx | 2 +- .../src/index.ts | 0 .../src/locale/en-US.json | 0 .../src/locale/ko_KR.json | 0 .../src/locale/zh-CN.json | 0 .../src/server/__tests__/actions.test.ts | 2 +- .../src/server/__tests__/middleware.test.ts | 4 +- .../migrations/delete-pkg-name.test.ts | 76 ++ .../src/server/__tests__/resources.test.ts | 0 .../src/server/__tests__/sync.test.ts | 8 +- .../src/server/__tests__/utils.ts | 0 .../src/server/actions/localization.ts | 15 +- .../src/server/actions/localizationTexts.ts | 0 .../src/server/collections/.gitkeep | 0 .../server/collections/localization-texts.ts | 0 .../collections/localization-translations.ts | 0 .../src/server/constans.ts | 0 .../src/server/index.ts | 0 .../20230706200900-roles-add-translation.ts | 0 .../migrations/20231206161851-fix-module.ts | 0 .../20240425224508-change-locale-module.ts | 21 + .../20240426123538-delete-pkg-name-ns.ts | 53 ++ .../src/server/plugin.ts | 16 +- .../src/server/resources.ts | 0 .../src/server/utils.ts | 0 .../src/swagger/index.json | 0 .../@nocobase/plugin-logger/package.json | 10 +- .../plugins/@nocobase/plugin-map/package.json | 14 +- .../plugin-mobile-client/package.json | 12 +- .../plugin-mock-collections/package.json | 14 +- .../src/server/index.ts | 2 +- .../plugin-multi-app-manager/package.json | 12 +- .../package.json | 20 +- .../server/__tests__/collection-sync.test.ts | 4 + .../src/server/__tests__/index.ts | 2 +- .../src/server/plugin.ts | 4 +- .../plugin-notifications/package.json | 12 +- .../plugins/@nocobase/plugin-oidc/README.md | 11 - .../@nocobase/plugin-oidc/README.zh-CN.md | 38 - .../plugins/@nocobase/plugin-oidc/client.js | 1 - .../@nocobase/plugin-oidc/package.json | 36 - .../plugins/@nocobase/plugin-oidc/server.js | 1 - .../plugin-oidc/src/client/OIDCButton.tsx | 61 -- .../plugin-oidc/src/client/Options.tsx | 355 -------- .../plugin-oidc/src/client/index.tsx | 19 - .../plugin-oidc/src/client/locale/index.ts | 18 - .../@nocobase/plugin-oidc/src/constants.ts | 6 - .../plugin-oidc/src/locale/en-US.json | 40 - .../plugin-oidc/src/locale/es-ES.json | 25 - .../plugin-oidc/src/locale/fr-FR.json | 21 - .../plugin-oidc/src/locale/ko_KR.json | 28 - .../plugin-oidc/src/locale/pt-BR.json | 21 - .../plugin-oidc/src/locale/zh-CN.json | 28 - .../src/server/__tests__/oidc.test.ts | 283 ------- .../src/server/actions/getAuthUrl.ts | 25 - .../src/server/actions/redirect.ts | 32 - .../@nocobase/plugin-oidc/src/server/index.ts | 1 - .../20231007124508-update-autosignup.ts | 34 - .../plugin-oidc/src/server/oidc-auth.ts | 138 --- .../plugin-oidc/src/server/plugin.ts | 64 -- .../plugin-oidc/src/swagger/index.ts | 157 ---- .../plugins/@nocobase/plugin-saml/.npmignore | 2 - .../plugins/@nocobase/plugin-saml/README.md | 11 - .../@nocobase/plugin-saml/README.zh-CN.md | 55 -- .../plugins/@nocobase/plugin-saml/client.d.ts | 2 - .../plugins/@nocobase/plugin-saml/client.js | 1 - .../@nocobase/plugin-saml/package.json | 34 - .../plugins/@nocobase/plugin-saml/server.d.ts | 2 - .../plugins/@nocobase/plugin-saml/server.js | 1 - .../plugin-saml/src/client/Options.tsx | 106 --- .../plugin-saml/src/client/SAMLButton.tsx | 56 -- .../plugin-saml/src/client/index.tsx | 19 - .../plugin-saml/src/client/locale/index.ts | 18 - .../plugin-saml/src/client/schemas/saml.ts | 356 -------- .../@nocobase/plugin-saml/src/constants.ts | 5 - .../plugin-saml/src/locale/en-US.json | 26 - .../plugin-saml/src/locale/es-ES.json | 22 - .../plugin-saml/src/locale/fr-FR.json | 22 - .../plugin-saml/src/locale/ko_KR.json | 29 - .../plugin-saml/src/locale/pt-BR.json | 22 - .../plugin-saml/src/locale/zh-CN.json | 29 - .../src/server/__tests__/saml.test.ts | 239 ------ .../src/server/actions/getAuthUrl.ts | 14 - .../src/server/actions/redirect.ts | 28 - .../@nocobase/plugin-saml/src/server/index.ts | 1 - .../20231008112900-update-autosignup.ts | 33 - .../plugin-saml/src/server/plugin.ts | 48 -- .../plugin-saml/src/server/saml-auth.ts | 94 --- .../plugin-saml/src/swagger/index.ts | 142 ---- .../plugin-sample-hello/package.json | 8 +- .../plugin-sequence-field/.npmignore | 2 - .../@nocobase/plugin-sequence-field/LICENSE | 661 --------------- .../plugin-sequence-field/client.d.ts | 2 - .../@nocobase/plugin-sequence-field/client.js | 1 - .../plugin-sequence-field/server.d.ts | 2 - .../@nocobase/plugin-sequence-field/server.js | 1 - .../plugin-sequence-field/src/index.ts | 2 - .../@nocobase/plugin-sms-auth/.npmignore | 2 - .../plugins/@nocobase/plugin-sms-auth/LICENSE | 661 --------------- .../@nocobase/plugin-sms-auth/client.d.ts | 2 - .../@nocobase/plugin-sms-auth/server.d.ts | 2 - .../@nocobase/plugin-sms-auth/src/index.ts | 2 - .../src/server/collections/.gitkeep | 0 .../plugin-sms-auth/src/server/index.ts | 1 - .../plugin-snapshot-field/package.json | 12 +- .../server/__tests__/fieldsHistory.test.ts | 2 +- .../src/server/__tests__/snapshots.test.ts | 2 +- .../plugin-system-settings/package.json | 10 +- .../plugin-theme-editor/package.json | 14 +- .../plugin-ui-schema-storage/package.json | 22 +- .../server/__tests__/server-hook-impl.test.ts | 4 +- .../src/server/__tests__/server-hook.test.ts | 2 +- .../@nocobase/plugin-users/package.json | 20 +- .../src/server/__tests__/fields.test.ts | 2 +- .../plugin-verification/package.json | 16 +- .../package.json | 10 +- .../plugin-workflow-aggregate/package.json | 10 +- .../plugin-workflow-delay/package.json | 10 +- .../package.json | 16 +- .../plugin-workflow-loop/package.json | 10 +- .../plugin-workflow-manual/package.json | 16 +- .../migrations/20240325213145-fix-schema.ts | 1 + .../plugin-workflow-parallel/package.json | 10 +- .../plugin-workflow-request/package.json | 10 +- .../plugin-workflow-sql/package.json | 10 +- .../plugin-workflow-test/package.json | 8 +- .../@nocobase/plugin-workflow/package.json | 28 +- .../__tests__/triggers/collection.test.ts | 4 +- packages/presets/nocobase/package.json | 113 ++- .../migrations/pro-plugins-detect.test.ts | 96 +++ .../__tests__/migrations/rename.test.ts | 44 + packages/presets/nocobase/src/server/index.ts | 25 +- .../20240424125531-pro-plugins-detect.ts | 92 ++ .../migrations/20240424131556-rename.ts | 32 + .../presets/nocobase/src/server/wording.ts | 34 + yarn.lock | 278 +----- 678 files changed, 13720 insertions(+), 9423 deletions(-) rename packages/{plugins/@nocobase/plugin-cas => core/evaluators}/LICENSE (100%) create mode 100644 packages/core/server/src/migrations/20240427235620-rename-plugins.ts rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/.npmignore (100%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-action-custom-request}/LICENSE (100%) rename packages/plugins/@nocobase/{plugin-cas => plugin-action-custom-request}/client.d.ts (100%) mode change 100644 => 100755 rename packages/plugins/@nocobase/{plugin-cas => plugin-action-custom-request}/client.js (100%) mode change 100644 => 100755 rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/package.json (83%) rename packages/plugins/@nocobase/{plugin-cas => plugin-action-custom-request}/server.d.ts (100%) mode change 100644 => 100755 rename packages/plugins/@nocobase/{plugin-cas => plugin-action-custom-request}/server.js (100%) mode change 100644 => 100755 rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/__e2e__/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/components/CustomRequestAction.tsx (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/components/CustomRequestActionDesigner.tsx (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/components/index.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/constants.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/hooks/index.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/hooks/useCustomRequestVariableOptions.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/hooks/useCustomRequestsResource.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/hooks/useCustomizeRequestActionProps.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/hooks/useGetCustomRequest.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/index.tsx (89%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/initializer/CustomRequestInitializer.tsx (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/initializer/index.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/locale.ts (88%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/schemaSettings.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/schemas/CustomRequestACL.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/schemas/CustomRequestConfigurationFields.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/client/schemas/index.ts (100%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-action-custom-request}/src/index.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/locale/ko_KR.json (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/locale/zh-CN.json (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/server/__tests__/__snapshots__/actions.test.ts.snap (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/server/__tests__/actions.test.ts (97%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/server/actions/listByCurrentRole.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/server/actions/send.ts (99%) rename packages/plugins/@nocobase/{plugin-cas => plugin-action-custom-request}/src/server/collections/.gitkeep (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/server/collections/customRequest.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/server/collections/customRequestsRoles.ts (100%) rename packages/plugins/@nocobase/{plugin-cas => plugin-action-custom-request}/src/server/index.ts (100%) create mode 100644 packages/plugins/@nocobase/plugin-action-custom-request/src/server/migrations/20240425205017-change-locale-module.ts rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-custom-request}/src/server/plugin.ts (91%) rename packages/plugins/@nocobase/{plugin-cas => plugin-action-export}/.npmignore (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-action-export}/LICENSE (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/README.md (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/README.zh-CN.md (100%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-action-export}/client.d.ts (100%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-action-export}/client.js (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/package.json (77%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-action-export}/server.d.ts (100%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-action-export}/server.js (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/client/ExportActionInitializer.tsx (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/client/ExportDesigner.tsx (98%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/client/ExportPluginProvider.tsx (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/client/index.ts (91%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/client/locale/index.ts (79%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/client/schemaSettings.ts (97%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/client/useExportAction.tsx (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/client/useFields.ts (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/client/useShared.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-export}/src/index.ts (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/locale/en-US.json (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/locale/zh-CN.json (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/server/__tests__/utils/utils.test.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request/src/server/collections => plugin-action-export/src/server/actions}/.gitkeep (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/server/actions/export-xlsx.ts (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/server/actions/index.ts (100%) rename packages/plugins/@nocobase/{plugin-export/src/server/actions => plugin-action-export/src/server/collections}/.gitkeep (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/server/index.ts (85%) create mode 100644 packages/plugins/@nocobase/plugin-action-export/src/server/migrations/20240425220631-change-locale-module.ts rename packages/plugins/@nocobase/{plugin-export/src/server/collections => plugin-action-export/src/server/models}/.gitkeep (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/server/renders/index.ts (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/server/renders/renders.ts (97%) rename packages/plugins/@nocobase/{plugin-export/src/server/models => plugin-action-export/src/server/repositories}/.gitkeep (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/server/utils/columns2Appends.ts (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/server/utils/index.ts (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-action-export}/src/swagger/index.json (100%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-action-import}/.npmignore (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-action-import}/LICENSE (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/README.md (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/README.zh-CN.md (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-action-import}/client.d.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-action-import}/client.js (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/package.json (81%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-action-import}/server.d.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-action-import}/server.js (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/client/ImportActionInitializer.tsx (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/client/ImportDesigner.tsx (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/client/ImportModal.tsx (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/client/ImportPluginProvider.tsx (100%) create mode 100644 packages/plugins/@nocobase/plugin-action-import/src/client/constants.ts rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/client/context.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/client/index.ts (93%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/client/locale/index.ts (79%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/client/schemaSettings.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/client/useFields.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/client/useImportAction.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/client/useShared.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/index.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/locale/en-US.json (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/locale/es-ES.json (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/locale/ko_KR.json (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/locale/pt-BR.json (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/locale/zh-CN.json (100%) rename packages/plugins/@nocobase/{plugin-export/src/server/repositories => plugin-action-import/src/server/actions}/.gitkeep (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/server/actions/downloadXlsxTemplate.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/server/actions/importXlsx.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/server/actions/index.ts (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-action-import}/src/server/collections/.gitkeep (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/server/index.ts (92%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/server/locale/en-US.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/server/locale/fr-FR.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/server/locale/index.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/server/locale/zh-CN.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/server/middleware/index.ts (100%) create mode 100644 packages/plugins/@nocobase/plugin-action-import/src/server/migrations/20240425223956-change-locale-module.ts rename packages/plugins/@nocobase/{plugin-import/src/server/actions => plugin-action-import/src/server/models}/.gitkeep (100%) rename packages/plugins/@nocobase/{plugin-import/src/server/collections => plugin-action-import/src/server/repositories}/.gitkeep (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/server/utils/index.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/server/utils/transform.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-action-import}/src/swagger/index.json (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-auth-sms}/.npmignore (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-auth-sms}/LICENSE (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/README.md (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-auth-sms}/client.d.ts (100%) mode change 100755 => 100644 rename packages/plugins/@nocobase/{plugin-localization-management => plugin-auth-sms}/client.js (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/package.json (69%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-auth-sms}/server.d.ts (100%) mode change 100755 => 100644 rename packages/plugins/@nocobase/{plugin-localization-management => plugin-auth-sms}/server.js (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/client/Options.tsx (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/client/SigninPage.tsx (97%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/client/VerificationCode.tsx (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/client/index.tsx (83%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/client/locale/index.ts (77%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/constants.ts (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-auth-sms}/src/index.ts (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/locale/en-US.json (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/locale/ko_KR.json (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/locale/zh-CN.json (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/server/__tests__/signin.test.ts (98%) rename packages/plugins/@nocobase/{plugin-import/src/server/models => plugin-auth-sms/src/server/collections}/.gitkeep (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-auth-sms}/src/server/index.ts (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/server/locale/en-US.ts (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/server/locale/fr-FR.ts (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/server/locale/index.ts (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/server/locale/ja-JP.ts (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/server/locale/pt-BR.ts (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/server/locale/zh-CN.ts (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/server/migrations/20230607180000-sms-authenticator.ts (100%) create mode 100644 packages/plugins/@nocobase/plugin-auth-sms/src/server/migrations/20240425230310-change-locale-module.ts rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/server/plugin.ts (76%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-auth-sms}/src/server/sms-auth.ts (96%) rename packages/plugins/@nocobase/{plugin-export => plugin-block-iframe}/.npmignore (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-block-iframe}/LICENSE (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-block-iframe}/README.md (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-block-iframe}/README.zh-CN.md (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-block-iframe}/client.d.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-block-iframe}/client.js (100%) mode change 100755 => 100644 rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-block-iframe}/package.json (78%) rename packages/plugins/@nocobase/{plugin-export => plugin-block-iframe}/server.d.ts (100%) rename packages/plugins/@nocobase/{plugin-custom-request => plugin-block-iframe}/server.js (100%) mode change 100755 => 100644 rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-block-iframe}/src/client/Iframe.Designer.tsx (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-block-iframe}/src/client/Iframe.tsx (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-block-iframe}/src/client/IframeBlockInitializer.tsx (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-block-iframe}/src/client/IframeBlockProvider.tsx (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-block-iframe}/src/client/index.ts (93%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-block-iframe}/src/client/schemaSettings.ts (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-block-iframe}/src/index.ts (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-block-iframe}/src/server/actions/index.ts (100%) rename packages/plugins/@nocobase/{plugin-import/src/server/repositories => plugin-block-iframe/src/server/collections}/.gitkeep (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-block-iframe}/src/server/collections/iframe-html.ts (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-block-iframe}/src/server/index.ts (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-block-iframe}/src/server/plugin.ts (86%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-block-iframe}/src/swagger/index.ts (100%) delete mode 100644 packages/plugins/@nocobase/plugin-cas/README.md delete mode 100644 packages/plugins/@nocobase/plugin-cas/README.zh-CN.md delete mode 100644 packages/plugins/@nocobase/plugin-cas/package.json delete mode 100644 packages/plugins/@nocobase/plugin-cas/src/client/Options.tsx delete mode 100644 packages/plugins/@nocobase/plugin-cas/src/client/SigninPage.tsx delete mode 100644 packages/plugins/@nocobase/plugin-cas/src/client/index.tsx delete mode 100644 packages/plugins/@nocobase/plugin-cas/src/client/locale/index.ts delete mode 100644 packages/plugins/@nocobase/plugin-cas/src/constants.ts delete mode 100644 packages/plugins/@nocobase/plugin-cas/src/index.ts delete mode 100644 packages/plugins/@nocobase/plugin-cas/src/locale/en-US.json delete mode 100644 packages/plugins/@nocobase/plugin-cas/src/locale/ko_KR.json delete mode 100644 packages/plugins/@nocobase/plugin-cas/src/locale/zh-CN.json delete mode 100644 packages/plugins/@nocobase/plugin-cas/src/server/__tests__/cas.test.ts delete mode 100644 packages/plugins/@nocobase/plugin-cas/src/server/actions/login.ts delete mode 100644 packages/plugins/@nocobase/plugin-cas/src/server/actions/service.ts delete mode 100644 packages/plugins/@nocobase/plugin-cas/src/server/auth.ts delete mode 100644 packages/plugins/@nocobase/plugin-cas/src/server/plugin.ts delete mode 100644 packages/plugins/@nocobase/plugin-collection-manager/src/client/index.ts rename packages/plugins/@nocobase/{plugin-formula-field => plugin-data-source-main}/.npmignore (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-data-source-main}/LICENSE (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/README.md (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/README.zh-CN.md (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-data-source-main}/client.d.ts (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-data-source-main}/client.js (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/package.json (73%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-data-source-main}/server.d.ts (100%) rename packages/plugins/@nocobase/{plugin-export => plugin-data-source-main}/server.js (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/collection-template/calendar.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/collection-template/connectToDatabaseView.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/collection-template/expression.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/collection-template/file.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/collection-template/general.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/collection-template/sql.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/collection-template/tree.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/attachment/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/attachment/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/belongsTo/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/belongsTo/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/checkbox/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/checkbox/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/checkboxGroup/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/checkboxGroup/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/chinaRegion/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/chinaRegion/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/collection/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/collection/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/color/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/color/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/createdAt/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/createdAt/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/createdBy/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/createdBy/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/datetime/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/datetime/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/email/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/email/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/formula/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/formula/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/hasOne/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/hasOne/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/icon/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/icon/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/id/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/id/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/integer/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/integer/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/json/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/json/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/lastUpdatedAt/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/lastUpdatedAt/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/lastUpdatedBy/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/lastUpdatedBy/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/longText/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/longText/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/manyToMany/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/manyToMany/schemaSettings1.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/manyToMany/schemaSettings2.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/manyToMany/schemaSettings3.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/manyToMany/schemaSettings4.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/manyToMany/schemaSettings5.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/manyToOne/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/manyToOne/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/manyToOne/templatesOfBug.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/markdown/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/markdown/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/mutipleSelect/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/mutipleSelect/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/number/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/number/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/oneToMany/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/oneToMany/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/password/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/password/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/percent/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/percent/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/phone/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/phone/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/radioGroup/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/radioGroup/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/richText/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/richText/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/sequence/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/sequence/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/singleLineText/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/singleLineText/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/singleSelect/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/singleSelect/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/tableOID/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/tableOID/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/time/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/time/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/url/schemaInitializer.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/fields/url/schemaSettings.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/client/__e2e__/utils.ts (100%) create mode 100644 packages/plugins/@nocobase/plugin-data-source-main/src/client/index.ts rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/index.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/action.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/associations/reference-integerity-check.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/beforeInitOptions.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/collection-categories.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/collection-load.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/collection-without-id-primary-field.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/collections.repository.test.ts (99%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/field-options/default-value.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/field-options/indexes.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/fields.repository.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/fields/belongs-to-many.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/fields/belongs-to.test.ts (100%) create mode 100644 packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/belongsTo.test.ts rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/fields/destroy.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/fields/hasMany.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/fields/hasOne.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/fields/reverseField.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/fields/uuid.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/http-api/belongs-to-many.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/http-api/collections.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/http-api/find.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/http-api/has-many.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/http-api/inherited-collection.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/http-api/recreate.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/http-api/tree.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/http-api/validate-update-action.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/http-api/view-collection.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/index.ts (72%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/inherits/inherited-collection.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/inherits/inhertied-collection-with-schema.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/migrations/20221104151410-update-collections-hidden.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/migrations/20240420105949-add-sort-field.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/migrations/drop-ui-schema-relation.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/migrations/fix-created-by-field.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/migrations/set-collection-schema.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/migrations/update-id-to-bigint.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/primary-key.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/reference-integerity.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/remove-collection.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/resources/collections.fields.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/resources/collections.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/sql/sql-collection.test.ts (99%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/sync.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/through.test.ts (96%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/view/view-collection.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/__tests__/view/view-with-filter-target-key.test.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/collections/collectionCategories.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/collections/collections.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/collections/fields.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/hooks/afterCreateForForeignKeyField.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/hooks/afterCreateForReverseField.ts (100%) create mode 100644 packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/afterDestroyForForeignKeyField.ts create mode 100644 packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/beforeCreateForChildrenCollection.ts rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/hooks/beforeCreateForReverseField.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/hooks/beforeCreateForValidateField.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/hooks/beforeCreateForViewCollection.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/hooks/beforeDestroyForeignKey.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/hooks/beforeInitOptions.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/hooks/index.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/index.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/migrations/20220613103214-alert-sub-table.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/migrations/20220704225714-drop-foreign-keys.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/migrations/20221101111110-update-foreign-fields.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/migrations/20221104151410-update-collections-hidden.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/migrations/20221121111110-update-fk-type.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/migrations/20221121111113-update-id-to-bigint.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/migrations/20221221103220-timestamps.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/migrations/20230225111112-drop-ui-schema-relation.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/migrations/20230509111114-alert-ui-schema.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/migrations/20230623145414-number-step.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/migrations/20230704222935-tableoid.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/migrations/20230918024546-set-collection-schema.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/migrations/20240220153103-install-main-datasource.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/migrations/20240419182147-fix-created-by-field-target.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/migrations/20240420105949-add-sort-field.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/models/collection.ts (99%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/models/field.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/models/index.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/repositories/collection-repository.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/repositories/index.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/resourcers/collections.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/resourcers/sql.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/resourcers/views.ts (100%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/server/server.ts (98%) rename packages/plugins/@nocobase/{plugin-collection-manager => plugin-data-source-main}/src/swagger/index.ts (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-field-china-region}/.npmignore (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-field-china-region}/LICENSE (100%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-field-china-region}/README.md (100%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-field-china-region}/README.zh-CN.md (100%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-field-china-region}/build.config.ts (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-field-china-region}/client.d.ts (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-china-region}/client.js (100%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-field-china-region}/package.json (79%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-field-china-region}/server.d.ts (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-china-region}/server.js (100%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-field-china-region}/src/client/ChinaRegionProvider.tsx (96%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-field-china-region}/src/client/index.tsx (70%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-field-china-region}/src/index.ts (100%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-field-china-region}/src/server/__tests__/action.test.ts (94%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-field-china-region}/src/server/collections/chinaRegions.ts (100%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-field-china-region}/src/server/index.ts (95%) rename packages/plugins/@nocobase/{plugin-china-region => plugin-field-china-region}/src/swagger/index.json (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-field-formula}/.npmignore (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-field-formula}/LICENSE (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/README.md (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/README.zh-CN.md (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-field-formula}/client.d.ts (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-field-formula}/client.js (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/package.json (78%) rename packages/plugins/@nocobase/{plugin-import => plugin-field-formula}/server.d.ts (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-field-formula}/server.js (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/client/FormulaComponentFieldSettings.tsx (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/client/__e2e__/form-create.test.ts (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/client/__e2e__/utils.ts (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/client/components/Formula/Expression.tsx (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/client/components/Formula/Result.tsx (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/client/components/Formula/demos/demo2.tsx (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/client/components/Formula/index.md (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/client/components/Formula/index.tsx (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/client/components/index.ts (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/client/index.tsx (85%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/client/interfaces/formula.tsx (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/client/locale/index.ts (86%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/client/scopes.tsx (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-field-formula}/src/index.ts (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/locale/en-US.json (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/locale/ko_KR.json (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/locale/zh-CN.json (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/server/__tests__/formula-field.test.ts (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/server/formula-field.ts (100%) rename packages/plugins/@nocobase/{plugin-iframe-block => plugin-field-formula}/src/server/index.ts (100%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/server/migrations/20230213161904-alter-field.ts (100%) create mode 100644 packages/plugins/@nocobase/plugin-field-formula/src/server/migrations/20240425222058-change-locale-module.ts rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/server/plugin.ts (85%) rename packages/plugins/@nocobase/{plugin-formula-field => plugin-field-formula}/src/utils/index.ts (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-field-sequence}/.npmignore (100%) rename packages/plugins/@nocobase/{plugin-oidc => plugin-field-sequence}/LICENSE (100%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/README.md (100%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/README.zh-CN.md (100%) rename packages/plugins/@nocobase/{plugin-oidc => plugin-field-sequence}/client.d.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-field-sequence}/client.js (100%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/package.json (75%) rename packages/plugins/@nocobase/{plugin-oidc => plugin-field-sequence}/server.d.ts (100%) rename packages/plugins/@nocobase/{plugin-import => plugin-field-sequence}/server.js (100%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/client/SequenceFieldProvider.tsx (100%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/client/index.tsx (75%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/client/locale/index.ts (88%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/client/sequence.tsx (100%) rename packages/plugins/@nocobase/{plugin-oidc => plugin-field-sequence}/src/index.ts (100%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/locale/en-US.json (100%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/locale/es-ES.json (100%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/locale/fr-FR.json (100%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/locale/ko_KR.json (100%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/locale/pt-BR.json (100%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/locale/zh-CN.json (100%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/server/Plugin.ts (97%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/server/__tests__/sequence-field.test.ts (99%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/server/collections/sequences.ts (100%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/server/fields/sequence-field.ts (100%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/server/index.ts (100%) rename packages/plugins/@nocobase/{plugin-sequence-field => plugin-field-sequence}/src/server/migrations/20221207022250-sequence-field-key.ts (100%) create mode 100644 packages/plugins/@nocobase/plugin-field-sequence/src/server/migrations/20240425225438-change-locale-module.ts create mode 100644 packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/templates.ts delete mode 100644 packages/plugins/@nocobase/plugin-import/src/client/constants.ts rename packages/plugins/@nocobase/{plugin-oidc => plugin-localization}/.npmignore (100%) rename packages/plugins/@nocobase/{plugin-saml => plugin-localization}/LICENSE (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/README.md (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/client.d.ts (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-localization}/client.js (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/package.json (65%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/server.d.ts (100%) rename packages/plugins/@nocobase/{plugin-sms-auth => plugin-localization}/server.js (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/client/Localization.tsx (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/client/index.tsx (87%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/client/locale/index.ts (76%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/client/schemas/localization.tsx (99%) rename packages/plugins/@nocobase/{plugin-saml => plugin-localization}/src/index.ts (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/locale/en-US.json (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/locale/ko_KR.json (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/locale/zh-CN.json (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/__tests__/actions.test.ts (98%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/__tests__/middleware.test.ts (83%) create mode 100644 packages/plugins/@nocobase/plugin-localization/src/server/__tests__/migrations/delete-pkg-name.test.ts rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/__tests__/resources.test.ts (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/__tests__/sync.test.ts (97%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/__tests__/utils.ts (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/actions/localization.ts (92%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/actions/localizationTexts.ts (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/collections/.gitkeep (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/collections/localization-texts.ts (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/collections/localization-translations.ts (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/constans.ts (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/index.ts (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/migrations/20230706200900-roles-add-translation.ts (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/migrations/20231206161851-fix-module.ts (100%) create mode 100644 packages/plugins/@nocobase/plugin-localization/src/server/migrations/20240425224508-change-locale-module.ts create mode 100644 packages/plugins/@nocobase/plugin-localization/src/server/migrations/20240426123538-delete-pkg-name-ns.ts rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/plugin.ts (93%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/resources.ts (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/server/utils.ts (100%) rename packages/plugins/@nocobase/{plugin-localization-management => plugin-localization}/src/swagger/index.json (100%) delete mode 100644 packages/plugins/@nocobase/plugin-oidc/README.md delete mode 100644 packages/plugins/@nocobase/plugin-oidc/README.zh-CN.md delete mode 100644 packages/plugins/@nocobase/plugin-oidc/client.js delete mode 100644 packages/plugins/@nocobase/plugin-oidc/package.json delete mode 100644 packages/plugins/@nocobase/plugin-oidc/server.js delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/client/OIDCButton.tsx delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/client/Options.tsx delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/client/index.tsx delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/client/locale/index.ts delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/constants.ts delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/locale/en-US.json delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/locale/es-ES.json delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/locale/fr-FR.json delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/locale/ko_KR.json delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/locale/pt-BR.json delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/locale/zh-CN.json delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/server/__tests__/oidc.test.ts delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/server/actions/getAuthUrl.ts delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/server/actions/redirect.ts delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/server/index.ts delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/server/migrations/20231007124508-update-autosignup.ts delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/server/oidc-auth.ts delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/server/plugin.ts delete mode 100644 packages/plugins/@nocobase/plugin-oidc/src/swagger/index.ts delete mode 100644 packages/plugins/@nocobase/plugin-saml/.npmignore delete mode 100644 packages/plugins/@nocobase/plugin-saml/README.md delete mode 100644 packages/plugins/@nocobase/plugin-saml/README.zh-CN.md delete mode 100644 packages/plugins/@nocobase/plugin-saml/client.d.ts delete mode 100644 packages/plugins/@nocobase/plugin-saml/client.js delete mode 100644 packages/plugins/@nocobase/plugin-saml/package.json delete mode 100644 packages/plugins/@nocobase/plugin-saml/server.d.ts delete mode 100644 packages/plugins/@nocobase/plugin-saml/server.js delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/client/Options.tsx delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/client/SAMLButton.tsx delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/client/index.tsx delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/client/locale/index.ts delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/client/schemas/saml.ts delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/constants.ts delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/locale/en-US.json delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/locale/es-ES.json delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/locale/fr-FR.json delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/locale/ko_KR.json delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/locale/pt-BR.json delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/locale/zh-CN.json delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/server/__tests__/saml.test.ts delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/server/actions/getAuthUrl.ts delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/server/actions/redirect.ts delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/server/index.ts delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/server/migrations/20231008112900-update-autosignup.ts delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/server/plugin.ts delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/server/saml-auth.ts delete mode 100644 packages/plugins/@nocobase/plugin-saml/src/swagger/index.ts delete mode 100644 packages/plugins/@nocobase/plugin-sequence-field/.npmignore delete mode 100644 packages/plugins/@nocobase/plugin-sequence-field/LICENSE delete mode 100644 packages/plugins/@nocobase/plugin-sequence-field/client.d.ts delete mode 100644 packages/plugins/@nocobase/plugin-sequence-field/client.js delete mode 100644 packages/plugins/@nocobase/plugin-sequence-field/server.d.ts delete mode 100644 packages/plugins/@nocobase/plugin-sequence-field/server.js delete mode 100644 packages/plugins/@nocobase/plugin-sequence-field/src/index.ts delete mode 100644 packages/plugins/@nocobase/plugin-sms-auth/.npmignore delete mode 100644 packages/plugins/@nocobase/plugin-sms-auth/LICENSE delete mode 100644 packages/plugins/@nocobase/plugin-sms-auth/client.d.ts delete mode 100644 packages/plugins/@nocobase/plugin-sms-auth/server.d.ts delete mode 100644 packages/plugins/@nocobase/plugin-sms-auth/src/index.ts delete mode 100644 packages/plugins/@nocobase/plugin-sms-auth/src/server/collections/.gitkeep delete mode 100644 packages/plugins/@nocobase/plugin-sms-auth/src/server/index.ts create mode 100644 packages/presets/nocobase/src/server/__tests__/migrations/pro-plugins-detect.test.ts create mode 100644 packages/presets/nocobase/src/server/__tests__/migrations/rename.test.ts create mode 100644 packages/presets/nocobase/src/server/migrations/20240424125531-pro-plugins-detect.ts create mode 100644 packages/presets/nocobase/src/server/migrations/20240424131556-rename.ts create mode 100644 packages/presets/nocobase/src/server/wording.ts diff --git a/lerna.json b/lerna.json index f357f61158..0edadf8c58 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "npmClient": "yarn", "useWorkspaces": true, "npmClientArgs": ["--ignore-engines"], diff --git a/package.json b/package.json index cc28b0357c..6514aab7bc 100644 --- a/package.json +++ b/package.json @@ -5,14 +5,14 @@ "packages/*/*", "packages/*/*/*" ], - "license": "Apache-2.0", + "license": "AGPL-3.0", "engines": { "node": ">=18" }, "licenses": [ { - "type": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0" + "type": "AGPL-3.0", + "url": "https://www.gnu.org/licenses/agpl-3.0.html" } ], "scripts": { diff --git a/packages/core/acl/LICENSE b/packages/core/acl/LICENSE index f49a4e16e6..0ad25db4bd 100644 --- a/packages/core/acl/LICENSE +++ b/packages/core/acl/LICENSE @@ -1,201 +1,661 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. - 1. Definitions. + Preamble - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. + The precise terms and conditions for copying, distribution and +modification follow. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + TERMS AND CONDITIONS - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + 0. Definitions. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. + "This License" refers to version 3 of the GNU Affero General Public License. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + A "covered work" means either the unmodified Program or a work based +on the Program. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. + 1. Source Code. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. - END OF TERMS AND CONDITIONS + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - APPENDIX: How to apply the Apache License to your work. + The Corresponding Source for a work in source code form is that +same work. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. + 2. Basic Permissions. - Copyright [yyyy] [name of copyright owner] + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. - http://www.apache.org/licenses/LICENSE-2.0 + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/packages/core/acl/package.json b/packages/core/acl/package.json index 5ede46ad5b..4a2ff68d8e 100644 --- a/packages/core/acl/package.json +++ b/packages/core/acl/package.json @@ -1,13 +1,13 @@ { "name": "@nocobase/acl", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "description": "", - "license": "Apache-2.0", + "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/resourcer": "0.21.0-alpha.16", - "@nocobase/utils": "0.21.0-alpha.16", + "@nocobase/resourcer": "1.0.0-alpha.1", + "@nocobase/utils": "1.0.0-alpha.1", "minimatch": "^5.1.1" }, "repository": { diff --git a/packages/core/actions/LICENSE b/packages/core/actions/LICENSE index f49a4e16e6..0ad25db4bd 100644 --- a/packages/core/actions/LICENSE +++ b/packages/core/actions/LICENSE @@ -1,201 +1,661 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. - 1. Definitions. + Preamble - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. + The precise terms and conditions for copying, distribution and +modification follow. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + TERMS AND CONDITIONS - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + 0. Definitions. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. + "This License" refers to version 3 of the GNU Affero General Public License. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + A "covered work" means either the unmodified Program or a work based +on the Program. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. + 1. Source Code. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. - END OF TERMS AND CONDITIONS + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - APPENDIX: How to apply the Apache License to your work. + The Corresponding Source for a work in source code form is that +same work. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. + 2. Basic Permissions. - Copyright [yyyy] [name of copyright owner] + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. - http://www.apache.org/licenses/LICENSE-2.0 + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/packages/core/actions/package.json b/packages/core/actions/package.json index 743d85ec0a..05dd5590f1 100644 --- a/packages/core/actions/package.json +++ b/packages/core/actions/package.json @@ -1,14 +1,14 @@ { "name": "@nocobase/actions", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "description": "", - "license": "Apache-2.0", + "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/cache": "0.21.0-alpha.16", - "@nocobase/database": "0.21.0-alpha.16", - "@nocobase/resourcer": "0.21.0-alpha.16" + "@nocobase/cache": "1.0.0-alpha.1", + "@nocobase/database": "1.0.0-alpha.1", + "@nocobase/resourcer": "1.0.0-alpha.1" }, "repository": { "type": "git", diff --git a/packages/core/app/package.json b/packages/core/app/package.json index faf7ad4bf9..8cf9a73bfe 100644 --- a/packages/core/app/package.json +++ b/packages/core/app/package.json @@ -1,17 +1,17 @@ { "name": "@nocobase/app", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/database": "0.21.0-alpha.16", - "@nocobase/preset-nocobase": "0.21.0-alpha.16", - "@nocobase/server": "0.21.0-alpha.16" + "@nocobase/database": "1.0.0-alpha.1", + "@nocobase/preset-nocobase": "1.0.0-alpha.1", + "@nocobase/server": "1.0.0-alpha.1" }, "devDependencies": { - "@nocobase/client": "0.21.0-alpha.16" + "@nocobase/client": "1.0.0-alpha.1" }, "repository": { "type": "git", diff --git a/packages/core/auth/LICENSE b/packages/core/auth/LICENSE index f49a4e16e6..0ad25db4bd 100644 --- a/packages/core/auth/LICENSE +++ b/packages/core/auth/LICENSE @@ -1,201 +1,661 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. - 1. Definitions. + Preamble - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. + The precise terms and conditions for copying, distribution and +modification follow. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + TERMS AND CONDITIONS - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + 0. Definitions. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. + "This License" refers to version 3 of the GNU Affero General Public License. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + A "covered work" means either the unmodified Program or a work based +on the Program. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. + 1. Source Code. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. - END OF TERMS AND CONDITIONS + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - APPENDIX: How to apply the Apache License to your work. + The Corresponding Source for a work in source code form is that +same work. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. + 2. Basic Permissions. - Copyright [yyyy] [name of copyright owner] + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. - http://www.apache.org/licenses/LICENSE-2.0 + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/packages/core/auth/package.json b/packages/core/auth/package.json index 2194a9431f..6c569e0e90 100644 --- a/packages/core/auth/package.json +++ b/packages/core/auth/package.json @@ -1,16 +1,16 @@ { "name": "@nocobase/auth", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "description": "", - "license": "Apache-2.0", + "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/actions": "0.21.0-alpha.16", - "@nocobase/cache": "0.21.0-alpha.16", - "@nocobase/database": "0.21.0-alpha.16", - "@nocobase/resourcer": "0.21.0-alpha.16", - "@nocobase/utils": "0.21.0-alpha.16", + "@nocobase/actions": "1.0.0-alpha.1", + "@nocobase/cache": "1.0.0-alpha.1", + "@nocobase/database": "1.0.0-alpha.1", + "@nocobase/resourcer": "1.0.0-alpha.1", + "@nocobase/utils": "1.0.0-alpha.1", "@types/jsonwebtoken": "^8.5.8", "jsonwebtoken": "^8.5.1" }, diff --git a/packages/core/build/LICENSE b/packages/core/build/LICENSE index f49a4e16e6..0ad25db4bd 100644 --- a/packages/core/build/LICENSE +++ b/packages/core/build/LICENSE @@ -1,201 +1,661 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. - 1. Definitions. + Preamble - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. + The precise terms and conditions for copying, distribution and +modification follow. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + TERMS AND CONDITIONS - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + 0. Definitions. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. + "This License" refers to version 3 of the GNU Affero General Public License. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + A "covered work" means either the unmodified Program or a work based +on the Program. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. + 1. Source Code. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. - END OF TERMS AND CONDITIONS + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - APPENDIX: How to apply the Apache License to your work. + The Corresponding Source for a work in source code form is that +same work. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. + 2. Basic Permissions. - Copyright [yyyy] [name of copyright owner] + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. - http://www.apache.org/licenses/LICENSE-2.0 + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/packages/core/build/package.json b/packages/core/build/package.json index 9fcbcbe5f4..ba21045027 100755 --- a/packages/core/build/package.json +++ b/packages/core/build/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/build", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "description": "Library build tool based on rollup.", "main": "lib/index.js", "types": "./lib/index.d.ts", @@ -32,7 +32,7 @@ "vite-plugin-lib-inject-css": "1.2.0", "yargs-parser": "13.1.2" }, - "license": "Apache-2.0", + "license": "AGPL-3.0", "scripts": { "build": "tsup" }, diff --git a/packages/core/cache/LICENSE b/packages/core/cache/LICENSE index f49a4e16e6..0ad25db4bd 100644 --- a/packages/core/cache/LICENSE +++ b/packages/core/cache/LICENSE @@ -1,201 +1,661 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. - 1. Definitions. + Preamble - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. + The precise terms and conditions for copying, distribution and +modification follow. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + TERMS AND CONDITIONS - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + 0. Definitions. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. + "This License" refers to version 3 of the GNU Affero General Public License. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + A "covered work" means either the unmodified Program or a work based +on the Program. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. + 1. Source Code. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. - END OF TERMS AND CONDITIONS + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - APPENDIX: How to apply the Apache License to your work. + The Corresponding Source for a work in source code form is that +same work. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. + 2. Basic Permissions. - Copyright [yyyy] [name of copyright owner] + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. - http://www.apache.org/licenses/LICENSE-2.0 + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/packages/core/cache/package.json b/packages/core/cache/package.json index 82dabe9b23..d1c305bef6 100644 --- a/packages/core/cache/package.json +++ b/packages/core/cache/package.json @@ -1,8 +1,8 @@ { "name": "@nocobase/cache", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "description": "", - "license": "Apache-2.0", + "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { diff --git a/packages/core/cli/LICENSE b/packages/core/cli/LICENSE index f49a4e16e6..0ad25db4bd 100644 --- a/packages/core/cli/LICENSE +++ b/packages/core/cli/LICENSE @@ -1,201 +1,661 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. - 1. Definitions. + Preamble - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. + The precise terms and conditions for copying, distribution and +modification follow. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + TERMS AND CONDITIONS - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + 0. Definitions. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. + "This License" refers to version 3 of the GNU Affero General Public License. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + A "covered work" means either the unmodified Program or a work based +on the Program. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. + 1. Source Code. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. - END OF TERMS AND CONDITIONS + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - APPENDIX: How to apply the Apache License to your work. + The Corresponding Source for a work in source code form is that +same work. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. + 2. Basic Permissions. - Copyright [yyyy] [name of copyright owner] + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. - http://www.apache.org/licenses/LICENSE-2.0 + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/packages/core/cli/package.json b/packages/core/cli/package.json index 29b1745407..a893131afc 100644 --- a/packages/core/cli/package.json +++ b/packages/core/cli/package.json @@ -1,14 +1,14 @@ { "name": "@nocobase/cli", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "description": "", - "license": "Apache-2.0", + "license": "AGPL-3.0", "main": "./src/index.js", "bin": { "nocobase": "./bin/index.js" }, "dependencies": { - "@nocobase/app": "0.21.0-alpha.16", + "@nocobase/app": "1.0.0-alpha.1", "@types/fs-extra": "^11.0.1", "@umijs/utils": "3.5.20", "chalk": "^4.1.1", @@ -25,7 +25,7 @@ "tsx": "^4.6.2" }, "devDependencies": { - "@nocobase/devtools": "0.21.0-alpha.16" + "@nocobase/devtools": "1.0.0-alpha.1" }, "repository": { "type": "git", diff --git a/packages/core/cli/templates/plugin/package.json.tpl b/packages/core/cli/templates/plugin/package.json.tpl index b0bcdc7862..14e9e94999 100644 --- a/packages/core/cli/templates/plugin/package.json.tpl +++ b/packages/core/cli/templates/plugin/package.json.tpl @@ -4,8 +4,8 @@ "main": "dist/server/index.js", "dependencies": {}, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/client": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" } } diff --git a/packages/core/client/LICENSE b/packages/core/client/LICENSE index f49a4e16e6..0ad25db4bd 100644 --- a/packages/core/client/LICENSE +++ b/packages/core/client/LICENSE @@ -1,201 +1,661 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. - 1. Definitions. + Preamble - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. + The precise terms and conditions for copying, distribution and +modification follow. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + TERMS AND CONDITIONS - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + 0. Definitions. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. + "This License" refers to version 3 of the GNU Affero General Public License. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + A "covered work" means either the unmodified Program or a work based +on the Program. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. + 1. Source Code. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. - END OF TERMS AND CONDITIONS + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - APPENDIX: How to apply the Apache License to your work. + The Corresponding Source for a work in source code form is that +same work. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. + 2. Basic Permissions. - Copyright [yyyy] [name of copyright owner] + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. - http://www.apache.org/licenses/LICENSE-2.0 + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/packages/core/client/package.json b/packages/core/client/package.json index 6d47bc27d0..ea4068c761 100644 --- a/packages/core/client/package.json +++ b/packages/core/client/package.json @@ -1,7 +1,7 @@ { "name": "@nocobase/client", - "version": "0.21.0-alpha.16", - "license": "Apache-2.0", + "version": "1.0.0-alpha.1", + "license": "AGPL-3.0", "main": "lib/index.js", "module": "es/index.mjs", "types": "es/index.d.ts", @@ -26,9 +26,9 @@ "@formily/reactive-react": "^2.2.27", "@formily/shared": "^2.2.27", "@formily/validator": "^2.2.27", - "@nocobase/evaluators": "0.21.0-alpha.16", - "@nocobase/sdk": "0.21.0-alpha.16", - "@nocobase/utils": "0.21.0-alpha.16", + "@nocobase/evaluators": "1.0.0-alpha.1", + "@nocobase/sdk": "1.0.0-alpha.1", + "@nocobase/utils": "1.0.0-alpha.1", "ahooks": "^3.7.2", "antd": "^5.12.8", "antd-style": "3.4.5", diff --git a/packages/core/client/src/nocobase-buildin-plugin/index.tsx b/packages/core/client/src/nocobase-buildin-plugin/index.tsx index 38f5335618..8aa1a402ce 100644 --- a/packages/core/client/src/nocobase-buildin-plugin/index.tsx +++ b/packages/core/client/src/nocobase-buildin-plugin/index.tsx @@ -213,7 +213,7 @@ const AppMaintaining: FC<{ app: Application; error: Error }> = observer( icon={icon} status={status} title={app.i18n.t(title)} - subTitle={app.i18n.t(subTitle)} + subTitle={
{app.i18n.t(subTitle)}
} // extra={[ // - - ); -}; diff --git a/packages/plugins/@nocobase/plugin-cas/src/client/index.tsx b/packages/plugins/@nocobase/plugin-cas/src/client/index.tsx deleted file mode 100644 index b58778116f..0000000000 --- a/packages/plugins/@nocobase/plugin-cas/src/client/index.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { Plugin } from '@nocobase/client'; -import { SigninPage } from './SigninPage'; -import { Options } from './Options'; -import { authType } from '../constants'; -import AuthPlugin from '@nocobase/plugin-auth/client'; - -export class PluginCASClient extends Plugin { - async load() { - const auth = this.app.pm.get(AuthPlugin); - auth.registerType(authType, { - components: { - SignInButton: SigninPage, - AdminSettingsForm: Options, - }, - }); - } -} - -export default PluginCASClient; diff --git a/packages/plugins/@nocobase/plugin-cas/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-cas/src/client/locale/index.ts deleted file mode 100644 index 153a97e091..0000000000 --- a/packages/plugins/@nocobase/plugin-cas/src/client/locale/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { useTranslation } from 'react-i18next'; - -export const NAMESPACE = 'cas'; - -export function useAuthTranslation() { - return useTranslation(NAMESPACE); -} - -export function generateNTemplate(key: string) { - return `{{t('${key}', { ns: '${NAMESPACE}', nsMode: 'fallback' })}}`; -} diff --git a/packages/plugins/@nocobase/plugin-cas/src/constants.ts b/packages/plugins/@nocobase/plugin-cas/src/constants.ts deleted file mode 100644 index b81da2e1a1..0000000000 --- a/packages/plugins/@nocobase/plugin-cas/src/constants.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const authType = 'CAS'; -export const COOKIE_KEY_TICKET = '_cas_ticket_'; -export const COOKIE_KEY_AUTHENTICATOR = '_cas_authenticator_'; -export const namespace = 'cas'; diff --git a/packages/plugins/@nocobase/plugin-cas/src/index.ts b/packages/plugins/@nocobase/plugin-cas/src/index.ts deleted file mode 100644 index 7ddad58145..0000000000 --- a/packages/plugins/@nocobase/plugin-cas/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './server'; diff --git a/packages/plugins/@nocobase/plugin-cas/src/locale/en-US.json b/packages/plugins/@nocobase/plugin-cas/src/locale/en-US.json deleted file mode 100644 index 17d37a8e19..0000000000 --- a/packages/plugins/@nocobase/plugin-cas/src/locale/en-US.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "Sign in": "Sign in", - "User will be registered automatically if not exists.": "User will be registered automatically if not exists.", - "Sign up automatically when the user does not exist": "Sign up automatically when the user does not exist", - "Service domain": "Service domain", - "The domain is usually the address of your server, in local development, you can use the address of your local machine, such as: http://localhost:13000": "The domain is usually the address of your server, in local development, you can use the address of your local machine, such as: http://localhost:13000" -} diff --git a/packages/plugins/@nocobase/plugin-cas/src/locale/ko_KR.json b/packages/plugins/@nocobase/plugin-cas/src/locale/ko_KR.json deleted file mode 100644 index 4e79ab8ffc..0000000000 --- a/packages/plugins/@nocobase/plugin-cas/src/locale/ko_KR.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Sign in": "로그인", - "User will be registered automatically if not exists.": "사용자가 존재하지 않으면 자동으로 등록됩니다.", - "Sign up automatically when the user does not exist": "사용자가 존재하지 않을 경우 자동으로 가입", - "Service domain": "서비스 도메인", - "The domain is usually the address of your server, in local development, you can use the address of your local machine, such as: http://localhost:13000": - "도메인은 일반적으로 서버의 주소입니다. 로컬 개발에서는 로컬 머신의 주소를 사용할 수 있습니다. 예: http://localhost:13000" - } diff --git a/packages/plugins/@nocobase/plugin-cas/src/locale/zh-CN.json b/packages/plugins/@nocobase/plugin-cas/src/locale/zh-CN.json deleted file mode 100644 index ccae2ee999..0000000000 --- a/packages/plugins/@nocobase/plugin-cas/src/locale/zh-CN.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "Sign in": "统一身份登录", - "User will be registered automatically if not exists.": "用户不存在时将自动注册。", - "Sign up automatically when the user does not exist": "用户不存在时自动注册", - "Service domain": "服务域名", - "The domain is usually the address of your server, in local development, you can use the address of your local machine, such as: http://localhost:13000": "域名通常是你的服务器地址,在本地开发时,可以使用你本机的地址,例如:http://localhost:13000" -} diff --git a/packages/plugins/@nocobase/plugin-cas/src/server/__tests__/cas.test.ts b/packages/plugins/@nocobase/plugin-cas/src/server/__tests__/cas.test.ts deleted file mode 100644 index 49183e2596..0000000000 --- a/packages/plugins/@nocobase/plugin-cas/src/server/__tests__/cas.test.ts +++ /dev/null @@ -1,160 +0,0 @@ -import { Database } from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; -import { vi } from 'vitest'; -import { authType } from '../../constants'; -import axios from 'axios'; -import { CASAuth } from '../auth'; -import { AppSupervisor } from '@nocobase/server'; - -describe('cas', () => { - let app: MockServer; - let db: Database; - let agent; - let authenticator; - - beforeAll(async () => { - app = await createMockServer({ - plugins: ['users', 'auth', 'cas'], - }); - db = app.db; - agent = app.agent(); - - const authenticatorRepo = db.getRepository('authenticators'); - authenticator = await authenticatorRepo.create({ - values: { - name: 'cas-auth', - authType: authType, - enabled: 1, - options: { - casUrl: 'http://localhost:3000/cas', - serviceDomain: 'http://localhost:13000', - }, - }, - }); - }); - - afterAll(async () => { - await app.destroy(); - }); - - afterEach(async () => { - vi.restoreAllMocks(); - await db.getRepository('users').destroy({ - truncate: true, - }); - }); - - it('should not sign in without auto signup', async () => { - await authenticator.update({ - options: { - ...authenticator.options, - autoSignup: false, - }, - }); - vi.spyOn(axios, 'get').mockResolvedValue({ - data: ` - - - test-user - PGTIOU-84678-8a9d... - - - -`, - }); - - const res = await agent.set('X-Authenticator', 'cas-auth').get('/auth:signIn?ticket=test-ticket'); - - expect(res.statusCode).toBe(401); - expect(res.text).toBe('User not found'); - }); - - it('should sign in with auto signup', async () => { - await authenticator.update({ - options: { - ...authenticator.options, - autoSignup: true, - }, - }); - vi.spyOn(axios, 'get').mockResolvedValue({ - data: ` - - - test-user - PGTIOU-84678-8a9d... - - - -`, - }); - - const res = await agent.set('X-Authenticator', 'cas-auth').get('/auth:signIn?ticket=test-ticket'); - - expect(res.statusCode).toBe(200); - expect(res.body.data.user).toBeDefined(); - expect(res.body.data.user.nickname).toBe('test-user'); - }); - - it('missing ticket', async () => { - const res = await agent.set('X-Authenticator', 'cas-auth').get('/auth:signIn'); - expect(res.statusCode).toBe(401); - expect(res.text).toBe('Missing ticket'); - }); - - it('invalid ticket', async () => { - vi.spyOn(axios, 'get').mockResolvedValue({ - data: ` - - - Ticket ST-1856339-aA5Yuvrxzpv8Tau1cYQ7 not recognized - - -`, - }); - - const res = await agent.set('X-Authenticator', 'cas-auth').get('/auth:signIn?ticket=test-ticket'); - expect(res.statusCode).toBe(401); - expect(res.text).toBe('Invalid ticket'); - }); - - it('cas:login', async () => { - const res = await agent.get('/cas:login?authenticator=cas-auth'); - expect(res.statusCode).toBe(302); - const service = encodeURIComponent( - `http://localhost:13000${process.env.API_BASE_URL || '/api/'}cas:service?authenticator=cas-auth&__appName=${ - app.name - }&redirect=/admin`, - ); - expect(res.headers.location).toBe(`http://localhost:3000/cas/login?service=${service}`); - }); - - it('cas:service', async () => { - vi.spyOn(CASAuth.prototype, 'signIn').mockResolvedValue({ - user: {} as any, - token: 'test-token', - }); - const res = await agent.get('/cas:service?authenticator=cas-auth&__appName=main'); - expect(res.statusCode).toBe(302); - expect(res.headers.location).toBe(`/admin?authenticator=cas-auth&token=test-token`); - }); - - it('cas:service, sub app', async () => { - vi.spyOn(CASAuth.prototype, 'signIn').mockResolvedValue({ - user: {} as any, - token: 'test-token', - }); - vi.spyOn(AppSupervisor, 'getInstance').mockReturnValue({ - runningMode: 'multiple', - } as any); - const res = await agent.get('/cas:service?authenticator=cas-auth&__appName=sub'); - expect(res.statusCode).toBe(302); - expect(res.headers.location).toBe(`/apps/sub/admin?authenticator=cas-auth&token=test-token`); - }); - - it('cas:service, error', async () => { - vi.spyOn(CASAuth.prototype, 'signIn').mockRejectedValue(new Error('test error')); - const res = await agent.get('/cas:service?authenticator=cas-auth&__appName=main'); - expect(res.statusCode).toBe(302); - expect(res.headers.location).toBe(`/signin?authenticator=cas-auth&error=test%20error&redirect=/admin`); - }); -}); diff --git a/packages/plugins/@nocobase/plugin-cas/src/server/actions/login.ts b/packages/plugins/@nocobase/plugin-cas/src/server/actions/login.ts deleted file mode 100644 index d35df9ca29..0000000000 --- a/packages/plugins/@nocobase/plugin-cas/src/server/actions/login.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Context, Next } from '@nocobase/actions'; -import { CASAuth } from '../auth'; - -export const login = async (ctx: Context, next: Next) => { - const { authenticator, redirect = '/admin' } = ctx.action.params; - const auth = (await ctx.app.authManager.get(authenticator, ctx)) as CASAuth; - const { casUrl } = auth.getOptions(); - const service = auth.getService(authenticator, ctx.app.name, redirect); - ctx.redirect(`${casUrl}/login?service=${service}`); - next(); -}; diff --git a/packages/plugins/@nocobase/plugin-cas/src/server/actions/service.ts b/packages/plugins/@nocobase/plugin-cas/src/server/actions/service.ts deleted file mode 100644 index 27bc88568f..0000000000 --- a/packages/plugins/@nocobase/plugin-cas/src/server/actions/service.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Context, Next } from '@nocobase/actions'; -import { AppSupervisor } from '@nocobase/server'; -import { CASAuth } from '../auth'; - -export const service = async (ctx: Context, next: Next) => { - const { authenticator, __appName: appName, redirect } = ctx.action.params; - - let prefix = process.env.APP_PUBLIC_PATH || ''; - if (appName && appName !== 'main') { - const appSupervisor = AppSupervisor.getInstance(); - if (appSupervisor?.runningMode !== 'single') { - prefix += `apps/${appName}`; - } - } - - const auth = (await ctx.app.authManager.get(authenticator, ctx)) as CASAuth; - - if (prefix.endsWith('/')) { - prefix = prefix.slice(0, -1); - } - - try { - const { token } = await auth.signIn(); - ctx.redirect(`${prefix}${redirect || '/admin'}?authenticator=${authenticator}&token=${token}`); - } catch (error) { - ctx.redirect( - `${prefix}/signin?authenticator=${authenticator}&error=${error.message}&redirect=${redirect || '/admin'}`, - ); - } - return next(); -}; diff --git a/packages/plugins/@nocobase/plugin-cas/src/server/auth.ts b/packages/plugins/@nocobase/plugin-cas/src/server/auth.ts deleted file mode 100644 index 69c7a0e8cf..0000000000 --- a/packages/plugins/@nocobase/plugin-cas/src/server/auth.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { AuthConfig, BaseAuth } from '@nocobase/auth'; -import { AuthModel } from '@nocobase/plugin-auth'; -import axios from 'axios'; - -export class CASAuth extends BaseAuth { - constructor(config: AuthConfig) { - const { ctx } = config; - super({ - ...config, - userCollection: ctx.db.getCollection('users'), - }); - } - - getOptions(): { - casUrl?: string; - serviceUrl?: string; - autoSignup?: boolean; - } { - const opts = this.options || {}; - return { - ...opts, - serviceUrl: `${opts.serviceDomain}${process.env.API_BASE_PATH}cas:service`, - }; - } - - getService(authenticator: string, appName: string, redirect: string) { - const { serviceUrl } = this.getOptions(); - return encodeURIComponent(`${serviceUrl}?authenticator=${authenticator}&__appName=${appName}&redirect=${redirect}`); - } - - async serviceValidate(ticket: string) { - const { casUrl } = this.getOptions(); - const { authenticator, __appName: appName, redirect = '/admin' } = this.ctx.action.params; - const service = this.getService(authenticator, appName, redirect); - const url = `${casUrl}/serviceValidate?ticket=${ticket}&service=${service}`; - this.ctx.logger.debug(`serviceValidate url: ${url}`, { - module: 'auth', - submodule: 'cas', - method: 'serviceValidate', - }); - try { - const res = await axios.get(url); - return res; - } catch (error) { - throw new Error('CSA serviceValidate error: ' + error.message); - } - } - - async validate() { - const ctx = this.ctx; - const { autoSignup } = this.getOptions(); - const { ticket } = ctx.action.params; - if (!ticket) { - throw new Error('Missing ticket'); - } - const res = await this.serviceValidate(ticket); - ctx.logger.debug(res?.data, { module: 'auth', submodule: 'cas', method: 'validate' }); - const pattern = /<(?:cas|sso):user>(.*?)<\/(?:cas|sso):user>/; - const username = res?.data.match(pattern)?.[1]; - if (!username) { - throw new Error('Invalid ticket'); - } - const authenticator = this.authenticator as AuthModel; - let user = await authenticator.findUser(username); - if (user) { - return user; - } - // Bind existed user - user = await this.userRepository.findOne({ - filter: { username }, - }); - if (user) { - await this.authenticator.addUser(user, { - through: { - uuid: username, - }, - }); - return user; - } - // New data - if (!autoSignup) { - throw new Error('User not found'); - } - if (!this.validateUsername(username as string)) { - throw new Error('Username must be 2-16 characters in length (excluding @.<>"\'/)'); - } - return await authenticator.newUser(username, { - username: username, - nickname: username, - }); - } -} diff --git a/packages/plugins/@nocobase/plugin-cas/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-cas/src/server/plugin.ts deleted file mode 100644 index 21fc269383..0000000000 --- a/packages/plugins/@nocobase/plugin-cas/src/server/plugin.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; -import { service } from './actions/service'; -import { authType } from '../constants'; -import { CASAuth } from './auth'; -import { login } from './actions/login'; - -export class CasPlugin extends Plugin { - afterAdd() {} - - beforeLoad() {} - - async load() { - this.app.authManager.registerTypes(authType, { - auth: CASAuth, - }); - - this.app.resource({ - name: 'cas', - actions: { - service, - login, - }, - }); - - this.app.acl.allow('cas', '*', 'public'); - } - - async install(options?: InstallOptions) {} - - async afterEnable() {} - - async afterDisable() {} - - async remove() {} -} - -export default CasPlugin; -// diff --git a/packages/plugins/@nocobase/plugin-charts/package.json b/packages/plugins/@nocobase/plugin-charts/package.json index c65b83325a..ead0e3c52b 100644 --- a/packages/plugins/@nocobase/plugin-charts/package.json +++ b/packages/plugins/@nocobase/plugin-charts/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "图表(废弃)", "description": "The plugin has been deprecated, please use the data visualization plugin instead.", "description.zh-CN": "已废弃插件,请使用数据可视化插件代替。", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "main": "./dist/server/index.js", "license": "AGPL-3.0", "devDependencies": { @@ -20,11 +20,11 @@ "react-router-dom": "^6.11.2" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" } diff --git a/packages/plugins/@nocobase/plugin-client/package.json b/packages/plugins/@nocobase/plugin-client/package.json index cdd1985a14..4eef7fe0cb 100644 --- a/packages/plugins/@nocobase/plugin-client/package.json +++ b/packages/plugins/@nocobase/plugin-client/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "WEB 客户端", "description": "Provides a client interface for the NocoBase server", "description.zh-CN": "为 NocoBase 服务端提供客户端界面", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "main": "./dist/server/index.js", "license": "AGPL-3.0", "devDependencies": { @@ -14,11 +14,11 @@ "koa-static": "^5.0.0" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" } diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/index.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/index.ts deleted file mode 100644 index 6503ef8540..0000000000 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Plugin } from '@nocobase/client'; - -class PluginCollectionManagerClient extends Plugin { - async load() {} -} - -export default PluginCollectionManagerClient; diff --git a/packages/plugins/@nocobase/plugin-formula-field/.npmignore b/packages/plugins/@nocobase/plugin-data-source-main/.npmignore similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/.npmignore rename to packages/plugins/@nocobase/plugin-data-source-main/.npmignore diff --git a/packages/plugins/@nocobase/plugin-iframe-block/LICENSE b/packages/plugins/@nocobase/plugin-data-source-main/LICENSE similarity index 100% rename from packages/plugins/@nocobase/plugin-iframe-block/LICENSE rename to packages/plugins/@nocobase/plugin-data-source-main/LICENSE diff --git a/packages/plugins/@nocobase/plugin-collection-manager/README.md b/packages/plugins/@nocobase/plugin-data-source-main/README.md similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/README.md rename to packages/plugins/@nocobase/plugin-data-source-main/README.md diff --git a/packages/plugins/@nocobase/plugin-collection-manager/README.zh-CN.md b/packages/plugins/@nocobase/plugin-data-source-main/README.zh-CN.md similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-data-source-main/README.zh-CN.md diff --git a/packages/plugins/@nocobase/plugin-formula-field/client.d.ts b/packages/plugins/@nocobase/plugin-data-source-main/client.d.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/client.d.ts rename to packages/plugins/@nocobase/plugin-data-source-main/client.d.ts diff --git a/packages/plugins/@nocobase/plugin-export/client.js b/packages/plugins/@nocobase/plugin-data-source-main/client.js similarity index 100% rename from packages/plugins/@nocobase/plugin-export/client.js rename to packages/plugins/@nocobase/plugin-data-source-main/client.js diff --git a/packages/plugins/@nocobase/plugin-collection-manager/package.json b/packages/plugins/@nocobase/plugin-data-source-main/package.json similarity index 73% rename from packages/plugins/@nocobase/plugin-collection-manager/package.json rename to packages/plugins/@nocobase/plugin-data-source-main/package.json index 81342e65e2..03e3f5a75f 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/package.json +++ b/packages/plugins/@nocobase/plugin-data-source-main/package.json @@ -1,10 +1,10 @@ { - "name": "@nocobase/plugin-collection-manager", + "name": "@nocobase/plugin-data-source-main", "displayName": "Data source: Main", "displayName.zh-CN": "数据源:主数据库", "description": "NocoBase main database, supports relational databases such as MySQL, PostgreSQL, SQLite and so on.", "description.zh-CN": "NocoBase 主数据库,支持 MySQL、PostgreSQL、SQLite 等关系型数据库。", - "version": "0.21.0-alpha.16", + "version": "1.0.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", @@ -15,12 +15,12 @@ "toposort": "^2.0.2" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/plugin-error-handler": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/plugin-error-handler": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-formula-field/server.d.ts b/packages/plugins/@nocobase/plugin-data-source-main/server.d.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/server.d.ts rename to packages/plugins/@nocobase/plugin-data-source-main/server.d.ts diff --git a/packages/plugins/@nocobase/plugin-export/server.js b/packages/plugins/@nocobase/plugin-data-source-main/server.js similarity index 100% rename from packages/plugins/@nocobase/plugin-export/server.js rename to packages/plugins/@nocobase/plugin-data-source-main/server.js diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/calendar.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/collection-template/calendar.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/calendar.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/collection-template/calendar.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/connectToDatabaseView.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/collection-template/connectToDatabaseView.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/connectToDatabaseView.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/collection-template/connectToDatabaseView.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/expression.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/collection-template/expression.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/expression.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/collection-template/expression.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/file.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/collection-template/file.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/file.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/collection-template/file.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/general.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/collection-template/general.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/general.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/collection-template/general.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/sql.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/collection-template/sql.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/sql.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/collection-template/sql.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/tree.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/collection-template/tree.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/collection-template/tree.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/collection-template/tree.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/attachment/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/attachment/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/attachment/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/attachment/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/attachment/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/attachment/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/attachment/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/attachment/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/belongsTo/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/belongsTo/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/belongsTo/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/belongsTo/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/belongsTo/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/belongsTo/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/belongsTo/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/belongsTo/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkbox/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/checkbox/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkbox/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/checkbox/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkbox/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/checkbox/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkbox/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/checkbox/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkboxGroup/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/checkboxGroup/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkboxGroup/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/checkboxGroup/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkboxGroup/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/checkboxGroup/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/checkboxGroup/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/checkboxGroup/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/chinaRegion/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/chinaRegion/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/chinaRegion/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/chinaRegion/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/chinaRegion/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/chinaRegion/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/chinaRegion/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/chinaRegion/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/collection/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/collection/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/collection/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/collection/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/collection/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/collection/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/collection/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/collection/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/color/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/color/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/color/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/color/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/color/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/color/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/color/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/color/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdAt/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/createdAt/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdAt/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/createdAt/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdAt/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/createdAt/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdAt/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/createdAt/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdBy/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/createdBy/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdBy/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/createdBy/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdBy/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/createdBy/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/createdBy/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/createdBy/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/datetime/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/datetime/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/datetime/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/datetime/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/datetime/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/datetime/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/datetime/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/datetime/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/email/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/email/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/email/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/email/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/email/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/email/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/email/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/email/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/formula/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/formula/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/formula/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/formula/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/formula/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/formula/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/formula/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/formula/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/hasOne/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/hasOne/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/hasOne/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/hasOne/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/hasOne/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/hasOne/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/hasOne/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/hasOne/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/icon/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/icon/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/icon/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/icon/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/icon/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/icon/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/icon/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/icon/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/id/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/id/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/id/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/id/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/id/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/id/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/id/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/id/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/integer/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/integer/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/integer/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/integer/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/integer/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/integer/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/integer/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/integer/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/json/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/json/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/json/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/json/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/json/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/json/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/json/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/json/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedAt/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/lastUpdatedAt/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedAt/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/lastUpdatedAt/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedAt/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/lastUpdatedAt/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedAt/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/lastUpdatedAt/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedBy/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/lastUpdatedBy/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedBy/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/lastUpdatedBy/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedBy/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/lastUpdatedBy/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/lastUpdatedBy/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/lastUpdatedBy/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/longText/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/longText/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/longText/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/longText/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/longText/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/longText/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/longText/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/longText/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToMany/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToMany/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaSettings1.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToMany/schemaSettings1.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaSettings1.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToMany/schemaSettings1.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaSettings2.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToMany/schemaSettings2.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaSettings2.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToMany/schemaSettings2.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaSettings3.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToMany/schemaSettings3.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaSettings3.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToMany/schemaSettings3.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaSettings4.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToMany/schemaSettings4.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaSettings4.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToMany/schemaSettings4.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaSettings5.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToMany/schemaSettings5.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToMany/schemaSettings5.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToMany/schemaSettings5.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToOne/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToOne/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToOne/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToOne/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/templatesOfBug.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToOne/templatesOfBug.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/templatesOfBug.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToOne/templatesOfBug.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/markdown/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/markdown/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/markdown/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/markdown/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/markdown/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/markdown/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/markdown/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/markdown/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/mutipleSelect/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/mutipleSelect/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/mutipleSelect/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/mutipleSelect/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/mutipleSelect/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/mutipleSelect/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/mutipleSelect/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/mutipleSelect/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/number/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/number/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/number/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/number/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/number/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/number/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/number/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/number/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/oneToMany/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/oneToMany/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/oneToMany/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/oneToMany/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/oneToMany/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/oneToMany/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/oneToMany/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/oneToMany/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/password/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/password/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/password/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/password/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/password/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/password/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/password/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/password/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/percent/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/percent/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/percent/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/percent/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/percent/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/percent/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/percent/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/percent/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/phone/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/phone/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/phone/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/phone/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/phone/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/phone/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/phone/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/phone/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/radioGroup/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/radioGroup/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/radioGroup/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/radioGroup/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/radioGroup/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/radioGroup/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/radioGroup/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/radioGroup/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/richText/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/richText/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/richText/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/richText/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/richText/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/richText/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/richText/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/richText/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/sequence/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/sequence/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/sequence/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/sequence/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/sequence/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/sequence/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/sequence/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/sequence/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleLineText/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/singleLineText/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleLineText/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/singleLineText/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleLineText/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/singleLineText/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleLineText/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/singleLineText/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleSelect/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/singleSelect/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleSelect/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/singleSelect/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleSelect/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/singleSelect/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/singleSelect/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/singleSelect/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/tableOID/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/tableOID/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/tableOID/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/tableOID/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/tableOID/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/tableOID/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/tableOID/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/tableOID/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/time/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/time/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/time/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/time/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/time/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/time/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/time/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/time/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/url/schemaInitializer.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/url/schemaInitializer.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/url/schemaInitializer.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/url/schemaInitializer.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/url/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/url/schemaSettings.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/fields/url/schemaSettings.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/url/schemaSettings.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/utils.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/client/__e2e__/utils.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/utils.ts diff --git a/packages/plugins/@nocobase/plugin-data-source-main/src/client/index.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/client/index.ts new file mode 100644 index 0000000000..aae0622b95 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-data-source-main/src/client/index.ts @@ -0,0 +1,7 @@ +import { Plugin } from '@nocobase/client'; + +class PluginDataSourceMainClient extends Plugin { + async load() {} +} + +export default PluginDataSourceMainClient; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/index.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/index.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/index.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/action.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/action.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/action.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/action.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/associations/reference-integerity-check.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/associations/reference-integerity-check.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/associations/reference-integerity-check.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/associations/reference-integerity-check.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/beforeInitOptions.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/beforeInitOptions.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/beforeInitOptions.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/beforeInitOptions.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-categories.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/collection-categories.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-categories.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/collection-categories.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-load.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/collection-load.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-load.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/collection-load.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-without-id-primary-field.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/collection-without-id-primary-field.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collection-without-id-primary-field.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/collection-without-id-primary-field.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collections.repository.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/collections.repository.test.ts similarity index 99% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collections.repository.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/collections.repository.test.ts index ddc84a0fc8..b8f541fffb 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/collections.repository.test.ts +++ b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/collections.repository.test.ts @@ -1,4 +1,4 @@ -import Database, { Collection as DBCollection, CollectionGroupManager, HasManyRepository } from '@nocobase/database'; +import Database, { CollectionGroupManager, Collection as DBCollection, HasManyRepository } from '@nocobase/database'; import Application from '@nocobase/server'; import { createApp } from '.'; import CollectionManagerPlugin, { CollectionRepository } from '../index'; @@ -376,7 +376,7 @@ describe('collections repository', () => { return; } - const plugin = app.getPlugin('collection-manager'); + const plugin = app.getPlugin('data-source-main'); plugin.schema = 'testSchema'; await Collection.repository.create({ diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/default-value.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/field-options/default-value.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/default-value.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/field-options/default-value.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/indexes.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/field-options/indexes.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/field-options/indexes.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/field-options/indexes.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields.repository.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields.repository.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields.repository.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields.repository.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongs-to-many.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/belongs-to-many.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongs-to-many.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/belongs-to-many.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongs-to.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/belongs-to.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/belongs-to.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/belongs-to.test.ts diff --git a/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/belongsTo.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/belongsTo.test.ts new file mode 100644 index 0000000000..78f23f71ae --- /dev/null +++ b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/belongsTo.test.ts @@ -0,0 +1,183 @@ +import Database, { Collection as DBCollection } from '@nocobase/database'; +import Application from '@nocobase/server'; +import { createApp } from '..'; +import { CollectionRepository } from '../../index'; + +describe('belongsTo', () => { + let db: Database; + let app: Application; + let Collection: DBCollection; + let Field: DBCollection; + + beforeEach(async () => { + app = await createApp(); + db = app.db; + Collection = db.getCollection('collections'); + Field = db.getCollection('fields'); + }); + + afterEach(async () => { + await app.destroy(); + }); + + it('should check belongs to association keys', async () => { + const Post = await Collection.repository.create({ + values: { + name: 'posts', + fields: [ + { + type: 'string', + name: 'name', + }, + { + type: 'bigInt', + name: 'postId', + }, + ], + }, + context: {}, + }); + + const Tag = await Collection.repository.create({ + values: { + name: 'tags', + fields: [ + { + type: 'string', + name: 'name', + }, + ], + }, + context: {}, + }); + + let error; + try { + await Field.repository.create({ + values: { + collectionName: 'posts', + type: 'belongsTo', + name: 'tags', + targetKey: 'name', + foreignKey: 'postId', + }, + context: {}, + }); + } catch (e) { + error = e; + } + + expect(error).toBeDefined(); + expect(error.message).toContain( + 'Foreign key "postId" type "BIGINT" does not match target key "name" type "STRING"', + ); + }); + it('should load belongsTo field', async () => { + await Collection.repository.create({ + values: { + name: 'orders', + fields: [ + { + type: 'integer', + name: 'amount', + }, + { + type: 'belongsTo', + name: 'users', + targetKey: 'uid', + foreignKey: 'userId', + }, + ], + }, + }); + + await Collection.repository.create({ + values: { + name: 'users', + fields: [ + { + type: 'string', + name: 'name', + }, + { + type: 'string', + name: 'uid', + }, + ], + }, + }); + + let error; + + try { + await db.getRepository('collections').load(); + } catch (e) { + error = e; + } + + expect(error).toBeUndefined(); + }); + + it('should create belongs to field with uuid target key', async () => { + await Collection.repository.create({ + values: { + name: 'posts', + autoGenId: false, + fields: [ + { + type: 'uuid', + primaryKey: true, + name: 'uuid', + }, + ], + }, + context: {}, + }); + + await Collection.repository.create({ + values: { + name: 'comments', + autoGenId: false, + fields: [ + { + type: 'uuid', + primaryKey: true, + name: 'uuid', + }, + ], + }, + context: {}, + }); + + // create a belongsTo field with uuid target key + await Field.repository.create({ + values: { + collectionName: 'comments', + type: 'belongsTo', + name: 'post', + onDelete: 'SET NULL', + target: 'posts', + targetKey: 'uuid', + foreignKey: 'postUuid', + interface: 'm2o', + }, + context: {}, + }); + + await app.runCommand('restart'); + + db = app.db; + + const Comments = db.getCollection('comments'); + const foreignKeyField = Comments.getField('postUuid'); + expect(foreignKeyField).toBeTruthy(); + + expect(Comments.model.associations['post']).toBeTruthy(); + + await db.getRepository('posts').create({ + values: { + comments: [{}], + }, + }); + }); +}); diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/destroy.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/destroy.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/destroy.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/destroy.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasMany.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/hasMany.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasMany.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/hasMany.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasOne.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/hasOne.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/hasOne.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/hasOne.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/reverseField.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/reverseField.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/reverseField.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/reverseField.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/uuid.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/uuid.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/uuid.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/fields/uuid.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/belongs-to-many.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/belongs-to-many.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/belongs-to-many.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/belongs-to-many.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/collections.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/collections.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/collections.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/collections.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/find.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/find.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/find.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/find.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/has-many.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/has-many.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/has-many.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/has-many.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/inherited-collection.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/inherited-collection.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/inherited-collection.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/inherited-collection.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/recreate.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/recreate.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/recreate.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/recreate.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/tree.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/tree.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/tree.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/tree.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/validate-update-action.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/validate-update-action.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/validate-update-action.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/validate-update-action.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/view-collection.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/view-collection.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/http-api/view-collection.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/http-api/view-collection.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/index.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/index.ts similarity index 72% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/index.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/index.ts index e9ebbef2b8..db7fc40c54 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/index.ts +++ b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/index.ts @@ -4,7 +4,7 @@ export async function createApp(options: any = {}) { const app = await createMockServer({ acl: false, ...options, - plugins: ['error-handler', 'collection-manager', 'ui-schema-storage'], + plugins: ['error-handler', 'data-source-main', 'ui-schema-storage'], }); return app; } diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inherited-collection.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/inherits/inherited-collection.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inherited-collection.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/inherits/inherited-collection.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inhertied-collection-with-schema.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/inherits/inhertied-collection-with-schema.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/inherits/inhertied-collection-with-schema.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/inherits/inhertied-collection-with-schema.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/20221104151410-update-collections-hidden.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/migrations/20221104151410-update-collections-hidden.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/20221104151410-update-collections-hidden.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/migrations/20221104151410-update-collections-hidden.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/20240420105949-add-sort-field.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/migrations/20240420105949-add-sort-field.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/20240420105949-add-sort-field.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/migrations/20240420105949-add-sort-field.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/drop-ui-schema-relation.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/migrations/drop-ui-schema-relation.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/drop-ui-schema-relation.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/migrations/drop-ui-schema-relation.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/fix-created-by-field.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/migrations/fix-created-by-field.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/fix-created-by-field.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/migrations/fix-created-by-field.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/set-collection-schema.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/migrations/set-collection-schema.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/set-collection-schema.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/migrations/set-collection-schema.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/update-id-to-bigint.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/migrations/update-id-to-bigint.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/migrations/update-id-to-bigint.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/migrations/update-id-to-bigint.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/primary-key.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/primary-key.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/primary-key.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/primary-key.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/reference-integerity.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/reference-integerity.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/reference-integerity.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/reference-integerity.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/remove-collection.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/remove-collection.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/remove-collection.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/remove-collection.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.fields.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/resources/collections.fields.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.fields.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/resources/collections.fields.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/resources/collections.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/resources/collections.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/resources/collections.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/sql/sql-collection.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/sql/sql-collection.test.ts similarity index 99% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/sql/sql-collection.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/sql/sql-collection.test.ts index f651852267..4c399a6489 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/sql/sql-collection.test.ts +++ b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/sql/sql-collection.test.ts @@ -8,7 +8,7 @@ describe('sql collection', () => { beforeEach(async () => { app = await createMockServer({ - plugins: ['collection-manager', 'error-handler'], + plugins: ['data-source-main', 'error-handler'], }); db = app.db; db.options.underscored = false; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/sync.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/sync.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/sync.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/sync.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/through.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/through.test.ts similarity index 96% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/through.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/through.test.ts index e1301412dc..35299296e7 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/through.test.ts +++ b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/through.test.ts @@ -7,7 +7,7 @@ describe('collections repository', () => { tablePrefix: 'through_', }, acl: false, - plugins: ['error-handler', 'collection-manager'], + plugins: ['error-handler', 'data-source-main'], }); await app1 @@ -112,7 +112,7 @@ describe('collections repository', () => { await app1.destroy(); const app2 = await startMockServer({ - plugins: ['error-handler', 'collection-manager'], + plugins: ['error-handler', 'data-source-main'], database: { tablePrefix: 'through_', database: app1.db.options.database, diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/view/view-collection.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/view/view-collection.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/view/view-collection.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/view/view-collection.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/view/view-with-filter-target-key.test.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/view/view-with-filter-target-key.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/view/view-with-filter-target-key.test.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/__tests__/view/view-with-filter-target-key.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collectionCategories.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/collections/collectionCategories.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collectionCategories.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/collections/collectionCategories.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collections.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/collections/collections.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/collections.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/collections/collections.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/fields.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/collections/fields.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/collections/fields.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/collections/fields.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForForeignKeyField.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/afterCreateForForeignKeyField.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForForeignKeyField.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/afterCreateForForeignKeyField.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForReverseField.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/afterCreateForReverseField.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/afterCreateForReverseField.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/afterCreateForReverseField.ts diff --git a/packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/afterDestroyForForeignKeyField.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/afterDestroyForForeignKeyField.ts new file mode 100644 index 0000000000..fb55d7b172 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/afterDestroyForForeignKeyField.ts @@ -0,0 +1,69 @@ +import Database, { FindOneOptions, FindOptions, Model, Transaction } from '@nocobase/database'; + +async function destroyFields(db: Database, transaction: Transaction, fieldRecords: Model[]) { + const fieldsRepo = db.getRepository('fields'); + for (const fieldRecord of fieldRecords) { + await fieldsRepo.destroy({ + filter: { + name: fieldRecord.get('name'), + collectionName: fieldRecord.get('collectionName'), + }, + transaction, + }); + } +} + +export function afterDestroyForForeignKeyField(db: Database) { + return async (model, opts) => { + const { transaction } = opts; + const options = model.get('options'); + if (!options?.isForeignKey) { + return; + } + + const collectionRepo = db.getRepository('collections'); + const foreignKey = model.get('name'); + const foreignKeyCollectionName = model.get('collectionName'); + const collectionRecord = await collectionRepo.findOne({ + filter: { + name: foreignKeyCollectionName, + }, + transaction, + } as FindOneOptions); + const collectionOptions = collectionRecord.get('options'); + const fieldsRepo = db.getRepository('fields'); + + if (collectionOptions?.isThrough) { + // through collection + const fieldRecords = await fieldsRepo.find({ + filter: { + options: { through: foreignKeyCollectionName, foreignKey: foreignKey }, + }, + transaction, + } as FindOptions); + await destroyFields(db, transaction, fieldRecords); + } else { + await destroyFields( + db, + transaction, + await fieldsRepo.find({ + filter: { + collectionName: foreignKeyCollectionName, + options: { foreignKey: foreignKey }, + }, + transaction, + } as FindOptions), + ); + await destroyFields( + db, + transaction, + await fieldsRepo.find({ + filter: { + options: { foreignKey: foreignKey, target: foreignKeyCollectionName }, + }, + transaction, + } as FindOptions), + ); + } + }; +} diff --git a/packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/beforeCreateForChildrenCollection.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/beforeCreateForChildrenCollection.ts new file mode 100644 index 0000000000..b9258610d6 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/beforeCreateForChildrenCollection.ts @@ -0,0 +1,35 @@ +import Database from '@nocobase/database'; + +export function beforeCreateForChildrenCollection(db: Database) { + return async (model, { transaction, context }) => { + const Collection = db.getCollection('collections'); + const Field = db.getCollection('fields'); + + const parentKey = model.get('parentKey'); + if (!parentKey) { + return; + } + const parent = await Field.model.findByPk(parentKey, { transaction }); + const parentTarget = parent.get('target'); + model.set('collectionName', parentTarget); + const collection = await Collection.model.findOne({ + transaction, + where: { + name: parentTarget, + }, + }); + if (!collection) { + await Collection.repository.create({ + values: { + name: parentTarget, + createdBy: true, + updatedBy: true, + sortable: true, + inherit: true, + }, + transaction, + context, + }); + } + }; +} diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForReverseField.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/beforeCreateForReverseField.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForReverseField.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/beforeCreateForReverseField.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForValidateField.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/beforeCreateForValidateField.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForValidateField.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/beforeCreateForValidateField.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForViewCollection.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/beforeCreateForViewCollection.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeCreateForViewCollection.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/beforeCreateForViewCollection.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeDestroyForeignKey.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/beforeDestroyForeignKey.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeDestroyForeignKey.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/beforeDestroyForeignKey.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeInitOptions.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/beforeInitOptions.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/beforeInitOptions.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/beforeInitOptions.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/index.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/hooks/index.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/hooks/index.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/index.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/index.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/index.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220613103214-alert-sub-table.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20220613103214-alert-sub-table.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220613103214-alert-sub-table.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20220613103214-alert-sub-table.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220704225714-drop-foreign-keys.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20220704225714-drop-foreign-keys.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20220704225714-drop-foreign-keys.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20220704225714-drop-foreign-keys.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221101111110-update-foreign-fields.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20221101111110-update-foreign-fields.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221101111110-update-foreign-fields.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20221101111110-update-foreign-fields.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221104151410-update-collections-hidden.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20221104151410-update-collections-hidden.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221104151410-update-collections-hidden.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20221104151410-update-collections-hidden.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111110-update-fk-type.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20221121111110-update-fk-type.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111110-update-fk-type.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20221121111110-update-fk-type.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111113-update-id-to-bigint.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20221121111113-update-id-to-bigint.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221121111113-update-id-to-bigint.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20221121111113-update-id-to-bigint.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221221103220-timestamps.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20221221103220-timestamps.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20221221103220-timestamps.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20221221103220-timestamps.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230225111112-drop-ui-schema-relation.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20230225111112-drop-ui-schema-relation.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230225111112-drop-ui-schema-relation.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20230225111112-drop-ui-schema-relation.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230509111114-alert-ui-schema.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20230509111114-alert-ui-schema.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230509111114-alert-ui-schema.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20230509111114-alert-ui-schema.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230623145414-number-step.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20230623145414-number-step.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230623145414-number-step.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20230623145414-number-step.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230704222935-tableoid.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20230704222935-tableoid.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230704222935-tableoid.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20230704222935-tableoid.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230918024546-set-collection-schema.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20230918024546-set-collection-schema.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20230918024546-set-collection-schema.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20230918024546-set-collection-schema.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20240220153103-install-main-datasource.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20240220153103-install-main-datasource.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20240220153103-install-main-datasource.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20240220153103-install-main-datasource.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20240419182147-fix-created-by-field-target.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20240419182147-fix-created-by-field-target.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20240419182147-fix-created-by-field-target.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20240419182147-fix-created-by-field-target.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20240420105949-add-sort-field.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20240420105949-add-sort-field.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/migrations/20240420105949-add-sort-field.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/migrations/20240420105949-add-sort-field.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/models/collection.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/models/collection.ts similarity index 99% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/models/collection.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/models/collection.ts index 908f565277..bd6d3cbf63 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/models/collection.ts +++ b/packages/plugins/@nocobase/plugin-data-source-main/src/server/models/collection.ts @@ -31,7 +31,7 @@ export class CollectionModel extends MagicAttributeModel { let collection: Collection; const collectionOptions = { - origin: '@nocobase/plugin-collection-manager', + origin: '@nocobase/plugin-data-source-main', ...this.get(), fields: [], loadedFromCollectionManager: true, diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/models/field.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/models/field.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/models/field.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/models/field.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/models/index.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/models/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/models/index.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/models/index.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/repositories/collection-repository.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/repositories/collection-repository.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/repositories/collection-repository.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/repositories/collection-repository.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/repositories/index.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/repositories/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/repositories/index.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/repositories/index.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/collections.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/resourcers/collections.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/collections.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/resourcers/collections.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/sql.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/resourcers/sql.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/sql.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/resourcers/sql.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/views.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/resourcers/views.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/resourcers/views.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/resourcers/views.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/server.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/server.ts similarity index 98% rename from packages/plugins/@nocobase/plugin-collection-manager/src/server/server.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/server/server.ts index dfb21d4701..d923cb0cf3 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-data-source-main/src/server/server.ts @@ -20,7 +20,7 @@ import collectionActions from './resourcers/collections'; import sqlResourcer from './resourcers/sql'; import viewResourcer from './resourcers/views'; -export class PluginCollectionManagerServer extends Plugin { +export class PluginDataSourceMainServer extends Plugin { public schema: string; private loadFilter: Filter = {}; @@ -44,7 +44,7 @@ export class PluginCollectionManagerServer extends Plugin { }); this.db.addMigrations({ - namespace: 'collection-manager', + namespace: 'data-source-main', directory: path.resolve(__dirname, './migrations'), context: { plugin: this, @@ -399,4 +399,4 @@ export class PluginCollectionManagerServer extends Plugin { } } -export default PluginCollectionManagerServer; +export default PluginDataSourceMainServer; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/swagger/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-collection-manager/src/swagger/index.ts rename to packages/plugins/@nocobase/plugin-data-source-main/src/swagger/index.ts diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/package.json b/packages/plugins/@nocobase/plugin-data-source-manager/package.json index 7081a3385e..c94f906736 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/package.json +++ b/packages/plugins/@nocobase/plugin-data-source-manager/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-data-source-manager", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "main": "dist/server/index.js", "displayName": "Data source manager", "displayName.zh-CN": "数据源管理", @@ -9,9 +9,9 @@ "homepage": "https://docs.nocobase.com/handbook/data-source-manager", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/data-source-manager", "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/client": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "keywords": [ "Data model tools" diff --git a/packages/plugins/@nocobase/plugin-data-visualization/package.json b/packages/plugins/@nocobase/plugin-data-visualization/package.json index 2355b37d29..e569392141 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/package.json +++ b/packages/plugins/@nocobase/plugin-data-visualization/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-data-visualization", - "version": "0.21.0-alpha.16", + "version": "1.0.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.", @@ -25,13 +25,13 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/actions": "0.x", - "@nocobase/cache": "0.x", - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/actions": "1.x", + "@nocobase/cache": "1.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-disable-pm-add/package.json b/packages/plugins/@nocobase/plugin-disable-pm-add/package.json index e3ff9e086c..2163c699ca 100644 --- a/packages/plugins/@nocobase/plugin-disable-pm-add/package.json +++ b/packages/plugins/@nocobase/plugin-disable-pm-add/package.json @@ -1,11 +1,11 @@ { "name": "@nocobase/plugin-disable-pm-add", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "main": "./dist/server/index.js", "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/client": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-error-handler/package.json b/packages/plugins/@nocobase/plugin-error-handler/package.json index 9e4aaab1a0..d314a90bdc 100644 --- a/packages/plugins/@nocobase/plugin-error-handler/package.json +++ b/packages/plugins/@nocobase/plugin-error-handler/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "错误处理器", "description": "Handling application errors and exceptions.", "description.zh-CN": "处理应用程序中的错误和异常。", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "devDependencies": { @@ -12,11 +12,11 @@ "supertest": "^6.1.6" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "repository": { "type": "git", diff --git a/packages/plugins/@nocobase/plugin-iframe-block/.npmignore b/packages/plugins/@nocobase/plugin-field-china-region/.npmignore similarity index 100% rename from packages/plugins/@nocobase/plugin-iframe-block/.npmignore rename to packages/plugins/@nocobase/plugin-field-china-region/.npmignore diff --git a/packages/plugins/@nocobase/plugin-import/LICENSE b/packages/plugins/@nocobase/plugin-field-china-region/LICENSE similarity index 100% rename from packages/plugins/@nocobase/plugin-import/LICENSE rename to packages/plugins/@nocobase/plugin-field-china-region/LICENSE diff --git a/packages/plugins/@nocobase/plugin-china-region/README.md b/packages/plugins/@nocobase/plugin-field-china-region/README.md similarity index 100% rename from packages/plugins/@nocobase/plugin-china-region/README.md rename to packages/plugins/@nocobase/plugin-field-china-region/README.md diff --git a/packages/plugins/@nocobase/plugin-china-region/README.zh-CN.md b/packages/plugins/@nocobase/plugin-field-china-region/README.zh-CN.md similarity index 100% rename from packages/plugins/@nocobase/plugin-china-region/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-field-china-region/README.zh-CN.md diff --git a/packages/plugins/@nocobase/plugin-china-region/build.config.ts b/packages/plugins/@nocobase/plugin-field-china-region/build.config.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-china-region/build.config.ts rename to packages/plugins/@nocobase/plugin-field-china-region/build.config.ts diff --git a/packages/plugins/@nocobase/plugin-iframe-block/client.d.ts b/packages/plugins/@nocobase/plugin-field-china-region/client.d.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-iframe-block/client.d.ts rename to packages/plugins/@nocobase/plugin-field-china-region/client.d.ts diff --git a/packages/plugins/@nocobase/plugin-formula-field/client.js b/packages/plugins/@nocobase/plugin-field-china-region/client.js similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/client.js rename to packages/plugins/@nocobase/plugin-field-china-region/client.js diff --git a/packages/plugins/@nocobase/plugin-china-region/package.json b/packages/plugins/@nocobase/plugin-field-china-region/package.json similarity index 79% rename from packages/plugins/@nocobase/plugin-china-region/package.json rename to packages/plugins/@nocobase/plugin-field-china-region/package.json index 6594910a59..7041fa6e7e 100644 --- a/packages/plugins/@nocobase/plugin-china-region/package.json +++ b/packages/plugins/@nocobase/plugin-field-china-region/package.json @@ -1,6 +1,6 @@ { - "name": "@nocobase/plugin-china-region", - "version": "0.21.0-alpha.16", + "name": "@nocobase/plugin-field-china-region", + "version": "1.0.0-alpha.1", "displayName": "Administrative divisions of China", "displayName.zh-CN": "中国行政区划", "description": "Provides data and field type for administrative divisions of China.", @@ -17,10 +17,10 @@ "cross-spawn": "^7.0.3" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-iframe-block/server.d.ts b/packages/plugins/@nocobase/plugin-field-china-region/server.d.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-iframe-block/server.d.ts rename to packages/plugins/@nocobase/plugin-field-china-region/server.d.ts diff --git a/packages/plugins/@nocobase/plugin-formula-field/server.js b/packages/plugins/@nocobase/plugin-field-china-region/server.js similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/server.js rename to packages/plugins/@nocobase/plugin-field-china-region/server.js diff --git a/packages/plugins/@nocobase/plugin-china-region/src/client/ChinaRegionProvider.tsx b/packages/plugins/@nocobase/plugin-field-china-region/src/client/ChinaRegionProvider.tsx similarity index 96% rename from packages/plugins/@nocobase/plugin-china-region/src/client/ChinaRegionProvider.tsx rename to packages/plugins/@nocobase/plugin-field-china-region/src/client/ChinaRegionProvider.tsx index 9211ae3d52..af8ba1aae6 100644 --- a/packages/plugins/@nocobase/plugin-china-region/src/client/ChinaRegionProvider.tsx +++ b/packages/plugins/@nocobase/plugin-field-china-region/src/client/ChinaRegionProvider.tsx @@ -64,6 +64,9 @@ export const useChinaRegionLoadData = () => { return item; }) || []; field.dataSource = [...field.dataSource]; + }) + .catch((e) => { + console.error(e); }); }; }; diff --git a/packages/plugins/@nocobase/plugin-china-region/src/client/index.tsx b/packages/plugins/@nocobase/plugin-field-china-region/src/client/index.tsx similarity index 70% rename from packages/plugins/@nocobase/plugin-china-region/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-field-china-region/src/client/index.tsx index b511303218..a360246b1c 100644 --- a/packages/plugins/@nocobase/plugin-china-region/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-field-china-region/src/client/index.tsx @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; import { useChinaRegionDataSource, useChinaRegionLoadData } from './ChinaRegionProvider'; -export class PluginChinaRegionClient extends Plugin { +export class PluginFieldChinaRegionClient extends Plugin { async load() { this.app.addScopes({ useChinaRegionDataSource, @@ -10,4 +10,4 @@ export class PluginChinaRegionClient extends Plugin { } } -export default PluginChinaRegionClient; +export default PluginFieldChinaRegionClient; diff --git a/packages/plugins/@nocobase/plugin-iframe-block/src/index.ts b/packages/plugins/@nocobase/plugin-field-china-region/src/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-iframe-block/src/index.ts rename to packages/plugins/@nocobase/plugin-field-china-region/src/index.ts diff --git a/packages/plugins/@nocobase/plugin-china-region/src/server/__tests__/action.test.ts b/packages/plugins/@nocobase/plugin-field-china-region/src/server/__tests__/action.test.ts similarity index 94% rename from packages/plugins/@nocobase/plugin-china-region/src/server/__tests__/action.test.ts rename to packages/plugins/@nocobase/plugin-field-china-region/src/server/__tests__/action.test.ts index 8d01f1f6d8..43cc80de68 100644 --- a/packages/plugins/@nocobase/plugin-china-region/src/server/__tests__/action.test.ts +++ b/packages/plugins/@nocobase/plugin-field-china-region/src/server/__tests__/action.test.ts @@ -6,7 +6,7 @@ describe('actions test', () => { let db: Database; beforeEach(async () => { app = await createMockServer({ - plugins: ['china-region'], + plugins: ['field-china-region'], }); db = app.db; diff --git a/packages/plugins/@nocobase/plugin-china-region/src/server/collections/chinaRegions.ts b/packages/plugins/@nocobase/plugin-field-china-region/src/server/collections/chinaRegions.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-china-region/src/server/collections/chinaRegions.ts rename to packages/plugins/@nocobase/plugin-field-china-region/src/server/collections/chinaRegions.ts diff --git a/packages/plugins/@nocobase/plugin-china-region/src/server/index.ts b/packages/plugins/@nocobase/plugin-field-china-region/src/server/index.ts similarity index 95% rename from packages/plugins/@nocobase/plugin-china-region/src/server/index.ts rename to packages/plugins/@nocobase/plugin-field-china-region/src/server/index.ts index 7afbf2ef11..f98747d36e 100644 --- a/packages/plugins/@nocobase/plugin-china-region/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-field-china-region/src/server/index.ts @@ -10,7 +10,7 @@ function getChinaDivisionData(key: string) { } } -export class PluginChinaRegionServer extends Plugin { +export class PluginFieldChinaRegionServer extends Plugin { async install() { await this.importData(); } @@ -86,4 +86,4 @@ export class PluginChinaRegionServer extends Plugin { } } -export default PluginChinaRegionServer; +export default PluginFieldChinaRegionServer; diff --git a/packages/plugins/@nocobase/plugin-china-region/src/swagger/index.json b/packages/plugins/@nocobase/plugin-field-china-region/src/swagger/index.json similarity index 100% rename from packages/plugins/@nocobase/plugin-china-region/src/swagger/index.json rename to packages/plugins/@nocobase/plugin-field-china-region/src/swagger/index.json diff --git a/packages/plugins/@nocobase/plugin-import/.npmignore b/packages/plugins/@nocobase/plugin-field-formula/.npmignore similarity index 100% rename from packages/plugins/@nocobase/plugin-import/.npmignore rename to packages/plugins/@nocobase/plugin-field-formula/.npmignore diff --git a/packages/plugins/@nocobase/plugin-localization-management/LICENSE b/packages/plugins/@nocobase/plugin-field-formula/LICENSE similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/LICENSE rename to packages/plugins/@nocobase/plugin-field-formula/LICENSE diff --git a/packages/plugins/@nocobase/plugin-formula-field/README.md b/packages/plugins/@nocobase/plugin-field-formula/README.md similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/README.md rename to packages/plugins/@nocobase/plugin-field-formula/README.md diff --git a/packages/plugins/@nocobase/plugin-formula-field/README.zh-CN.md b/packages/plugins/@nocobase/plugin-field-formula/README.zh-CN.md similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-field-formula/README.zh-CN.md diff --git a/packages/plugins/@nocobase/plugin-import/client.d.ts b/packages/plugins/@nocobase/plugin-field-formula/client.d.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-import/client.d.ts rename to packages/plugins/@nocobase/plugin-field-formula/client.d.ts diff --git a/packages/plugins/@nocobase/plugin-iframe-block/client.js b/packages/plugins/@nocobase/plugin-field-formula/client.js similarity index 100% rename from packages/plugins/@nocobase/plugin-iframe-block/client.js rename to packages/plugins/@nocobase/plugin-field-formula/client.js diff --git a/packages/plugins/@nocobase/plugin-formula-field/package.json b/packages/plugins/@nocobase/plugin-field-formula/package.json similarity index 78% rename from packages/plugins/@nocobase/plugin-formula-field/package.json rename to packages/plugins/@nocobase/plugin-field-formula/package.json index bb8f6adf0e..53c6e8fb29 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/package.json +++ b/packages/plugins/@nocobase/plugin-field-formula/package.json @@ -1,10 +1,10 @@ { - "name": "@nocobase/plugin-formula-field", + "name": "@nocobase/plugin-field-formula", "displayName": "Collection field: Formula", "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": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/field-formula", @@ -18,12 +18,12 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/evaluators": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/evaluators": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-import/server.d.ts b/packages/plugins/@nocobase/plugin-field-formula/server.d.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-import/server.d.ts rename to packages/plugins/@nocobase/plugin-field-formula/server.d.ts diff --git a/packages/plugins/@nocobase/plugin-iframe-block/server.js b/packages/plugins/@nocobase/plugin-field-formula/server.js similarity index 100% rename from packages/plugins/@nocobase/plugin-iframe-block/server.js rename to packages/plugins/@nocobase/plugin-field-formula/server.js diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/FormulaComponentFieldSettings.tsx b/packages/plugins/@nocobase/plugin-field-formula/src/client/FormulaComponentFieldSettings.tsx similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/client/FormulaComponentFieldSettings.tsx rename to packages/plugins/@nocobase/plugin-field-formula/src/client/FormulaComponentFieldSettings.tsx diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/__e2e__/form-create.test.ts b/packages/plugins/@nocobase/plugin-field-formula/src/client/__e2e__/form-create.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/client/__e2e__/form-create.test.ts rename to packages/plugins/@nocobase/plugin-field-formula/src/client/__e2e__/form-create.test.ts diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/__e2e__/utils.ts b/packages/plugins/@nocobase/plugin-field-formula/src/client/__e2e__/utils.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/client/__e2e__/utils.ts rename to packages/plugins/@nocobase/plugin-field-formula/src/client/__e2e__/utils.ts diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Expression.tsx b/packages/plugins/@nocobase/plugin-field-formula/src/client/components/Formula/Expression.tsx similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Expression.tsx rename to packages/plugins/@nocobase/plugin-field-formula/src/client/components/Formula/Expression.tsx diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Result.tsx b/packages/plugins/@nocobase/plugin-field-formula/src/client/components/Formula/Result.tsx similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/Result.tsx rename to packages/plugins/@nocobase/plugin-field-formula/src/client/components/Formula/Result.tsx diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/demos/demo2.tsx b/packages/plugins/@nocobase/plugin-field-formula/src/client/components/Formula/demos/demo2.tsx similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/demos/demo2.tsx rename to packages/plugins/@nocobase/plugin-field-formula/src/client/components/Formula/demos/demo2.tsx diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/index.md b/packages/plugins/@nocobase/plugin-field-formula/src/client/components/Formula/index.md similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/index.md rename to packages/plugins/@nocobase/plugin-field-formula/src/client/components/Formula/index.md diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/index.tsx b/packages/plugins/@nocobase/plugin-field-formula/src/client/components/Formula/index.tsx similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/client/components/Formula/index.tsx rename to packages/plugins/@nocobase/plugin-field-formula/src/client/components/Formula/index.tsx diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/components/index.ts b/packages/plugins/@nocobase/plugin-field-formula/src/client/components/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/client/components/index.ts rename to packages/plugins/@nocobase/plugin-field-formula/src/client/components/index.ts diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/index.tsx b/packages/plugins/@nocobase/plugin-field-formula/src/client/index.tsx similarity index 85% rename from packages/plugins/@nocobase/plugin-formula-field/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-field-formula/src/client/index.tsx index 264528385b..a670335624 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-field-formula/src/client/index.tsx @@ -4,7 +4,7 @@ import { renderExpressionDescription } from './scopes'; import { FormulaFieldInterface } from './interfaces/formula'; import { FormulaComponentFieldSettings } from './FormulaComponentFieldSettings'; -export class PluginFormulaFieldClient extends Plugin { +export class PluginFieldFormulaClient extends Plugin { async load() { this.app.addComponents({ Formula, @@ -17,4 +17,4 @@ export class PluginFormulaFieldClient extends Plugin { } } -export default PluginFormulaFieldClient; +export default PluginFieldFormulaClient; diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/interfaces/formula.tsx b/packages/plugins/@nocobase/plugin-field-formula/src/client/interfaces/formula.tsx similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/client/interfaces/formula.tsx rename to packages/plugins/@nocobase/plugin-field-formula/src/client/interfaces/formula.tsx diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-field-formula/src/client/locale/index.ts similarity index 86% rename from packages/plugins/@nocobase/plugin-formula-field/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-field-formula/src/client/locale/index.ts index a7757edfc0..8c03607878 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-field-formula/src/client/locale/index.ts @@ -1,7 +1,7 @@ import { i18n } from '@nocobase/client'; import { useTranslation } from 'react-i18next'; -export const NAMESPACE = 'formula-field'; +export const NAMESPACE = 'field-formula'; export function lang(key: string, options = {}) { return i18n.t(key, { ...options, ns: NAMESPACE }); diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/scopes.tsx b/packages/plugins/@nocobase/plugin-field-formula/src/client/scopes.tsx similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/client/scopes.tsx rename to packages/plugins/@nocobase/plugin-field-formula/src/client/scopes.tsx diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/index.ts b/packages/plugins/@nocobase/plugin-field-formula/src/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/index.ts rename to packages/plugins/@nocobase/plugin-field-formula/src/index.ts diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/locale/en-US.json b/packages/plugins/@nocobase/plugin-field-formula/src/locale/en-US.json similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/locale/en-US.json rename to packages/plugins/@nocobase/plugin-field-formula/src/locale/en-US.json diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/locale/ko_KR.json b/packages/plugins/@nocobase/plugin-field-formula/src/locale/ko_KR.json similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/locale/ko_KR.json rename to packages/plugins/@nocobase/plugin-field-formula/src/locale/ko_KR.json diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/locale/zh-CN.json b/packages/plugins/@nocobase/plugin-field-formula/src/locale/zh-CN.json similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/locale/zh-CN.json rename to packages/plugins/@nocobase/plugin-field-formula/src/locale/zh-CN.json diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/server/__tests__/formula-field.test.ts b/packages/plugins/@nocobase/plugin-field-formula/src/server/__tests__/formula-field.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/server/__tests__/formula-field.test.ts rename to packages/plugins/@nocobase/plugin-field-formula/src/server/__tests__/formula-field.test.ts diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/server/formula-field.ts b/packages/plugins/@nocobase/plugin-field-formula/src/server/formula-field.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/server/formula-field.ts rename to packages/plugins/@nocobase/plugin-field-formula/src/server/formula-field.ts diff --git a/packages/plugins/@nocobase/plugin-iframe-block/src/server/index.ts b/packages/plugins/@nocobase/plugin-field-formula/src/server/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-iframe-block/src/server/index.ts rename to packages/plugins/@nocobase/plugin-field-formula/src/server/index.ts diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/server/migrations/20230213161904-alter-field.ts b/packages/plugins/@nocobase/plugin-field-formula/src/server/migrations/20230213161904-alter-field.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/server/migrations/20230213161904-alter-field.ts rename to packages/plugins/@nocobase/plugin-field-formula/src/server/migrations/20230213161904-alter-field.ts diff --git a/packages/plugins/@nocobase/plugin-field-formula/src/server/migrations/20240425222058-change-locale-module.ts b/packages/plugins/@nocobase/plugin-field-formula/src/server/migrations/20240425222058-change-locale-module.ts new file mode 100644 index 0000000000..6f66e2f60c --- /dev/null +++ b/packages/plugins/@nocobase/plugin-field-formula/src/server/migrations/20240425222058-change-locale-module.ts @@ -0,0 +1,21 @@ +import { Migration } from '@nocobase/server'; + +export default class extends Migration { + on = 'afterLoad'; // 'beforeLoad' or 'afterLoad' + appVersion = '<1.0.0-alpha.1'; + + async up() { + const repo = this.db.getRepository('localizationTexts'); + if (!repo) { + return; + } + await repo.update({ + filter: { + module: 'resources.formula-field', + }, + values: { + module: 'resources.field-formula', + }, + }); + } +} diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-field-formula/src/server/plugin.ts similarity index 85% rename from packages/plugins/@nocobase/plugin-formula-field/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-field-formula/src/server/plugin.ts index a0e75d4372..cfe1d27e5d 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-field-formula/src/server/plugin.ts @@ -2,7 +2,7 @@ import { InstallOptions, Plugin } from '@nocobase/server'; import { resolve } from 'path'; import { FormulaField } from './formula-field'; -export class PluginFormulaFieldServer extends Plugin { +export class PluginFieldFormulaServer extends Plugin { afterAdd() {} beforeLoad() { @@ -30,4 +30,4 @@ export class PluginFormulaFieldServer extends Plugin { async remove() {} } -export default PluginFormulaFieldServer; +export default PluginFieldFormulaServer; diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/utils/index.ts b/packages/plugins/@nocobase/plugin-field-formula/src/utils/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-formula-field/src/utils/index.ts rename to packages/plugins/@nocobase/plugin-field-formula/src/utils/index.ts diff --git a/packages/plugins/@nocobase/plugin-field-markdown-vditor/package.json b/packages/plugins/@nocobase/plugin-field-markdown-vditor/package.json index fc58f6a276..4edb6c6bb1 100644 --- a/packages/plugins/@nocobase/plugin-field-markdown-vditor/package.json +++ b/packages/plugins/@nocobase/plugin-field-markdown-vditor/package.json @@ -4,15 +4,15 @@ "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": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/field-markdown-vditor", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/field-markdown-vditor", "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/client": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "devDependencies": { "@ant-design/icons": "5.x", diff --git a/packages/plugins/@nocobase/plugin-localization-management/.npmignore b/packages/plugins/@nocobase/plugin-field-sequence/.npmignore similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/.npmignore rename to packages/plugins/@nocobase/plugin-field-sequence/.npmignore diff --git a/packages/plugins/@nocobase/plugin-oidc/LICENSE b/packages/plugins/@nocobase/plugin-field-sequence/LICENSE similarity index 100% rename from packages/plugins/@nocobase/plugin-oidc/LICENSE rename to packages/plugins/@nocobase/plugin-field-sequence/LICENSE diff --git a/packages/plugins/@nocobase/plugin-sequence-field/README.md b/packages/plugins/@nocobase/plugin-field-sequence/README.md similarity index 100% rename from packages/plugins/@nocobase/plugin-sequence-field/README.md rename to packages/plugins/@nocobase/plugin-field-sequence/README.md diff --git a/packages/plugins/@nocobase/plugin-sequence-field/README.zh-CN.md b/packages/plugins/@nocobase/plugin-field-sequence/README.zh-CN.md similarity index 100% rename from packages/plugins/@nocobase/plugin-sequence-field/README.zh-CN.md rename to packages/plugins/@nocobase/plugin-field-sequence/README.zh-CN.md diff --git a/packages/plugins/@nocobase/plugin-oidc/client.d.ts b/packages/plugins/@nocobase/plugin-field-sequence/client.d.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-oidc/client.d.ts rename to packages/plugins/@nocobase/plugin-field-sequence/client.d.ts diff --git a/packages/plugins/@nocobase/plugin-import/client.js b/packages/plugins/@nocobase/plugin-field-sequence/client.js similarity index 100% rename from packages/plugins/@nocobase/plugin-import/client.js rename to packages/plugins/@nocobase/plugin-field-sequence/client.js diff --git a/packages/plugins/@nocobase/plugin-sequence-field/package.json b/packages/plugins/@nocobase/plugin-field-sequence/package.json similarity index 75% rename from packages/plugins/@nocobase/plugin-sequence-field/package.json rename to packages/plugins/@nocobase/plugin-field-sequence/package.json index 199862c12e..759f51e9a5 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/package.json +++ b/packages/plugins/@nocobase/plugin-field-sequence/package.json @@ -1,10 +1,10 @@ { - "name": "@nocobase/plugin-sequence-field", + "name": "@nocobase/plugin-field-sequence", "displayName": "Collection field: Sequence", "displayName.zh-CN": "数据表字段:自动编码", "description": "Automatically generate codes based on configured rules, supporting combinations of dates, numbers, and text.", "description.zh-CN": "根据配置的规则自动生成编码,支持日期、数字、文本的组合。", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/field-sequence", @@ -21,13 +21,13 @@ "react-js-cron": "^3.1.0" }, "peerDependencies": { - "@nocobase/actions": "0.x", - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/plugin-collection-manager": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/actions": "1.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/plugin-data-source-main": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-oidc/server.d.ts b/packages/plugins/@nocobase/plugin-field-sequence/server.d.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-oidc/server.d.ts rename to packages/plugins/@nocobase/plugin-field-sequence/server.d.ts diff --git a/packages/plugins/@nocobase/plugin-import/server.js b/packages/plugins/@nocobase/plugin-field-sequence/server.js similarity index 100% rename from packages/plugins/@nocobase/plugin-import/server.js rename to packages/plugins/@nocobase/plugin-field-sequence/server.js diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/client/SequenceFieldProvider.tsx b/packages/plugins/@nocobase/plugin-field-sequence/src/client/SequenceFieldProvider.tsx similarity index 100% rename from packages/plugins/@nocobase/plugin-sequence-field/src/client/SequenceFieldProvider.tsx rename to packages/plugins/@nocobase/plugin-field-sequence/src/client/SequenceFieldProvider.tsx diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/client/index.tsx b/packages/plugins/@nocobase/plugin-field-sequence/src/client/index.tsx similarity index 75% rename from packages/plugins/@nocobase/plugin-sequence-field/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-field-sequence/src/client/index.tsx index 3ea74f545b..27e57364dc 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-field-sequence/src/client/index.tsx @@ -2,11 +2,11 @@ import { Plugin } from '@nocobase/client'; import { SequenceFieldProvider } from './SequenceFieldProvider'; import { SequenceFieldInterface } from './sequence'; -export class PluginSequenceFieldClient extends Plugin { +export class PluginFieldSequenceClient extends Plugin { async load() { this.app.use(SequenceFieldProvider); this.app.dataSourceManager.addFieldInterfaces([SequenceFieldInterface]); } } -export default PluginSequenceFieldClient; +export default PluginFieldSequenceClient; diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-field-sequence/src/client/locale/index.ts similarity index 88% rename from packages/plugins/@nocobase/plugin-sequence-field/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-field-sequence/src/client/locale/index.ts index 30422f9384..c1f957378f 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-field-sequence/src/client/locale/index.ts @@ -1,7 +1,7 @@ import { i18n } from '@nocobase/client'; import { useTranslation } from 'react-i18next'; -export const NAMESPACE = 'sequence-field'; +export const NAMESPACE = 'field-sequence'; // i18n.addResources('zh-CN', NAMESPACE, zhCN); diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/client/sequence.tsx b/packages/plugins/@nocobase/plugin-field-sequence/src/client/sequence.tsx similarity index 100% rename from packages/plugins/@nocobase/plugin-sequence-field/src/client/sequence.tsx rename to packages/plugins/@nocobase/plugin-field-sequence/src/client/sequence.tsx diff --git a/packages/plugins/@nocobase/plugin-oidc/src/index.ts b/packages/plugins/@nocobase/plugin-field-sequence/src/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-oidc/src/index.ts rename to packages/plugins/@nocobase/plugin-field-sequence/src/index.ts diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/locale/en-US.json b/packages/plugins/@nocobase/plugin-field-sequence/src/locale/en-US.json similarity index 100% rename from packages/plugins/@nocobase/plugin-sequence-field/src/locale/en-US.json rename to packages/plugins/@nocobase/plugin-field-sequence/src/locale/en-US.json diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/locale/es-ES.json b/packages/plugins/@nocobase/plugin-field-sequence/src/locale/es-ES.json similarity index 100% rename from packages/plugins/@nocobase/plugin-sequence-field/src/locale/es-ES.json rename to packages/plugins/@nocobase/plugin-field-sequence/src/locale/es-ES.json diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/locale/fr-FR.json b/packages/plugins/@nocobase/plugin-field-sequence/src/locale/fr-FR.json similarity index 100% rename from packages/plugins/@nocobase/plugin-sequence-field/src/locale/fr-FR.json rename to packages/plugins/@nocobase/plugin-field-sequence/src/locale/fr-FR.json diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/locale/ko_KR.json b/packages/plugins/@nocobase/plugin-field-sequence/src/locale/ko_KR.json similarity index 100% rename from packages/plugins/@nocobase/plugin-sequence-field/src/locale/ko_KR.json rename to packages/plugins/@nocobase/plugin-field-sequence/src/locale/ko_KR.json diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/locale/pt-BR.json b/packages/plugins/@nocobase/plugin-field-sequence/src/locale/pt-BR.json similarity index 100% rename from packages/plugins/@nocobase/plugin-sequence-field/src/locale/pt-BR.json rename to packages/plugins/@nocobase/plugin-field-sequence/src/locale/pt-BR.json diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/locale/zh-CN.json b/packages/plugins/@nocobase/plugin-field-sequence/src/locale/zh-CN.json similarity index 100% rename from packages/plugins/@nocobase/plugin-sequence-field/src/locale/zh-CN.json rename to packages/plugins/@nocobase/plugin-field-sequence/src/locale/zh-CN.json diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/server/Plugin.ts b/packages/plugins/@nocobase/plugin-field-sequence/src/server/Plugin.ts similarity index 97% rename from packages/plugins/@nocobase/plugin-sequence-field/src/server/Plugin.ts rename to packages/plugins/@nocobase/plugin-field-sequence/src/server/Plugin.ts index fc0b36b7b3..e64467a136 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/server/Plugin.ts +++ b/packages/plugins/@nocobase/plugin-field-sequence/src/server/Plugin.ts @@ -8,7 +8,7 @@ import { Pattern, SequenceField } from './fields/sequence-field'; const asyncRandomInt = promisify(randomInt); -export default class PluginSequenceFieldServer extends Plugin { +export default class PluginFieldSequenceServer extends Plugin { patternTypes = new Registry(); async load() { diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/server/__tests__/sequence-field.test.ts b/packages/plugins/@nocobase/plugin-field-sequence/src/server/__tests__/sequence-field.test.ts similarity index 99% rename from packages/plugins/@nocobase/plugin-sequence-field/src/server/__tests__/sequence-field.test.ts rename to packages/plugins/@nocobase/plugin-field-sequence/src/server/__tests__/sequence-field.test.ts index 21d1e94b1c..e5615ce41f 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/server/__tests__/sequence-field.test.ts +++ b/packages/plugins/@nocobase/plugin-field-sequence/src/server/__tests__/sequence-field.test.ts @@ -9,7 +9,7 @@ describe('sequence field', () => { beforeEach(async () => { app = await createMockServer({ - plugins: ['sequence-field'], + plugins: ['field-sequence'], }); db = app.db; }); diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/server/collections/sequences.ts b/packages/plugins/@nocobase/plugin-field-sequence/src/server/collections/sequences.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-sequence-field/src/server/collections/sequences.ts rename to packages/plugins/@nocobase/plugin-field-sequence/src/server/collections/sequences.ts diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/server/fields/sequence-field.ts b/packages/plugins/@nocobase/plugin-field-sequence/src/server/fields/sequence-field.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-sequence-field/src/server/fields/sequence-field.ts rename to packages/plugins/@nocobase/plugin-field-sequence/src/server/fields/sequence-field.ts diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/server/index.ts b/packages/plugins/@nocobase/plugin-field-sequence/src/server/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-sequence-field/src/server/index.ts rename to packages/plugins/@nocobase/plugin-field-sequence/src/server/index.ts diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/server/migrations/20221207022250-sequence-field-key.ts b/packages/plugins/@nocobase/plugin-field-sequence/src/server/migrations/20221207022250-sequence-field-key.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-sequence-field/src/server/migrations/20221207022250-sequence-field-key.ts rename to packages/plugins/@nocobase/plugin-field-sequence/src/server/migrations/20221207022250-sequence-field-key.ts diff --git a/packages/plugins/@nocobase/plugin-field-sequence/src/server/migrations/20240425225438-change-locale-module.ts b/packages/plugins/@nocobase/plugin-field-sequence/src/server/migrations/20240425225438-change-locale-module.ts new file mode 100644 index 0000000000..4395f0a608 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-field-sequence/src/server/migrations/20240425225438-change-locale-module.ts @@ -0,0 +1,21 @@ +import { Migration } from '@nocobase/server'; + +export default class extends Migration { + on = 'afterLoad'; // 'beforeLoad' or 'afterLoad' + appVersion = '<1.0.0-alpha.1'; + + async up() { + const repo = this.db.getRepository('localizationTexts'); + if (!repo) { + return; + } + await repo.update({ + filter: { + module: 'resources.sequence-field', + }, + values: { + module: 'resources.field-sequence', + }, + }); + } +} diff --git a/packages/plugins/@nocobase/plugin-file-manager/package.json b/packages/plugins/@nocobase/plugin-file-manager/package.json index a3f55c5723..af22390413 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/package.json +++ b/packages/plugins/@nocobase/plugin-file-manager/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-file-manager", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "displayName": "File manager", "displayName.zh-CN": "文件管理器", "description": "Provides files storage services with files collection template and attachment field.", @@ -32,12 +32,12 @@ "supertest": "^6.1.6" }, "peerDependencies": { - "@nocobase/actions": "0.x", - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/actions": "1.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "keywords": [ "Collections", diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/block.test.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/block.test.ts index 4718b3e684..9b36800743 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/block.test.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/block.test.ts @@ -1,4 +1,5 @@ import { expect, test } from '@nocobase/test/e2e'; +import { oneTableWithFileCollection } from './templates'; test.describe('file collection block', () => { test('What blocks are supported', async ({ page, mockPage }) => { @@ -16,7 +17,7 @@ test.describe('file collection block', () => { await page.getByLabel('schema-initializer-Grid-page:').hover(); await page.getByRole('menuitem', { name: ` ${blockName} right` }).hover(); await expect(page.getByRole('menuitem', { name: 'files' })).toBeVisible(); - await page.mouse.move(300, 0); + await page.mouse.move(500, 0); } }; const unsupportedBlocks = async (blockNameList: string[]) => { @@ -31,7 +32,7 @@ test.describe('file collection block', () => { .hover(); } await expect(page.getByRole('menuitem', { name: 'files' })).not.toBeVisible(); - await page.mouse.move(300, 0); + await page.mouse.move(500, 0); } }; @@ -40,618 +41,7 @@ test.describe('file collection block', () => { }); test('correctly size', async ({ page, mockPage, mockRecord }) => { - const nocoPage = await mockPage({ - collections: [ - { - name: 'files', - template: 'file', - }, - ], - pageSchema: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Page', - 'x-app-version': '0.21.0-alpha.15', - properties: { - wwro4dlw5z4: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Grid', - 'x-initializer': 'page:addBlock', - 'x-app-version': '0.21.0-alpha.15', - properties: { - rmicwcxvg20: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Grid.Row', - 'x-app-version': '0.21.0-alpha.15', - properties: { - q1zio1glrlv: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Grid.Col', - 'x-app-version': '0.21.0-alpha.15', - properties: { - s81y458aw3z: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-decorator': 'TableBlockProvider', - 'x-acl-action': 'files:list', - 'x-use-decorator-props': 'useTableBlockDecoratorProps', - 'x-decorator-props': { - collection: 'files', - dataSource: 'main', - action: 'list', - params: { - pageSize: 20, - }, - rowKey: 'id', - showIndex: true, - dragSort: false, - }, - 'x-toolbar': 'BlockSchemaToolbar', - 'x-settings': 'blockSettings:table', - 'x-component': 'CardItem', - 'x-filter-targets': [], - 'x-app-version': '0.21.0-alpha.15', - properties: { - actions: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-initializer': 'table:configureActions', - 'x-component': 'ActionBar', - 'x-component-props': { - style: { - marginBottom: 'var(--nb-spacing)', - }, - }, - 'x-app-version': '0.21.0-alpha.15', - properties: { - '5jd25vufv4c': { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-action': 'create', - title: "{{t('Upload')}}", - 'x-designer': 'Action.Designer', - 'x-component': 'Action', - 'x-decorator': 'ACLActionProvider', - 'x-component-props': { - openMode: 'drawer', - type: 'primary', - icon: 'UploadOutlined', - }, - 'x-align': 'right', - 'x-acl-action-props': { - skipScopeCheck: true, - }, - 'x-app-version': '0.21.0-alpha.15', - properties: { - drawer: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - title: '{{ t("Upload files") }}', - 'x-component': 'Action.Container', - 'x-app-version': '0.21.0-alpha.15', - properties: { - upload: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - title: '{{ t("Upload files") }}', - 'x-component': 'Upload.DraggerV2', - 'x-use-component-props': 'useUploadFiles', - 'x-component-props': { - height: '50vh', - multiple: true, - listType: 'picture', - }, - 'x-app-version': '0.21.0-alpha.15', - 'x-uid': '78szpjgvsdd', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'ukcboyk7lvd', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': '0ztmt5lqupg', - 'x-async': false, - 'x-index': 1, - }, - fxdalnlkfu2: { - _isJSONSchemaObject: true, - version: '2.0', - title: '{{ t("Refresh") }}', - 'x-action': 'refresh', - 'x-component': 'Action', - 'x-use-component-props': 'useRefreshActionProps', - 'x-toolbar': 'ActionSchemaToolbar', - 'x-settings': 'actionSettings:refresh', - 'x-component-props': { - icon: 'ReloadOutlined', - }, - 'x-align': 'right', - type: 'void', - 'x-app-version': '0.21.0-alpha.15', - 'x-uid': 'n4wj5dah2q5', - 'x-async': false, - 'x-index': 2, - }, - }, - 'x-uid': 'mv96b9p9evn', - 'x-async': false, - 'x-index': 1, - }, - udpxydv6won: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'array', - 'x-initializer': 'table:configureColumns', - 'x-component': 'TableV2', - 'x-use-component-props': 'useTableBlockProps', - 'x-component-props': { - rowKey: 'id', - rowSelection: { - type: 'checkbox', - }, - }, - 'x-app-version': '0.21.0-alpha.15', - properties: { - actions: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - title: '{{ t("Actions") }}', - 'x-action-column': 'actions', - 'x-decorator': 'TableV2.Column.ActionBar', - 'x-component': 'TableV2.Column', - 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'table:configureItemActions', - 'x-app-version': '0.21.0-alpha.15', - properties: { - e2tsz0ma2tu: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-decorator': 'DndContext', - 'x-component': 'Space', - 'x-component-props': { - split: '|', - }, - 'x-app-version': '0.21.0-alpha.15', - properties: { - pfqfjnvom21: { - 'x-uid': '5nm9q24py65', - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - title: 'View record', - 'x-action': 'view', - 'x-toolbar': 'ActionSchemaToolbar', - 'x-settings': 'actionSettings:view', - 'x-component': 'Action.Link', - 'x-component-props': { - openMode: 'drawer', - danger: false, - }, - 'x-decorator': 'ACLActionProvider', - 'x-designer-props': { - linkageAction: true, - }, - properties: { - drawer: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - title: '{{ t("View record") }}', - 'x-component': 'Action.Container', - 'x-component-props': { - className: 'nb-action-popup', - }, - properties: { - tabs: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Tabs', - 'x-component-props': {}, - 'x-initializer': 'popup:addTab', - properties: { - tab1: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - title: '{{t("Details")}}', - 'x-component': 'Tabs.TabPane', - 'x-designer': 'Tabs.Designer', - 'x-component-props': {}, - properties: { - grid: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Grid', - 'x-initializer': 'popup:common:addBlock', - properties: { - zfx6jwsh2px: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Grid.Row', - 'x-app-version': '0.21.0-alpha.15', - properties: { - ctt6x9ye302: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Grid.Col', - 'x-app-version': '0.21.0-alpha.15', - properties: { - lk6ha5ivn6a: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-acl-action': 'files:get', - 'x-decorator': 'DetailsBlockProvider', - 'x-use-decorator-props': 'useDetailsDecoratorProps', - 'x-decorator-props': { - dataSource: 'main', - collection: 'files', - readPretty: true, - action: 'get', - }, - 'x-toolbar': 'BlockSchemaToolbar', - 'x-settings': 'blockSettings:details', - 'x-component': 'CardItem', - 'x-app-version': '0.21.0-alpha.15', - properties: { - oqj95jew00z: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Details', - 'x-read-pretty': true, - 'x-use-component-props': 'useDetailsProps', - 'x-app-version': '0.21.0-alpha.15', - properties: { - rmh89kta0hf: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-initializer': 'details:configureActions', - 'x-component': 'ActionBar', - 'x-component-props': { - style: { - marginBottom: 24, - }, - }, - 'x-app-version': '0.21.0-alpha.15', - 'x-uid': 'tkbp2h8w1cb', - 'x-async': false, - 'x-index': 1, - }, - grid: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Grid', - 'x-initializer': 'details:configureFields', - 'x-app-version': '0.21.0-alpha.15', - properties: { - s3f1ea1t2u2: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Grid.Row', - 'x-app-version': '0.21.0-alpha.15', - properties: { - '7toegj7j80s': { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Grid.Col', - 'x-app-version': '0.21.0-alpha.15', - properties: { - url: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'string', - 'x-toolbar': - 'FormItemSchemaToolbar', - 'x-settings': - 'fieldSettings:FormItem', - 'x-component': - 'CollectionField', - 'x-decorator': 'FormItem', - 'x-collection-field': - 'files.url', - 'x-component-props': {}, - 'x-read-pretty': true, - 'x-app-version': - '0.21.0-alpha.15', - 'x-uid': 'gw6ycf9v9ck', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'ez3kik8rxh5', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'bwlyo0c4lws', - 'x-async': false, - 'x-index': 1, - }, - '70iulv6ohmn': { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Grid.Row', - 'x-app-version': '0.21.0-alpha.15', - properties: { - jbfkqnfdn2t: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Grid.Col', - 'x-app-version': '0.21.0-alpha.15', - properties: { - preview: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'string', - 'x-toolbar': - 'FormItemSchemaToolbar', - 'x-settings': - 'fieldSettings:FormItem', - 'x-component': - 'CollectionField', - 'x-decorator': 'FormItem', - 'x-collection-field': - 'files.preview', - 'x-component-props': {}, - 'x-read-pretty': true, - 'x-app-version': - '0.21.0-alpha.15', - 'x-uid': 'banact1d7ul', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'j0vyqltznqj', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': '1qxmx7wh972', - 'x-async': false, - 'x-index': 2, - }, - ezht5tlzcyo: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Grid.Row', - 'x-app-version': '0.21.0-alpha.15', - properties: { - ehtzpty1p3n: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Grid.Col', - 'x-app-version': '0.21.0-alpha.15', - properties: { - title: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'string', - 'x-toolbar': - 'FormItemSchemaToolbar', - 'x-settings': - 'fieldSettings:FormItem', - 'x-component': - 'CollectionField', - 'x-decorator': 'FormItem', - 'x-collection-field': - 'files.title', - 'x-component-props': {}, - 'x-app-version': - '0.21.0-alpha.15', - 'x-uid': 'sfx8flbjouu', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'woyeu6p657c', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': '1t97xmqbmmc', - 'x-async': false, - 'x-index': 3, - }, - cous2frggb8: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Grid.Row', - 'x-app-version': '0.21.0-alpha.15', - properties: { - ujbv7ewhh02: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-component': 'Grid.Col', - 'x-app-version': '0.21.0-alpha.15', - properties: { - filename: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'string', - 'x-toolbar': - 'FormItemSchemaToolbar', - 'x-settings': - 'fieldSettings:FormItem', - 'x-component': - 'CollectionField', - 'x-decorator': 'FormItem', - 'x-collection-field': - 'files.filename', - 'x-component-props': {}, - 'x-read-pretty': true, - 'x-app-version': - '0.21.0-alpha.15', - 'x-uid': 'igx2cic3z3s', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'v2262zi9s0y', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'mtsr0vhvhev', - 'x-async': false, - 'x-index': 4, - }, - }, - 'x-uid': 'h9wowg4qxn9', - 'x-async': false, - 'x-index': 2, - }, - }, - 'x-uid': 'abgy70jw6bh', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'd6tclnc3x23', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': '0mdhu8myu0t', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'tj8uc5x6zpo', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'pg8y0y4tfec', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': '41f7jmnvqfr', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': '9vfhihve2qu', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'u877bdnvwkd', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'z4ivtq1l8eu', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'o1jn2s0q214', - 'x-async': false, - 'x-index': 1, - }, - l0n1yivozlj: { - _isJSONSchemaObject: true, - version: '2.0', - type: 'void', - 'x-decorator': 'TableV2.Column.Decorator', - 'x-toolbar': 'TableColumnSchemaToolbar', - 'x-settings': 'fieldSettings:TableColumn', - 'x-component': 'TableV2.Column', - 'x-app-version': '0.21.0-alpha.15', - properties: { - preview: { - _isJSONSchemaObject: true, - version: '2.0', - 'x-collection-field': 'files.preview', - 'x-component': 'CollectionField', - 'x-component-props': { - size: 'small', - }, - 'x-read-pretty': true, - 'x-decorator': null, - 'x-decorator-props': { - labelStyle: { - display: 'none', - }, - }, - 'x-app-version': '0.21.0-alpha.15', - 'x-uid': 'qfdgjele52k', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'xupdn9xh709', - 'x-async': false, - 'x-index': 2, - }, - }, - 'x-uid': '1y8n3yv9ldo', - 'x-async': false, - 'x-index': 2, - }, - }, - 'x-uid': 'l6g95h45jvn', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'vmavmabildh', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': '4tbjevh15ob', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'wa1dmifukx3', - 'x-async': false, - 'x-index': 1, - }, - }, - 'x-uid': 'wj7bzobpx0q', - 'x-async': true, - 'x-index': 1, - }, - }).waitForInit(); + const nocoPage = await mockPage(oneTableWithFileCollection).waitForInit(); await mockRecord('files'); await nocoPage.goto(); diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/templates.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/templates.ts new file mode 100644 index 0000000000..57ab5a9d29 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/__e2e__/templates.ts @@ -0,0 +1,602 @@ +export const oneTableWithFileCollection = { + collections: [ + { + name: 'files', + template: 'file', + }, + ], + pageSchema: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Page', + 'x-app-version': '0.21.0-alpha.15', + properties: { + wwro4dlw5z4: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid', + 'x-initializer': 'page:addBlock', + 'x-app-version': '0.21.0-alpha.15', + properties: { + rmicwcxvg20: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Row', + 'x-app-version': '0.21.0-alpha.15', + properties: { + q1zio1glrlv: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Col', + 'x-app-version': '0.21.0-alpha.15', + properties: { + s81y458aw3z: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-decorator': 'TableBlockProvider', + 'x-acl-action': 'files:list', + 'x-use-decorator-props': 'useTableBlockDecoratorProps', + 'x-decorator-props': { + collection: 'files', + dataSource: 'main', + action: 'list', + params: { + pageSize: 20, + }, + rowKey: 'id', + showIndex: true, + dragSort: false, + }, + 'x-toolbar': 'BlockSchemaToolbar', + 'x-settings': 'blockSettings:table', + 'x-component': 'CardItem', + 'x-filter-targets': [], + 'x-app-version': '0.21.0-alpha.15', + properties: { + actions: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-initializer': 'table:configureActions', + 'x-component': 'ActionBar', + 'x-component-props': { + style: { + marginBottom: 'var(--nb-spacing)', + }, + }, + 'x-app-version': '0.21.0-alpha.15', + properties: { + '5jd25vufv4c': { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-action': 'create', + title: "{{t('Upload')}}", + 'x-designer': 'Action.Designer', + 'x-component': 'Action', + 'x-decorator': 'ACLActionProvider', + 'x-component-props': { + openMode: 'drawer', + type: 'primary', + icon: 'UploadOutlined', + }, + 'x-align': 'right', + 'x-acl-action-props': { + skipScopeCheck: true, + }, + 'x-app-version': '0.21.0-alpha.15', + properties: { + drawer: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + title: '{{ t("Upload files") }}', + 'x-component': 'Action.Container', + 'x-app-version': '0.21.0-alpha.15', + properties: { + upload: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + title: '{{ t("Upload files") }}', + 'x-component': 'Upload.DraggerV2', + 'x-use-component-props': 'useUploadFiles', + 'x-component-props': { + height: '50vh', + multiple: true, + listType: 'picture', + }, + 'x-app-version': '0.21.0-alpha.15', + 'x-uid': '78szpjgvsdd', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'ukcboyk7lvd', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': '0ztmt5lqupg', + 'x-async': false, + 'x-index': 1, + }, + fxdalnlkfu2: { + _isJSONSchemaObject: true, + version: '2.0', + title: '{{ t("Refresh") }}', + 'x-action': 'refresh', + 'x-component': 'Action', + 'x-use-component-props': 'useRefreshActionProps', + 'x-toolbar': 'ActionSchemaToolbar', + 'x-settings': 'actionSettings:refresh', + 'x-component-props': { + icon: 'ReloadOutlined', + }, + 'x-align': 'right', + type: 'void', + 'x-app-version': '0.21.0-alpha.15', + 'x-uid': 'n4wj5dah2q5', + 'x-async': false, + 'x-index': 2, + }, + }, + 'x-uid': 'mv96b9p9evn', + 'x-async': false, + 'x-index': 1, + }, + udpxydv6won: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'array', + 'x-initializer': 'table:configureColumns', + 'x-component': 'TableV2', + 'x-use-component-props': 'useTableBlockProps', + 'x-component-props': { + rowKey: 'id', + rowSelection: { + type: 'checkbox', + }, + }, + 'x-app-version': '0.21.0-alpha.15', + properties: { + actions: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + title: '{{ t("Actions") }}', + 'x-action-column': 'actions', + 'x-decorator': 'TableV2.Column.ActionBar', + 'x-component': 'TableV2.Column', + 'x-designer': 'TableV2.ActionColumnDesigner', + 'x-initializer': 'table:configureItemActions', + 'x-app-version': '0.21.0-alpha.15', + properties: { + e2tsz0ma2tu: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-decorator': 'DndContext', + 'x-component': 'Space', + 'x-component-props': { + split: '|', + }, + 'x-app-version': '0.21.0-alpha.15', + properties: { + pfqfjnvom21: { + 'x-uid': '5nm9q24py65', + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + title: 'View record', + 'x-action': 'view', + 'x-toolbar': 'ActionSchemaToolbar', + 'x-settings': 'actionSettings:view', + 'x-component': 'Action.Link', + 'x-component-props': { + openMode: 'drawer', + danger: false, + }, + 'x-decorator': 'ACLActionProvider', + 'x-designer-props': { + linkageAction: true, + }, + properties: { + drawer: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + title: '{{ t("View record") }}', + 'x-component': 'Action.Container', + 'x-component-props': { + className: 'nb-action-popup', + }, + properties: { + tabs: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Tabs', + 'x-component-props': {}, + 'x-initializer': 'popup:addTab', + properties: { + tab1: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + title: '{{t("Details")}}', + 'x-component': 'Tabs.TabPane', + 'x-designer': 'Tabs.Designer', + 'x-component-props': {}, + properties: { + grid: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid', + 'x-initializer': 'popup:common:addBlock', + properties: { + zfx6jwsh2px: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Row', + 'x-app-version': '0.21.0-alpha.15', + properties: { + ctt6x9ye302: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Col', + 'x-app-version': '0.21.0-alpha.15', + properties: { + lk6ha5ivn6a: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-acl-action': 'files:get', + 'x-decorator': 'DetailsBlockProvider', + 'x-use-decorator-props': 'useDetailsDecoratorProps', + 'x-decorator-props': { + dataSource: 'main', + collection: 'files', + readPretty: true, + action: 'get', + }, + 'x-toolbar': 'BlockSchemaToolbar', + 'x-settings': 'blockSettings:details', + 'x-component': 'CardItem', + 'x-app-version': '0.21.0-alpha.15', + properties: { + oqj95jew00z: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Details', + 'x-read-pretty': true, + 'x-use-component-props': 'useDetailsProps', + 'x-app-version': '0.21.0-alpha.15', + properties: { + rmh89kta0hf: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-initializer': 'details:configureActions', + 'x-component': 'ActionBar', + 'x-component-props': { + style: { + marginBottom: 24, + }, + }, + 'x-app-version': '0.21.0-alpha.15', + 'x-uid': 'tkbp2h8w1cb', + 'x-async': false, + 'x-index': 1, + }, + grid: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid', + 'x-initializer': 'details:configureFields', + 'x-app-version': '0.21.0-alpha.15', + properties: { + s3f1ea1t2u2: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Row', + 'x-app-version': '0.21.0-alpha.15', + properties: { + '7toegj7j80s': { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Col', + 'x-app-version': '0.21.0-alpha.15', + properties: { + url: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'string', + 'x-toolbar': + 'FormItemSchemaToolbar', + 'x-settings': + 'fieldSettings:FormItem', + 'x-component': 'CollectionField', + 'x-decorator': 'FormItem', + 'x-collection-field': 'files.url', + 'x-component-props': {}, + 'x-read-pretty': true, + 'x-app-version': '0.21.0-alpha.15', + 'x-uid': 'gw6ycf9v9ck', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'ez3kik8rxh5', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'bwlyo0c4lws', + 'x-async': false, + 'x-index': 1, + }, + '70iulv6ohmn': { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Row', + 'x-app-version': '0.21.0-alpha.15', + properties: { + jbfkqnfdn2t: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Col', + 'x-app-version': '0.21.0-alpha.15', + properties: { + preview: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'string', + 'x-toolbar': + 'FormItemSchemaToolbar', + 'x-settings': + 'fieldSettings:FormItem', + 'x-component': 'CollectionField', + 'x-decorator': 'FormItem', + 'x-collection-field': + 'files.preview', + 'x-component-props': {}, + 'x-read-pretty': true, + 'x-app-version': '0.21.0-alpha.15', + 'x-uid': 'banact1d7ul', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'j0vyqltznqj', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': '1qxmx7wh972', + 'x-async': false, + 'x-index': 2, + }, + ezht5tlzcyo: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Row', + 'x-app-version': '0.21.0-alpha.15', + properties: { + ehtzpty1p3n: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Col', + 'x-app-version': '0.21.0-alpha.15', + properties: { + title: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'string', + 'x-toolbar': + 'FormItemSchemaToolbar', + 'x-settings': + 'fieldSettings:FormItem', + 'x-component': 'CollectionField', + 'x-decorator': 'FormItem', + 'x-collection-field': 'files.title', + 'x-component-props': {}, + 'x-app-version': '0.21.0-alpha.15', + 'x-uid': 'sfx8flbjouu', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'woyeu6p657c', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': '1t97xmqbmmc', + 'x-async': false, + 'x-index': 3, + }, + cous2frggb8: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Row', + 'x-app-version': '0.21.0-alpha.15', + properties: { + ujbv7ewhh02: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Col', + 'x-app-version': '0.21.0-alpha.15', + properties: { + filename: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'string', + 'x-toolbar': + 'FormItemSchemaToolbar', + 'x-settings': + 'fieldSettings:FormItem', + 'x-component': 'CollectionField', + 'x-decorator': 'FormItem', + 'x-collection-field': + 'files.filename', + 'x-component-props': {}, + 'x-read-pretty': true, + 'x-app-version': '0.21.0-alpha.15', + 'x-uid': 'igx2cic3z3s', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'v2262zi9s0y', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'mtsr0vhvhev', + 'x-async': false, + 'x-index': 4, + }, + }, + 'x-uid': 'h9wowg4qxn9', + 'x-async': false, + 'x-index': 2, + }, + }, + 'x-uid': 'abgy70jw6bh', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'd6tclnc3x23', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': '0mdhu8myu0t', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'tj8uc5x6zpo', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'pg8y0y4tfec', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': '41f7jmnvqfr', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': '9vfhihve2qu', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'u877bdnvwkd', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'z4ivtq1l8eu', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'o1jn2s0q214', + 'x-async': false, + 'x-index': 1, + }, + l0n1yivozlj: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-decorator': 'TableV2.Column.Decorator', + 'x-toolbar': 'TableColumnSchemaToolbar', + 'x-settings': 'fieldSettings:TableColumn', + 'x-component': 'TableV2.Column', + 'x-app-version': '0.21.0-alpha.15', + properties: { + preview: { + _isJSONSchemaObject: true, + version: '2.0', + 'x-collection-field': 'files.preview', + 'x-component': 'CollectionField', + 'x-component-props': { + size: 'small', + }, + 'x-read-pretty': true, + 'x-decorator': null, + 'x-decorator-props': { + labelStyle: { + display: 'none', + }, + }, + 'x-app-version': '0.21.0-alpha.15', + 'x-uid': 'qfdgjele52k', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'xupdn9xh709', + 'x-async': false, + 'x-index': 2, + }, + }, + 'x-uid': '1y8n3yv9ldo', + 'x-async': false, + 'x-index': 2, + }, + }, + 'x-uid': 'l6g95h45jvn', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'vmavmabildh', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': '4tbjevh15ob', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'wa1dmifukx3', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'wj7bzobpx0q', + 'x-async': true, + 'x-index': 1, + }, +}; diff --git a/packages/plugins/@nocobase/plugin-gantt/package.json b/packages/plugins/@nocobase/plugin-gantt/package.json index 3e67b1a1c0..e1c8773d3c 100644 --- a/packages/plugins/@nocobase/plugin-gantt/package.json +++ b/packages/plugins/@nocobase/plugin-gantt/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-gantt", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "displayName": "Block: Gantt", "displayName.zh-CN": "区块:甘特图", "description": "Provides Gantt block.", @@ -13,9 +13,9 @@ "antd-style": "3.4.5" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/client": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json b/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json index fa72f5dadd..600940ed05 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json @@ -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": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/graph-collection-manager", @@ -29,11 +29,11 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-import/src/client/constants.ts b/packages/plugins/@nocobase/plugin-import/src/client/constants.ts deleted file mode 100644 index 485f2ad13f..0000000000 --- a/packages/plugins/@nocobase/plugin-import/src/client/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const NAMESPACE = 'import'; diff --git a/packages/plugins/@nocobase/plugin-kanban/package.json b/packages/plugins/@nocobase/plugin-kanban/package.json index 2c69427055..6adde0f14f 100644 --- a/packages/plugins/@nocobase/plugin-kanban/package.json +++ b/packages/plugins/@nocobase/plugin-kanban/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-kanban", - "version": "0.21.0-alpha.16", + "version": "1.0.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", @@ -10,9 +10,9 @@ "description": "Provides kanban block.", "description.zh-CN": "提供看板区块。", "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/client": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "dependencies": { "react-intersection-observer": "^9.8.1" diff --git a/packages/plugins/@nocobase/plugin-oidc/.npmignore b/packages/plugins/@nocobase/plugin-localization/.npmignore similarity index 100% rename from packages/plugins/@nocobase/plugin-oidc/.npmignore rename to packages/plugins/@nocobase/plugin-localization/.npmignore diff --git a/packages/plugins/@nocobase/plugin-saml/LICENSE b/packages/plugins/@nocobase/plugin-localization/LICENSE similarity index 100% rename from packages/plugins/@nocobase/plugin-saml/LICENSE rename to packages/plugins/@nocobase/plugin-localization/LICENSE diff --git a/packages/plugins/@nocobase/plugin-localization-management/README.md b/packages/plugins/@nocobase/plugin-localization/README.md similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/README.md rename to packages/plugins/@nocobase/plugin-localization/README.md diff --git a/packages/plugins/@nocobase/plugin-localization-management/client.d.ts b/packages/plugins/@nocobase/plugin-localization/client.d.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/client.d.ts rename to packages/plugins/@nocobase/plugin-localization/client.d.ts diff --git a/packages/plugins/@nocobase/plugin-sms-auth/client.js b/packages/plugins/@nocobase/plugin-localization/client.js similarity index 100% rename from packages/plugins/@nocobase/plugin-sms-auth/client.js rename to packages/plugins/@nocobase/plugin-localization/client.js diff --git a/packages/plugins/@nocobase/plugin-localization-management/package.json b/packages/plugins/@nocobase/plugin-localization/package.json similarity index 65% rename from packages/plugins/@nocobase/plugin-localization-management/package.json rename to packages/plugins/@nocobase/plugin-localization/package.json index 21f775da45..99600233a9 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/package.json +++ b/packages/plugins/@nocobase/plugin-localization/package.json @@ -1,6 +1,6 @@ { - "name": "@nocobase/plugin-localization-management", - "version": "0.21.0-alpha.16", + "name": "@nocobase/plugin-localization", + "version": "1.0.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", @@ -9,13 +9,13 @@ "deepmerge": "^4.3.1" }, "peerDependencies": { - "@nocobase/cache": "0.x", - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/plugin-client": "0.x", - "@nocobase/plugin-ui-schema-storage": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/cache": "1.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/plugin-client": "1.x", + "@nocobase/plugin-ui-schema-storage": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "keywords": [ "System management" diff --git a/packages/plugins/@nocobase/plugin-localization-management/server.d.ts b/packages/plugins/@nocobase/plugin-localization/server.d.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/server.d.ts rename to packages/plugins/@nocobase/plugin-localization/server.d.ts diff --git a/packages/plugins/@nocobase/plugin-sms-auth/server.js b/packages/plugins/@nocobase/plugin-localization/server.js similarity index 100% rename from packages/plugins/@nocobase/plugin-sms-auth/server.js rename to packages/plugins/@nocobase/plugin-localization/server.js diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/client/Localization.tsx b/packages/plugins/@nocobase/plugin-localization/src/client/Localization.tsx similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/client/Localization.tsx rename to packages/plugins/@nocobase/plugin-localization/src/client/Localization.tsx diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/client/index.tsx b/packages/plugins/@nocobase/plugin-localization/src/client/index.tsx similarity index 87% rename from packages/plugins/@nocobase/plugin-localization-management/src/client/index.tsx rename to packages/plugins/@nocobase/plugin-localization/src/client/index.tsx index 2e1fdd9a41..69ab0c2e70 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-localization/src/client/index.tsx @@ -8,7 +8,7 @@ export class PluginLocalizationClient extends Plugin { title: `{{t("Localization", { ns: "${NAMESPACE}" })}}`, icon: 'GlobalOutlined', Component: Localization, - aclSnippet: 'pm.localization-management.localization', + aclSnippet: 'pm.localization.localization', }); } } diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-localization/src/client/locale/index.ts similarity index 76% rename from packages/plugins/@nocobase/plugin-localization-management/src/client/locale/index.ts rename to packages/plugins/@nocobase/plugin-localization/src/client/locale/index.ts index 8a63e25712..5910d3a231 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/client/locale/index.ts +++ b/packages/plugins/@nocobase/plugin-localization/src/client/locale/index.ts @@ -1,6 +1,6 @@ import { useTranslation } from 'react-i18next'; -export const NAMESPACE = 'localization-management'; +export const NAMESPACE = 'localization'; export const useLocalTranslation = () => { return useTranslation([NAMESPACE, 'client'], { nsMode: 'fallback' }); diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/client/schemas/localization.tsx b/packages/plugins/@nocobase/plugin-localization/src/client/schemas/localization.tsx similarity index 99% rename from packages/plugins/@nocobase/plugin-localization-management/src/client/schemas/localization.tsx rename to packages/plugins/@nocobase/plugin-localization/src/client/schemas/localization.tsx index eb7d1840e7..5ca04509ed 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/client/schemas/localization.tsx +++ b/packages/plugins/@nocobase/plugin-localization/src/client/schemas/localization.tsx @@ -39,7 +39,7 @@ const collection = { }, { value: 'Collections & Fields', - label: '{{t("Collections & Fields", {ns:"localization-management"})}}', + label: '{{t("Collections & Fields", {ns:"localization"})}}', }, ], }, diff --git a/packages/plugins/@nocobase/plugin-saml/src/index.ts b/packages/plugins/@nocobase/plugin-localization/src/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-saml/src/index.ts rename to packages/plugins/@nocobase/plugin-localization/src/index.ts diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/locale/en-US.json b/packages/plugins/@nocobase/plugin-localization/src/locale/en-US.json similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/locale/en-US.json rename to packages/plugins/@nocobase/plugin-localization/src/locale/en-US.json diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/locale/ko_KR.json b/packages/plugins/@nocobase/plugin-localization/src/locale/ko_KR.json similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/locale/ko_KR.json rename to packages/plugins/@nocobase/plugin-localization/src/locale/ko_KR.json diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/locale/zh-CN.json b/packages/plugins/@nocobase/plugin-localization/src/locale/zh-CN.json similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/locale/zh-CN.json rename to packages/plugins/@nocobase/plugin-localization/src/locale/zh-CN.json diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/actions.test.ts b/packages/plugins/@nocobase/plugin-localization/src/server/__tests__/actions.test.ts similarity index 98% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/actions.test.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/__tests__/actions.test.ts index 4e7d963d6e..b6c07afbd0 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/actions.test.ts +++ b/packages/plugins/@nocobase/plugin-localization/src/server/__tests__/actions.test.ts @@ -19,7 +19,7 @@ describe('actions', () => { beforeAll(async () => { app = await createMockServer({ - plugins: ['localization-management'], + plugins: ['localization'], }); db = app.db; repo = db.getRepository('localizationTexts'); diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/middleware.test.ts b/packages/plugins/@nocobase/plugin-localization/src/server/__tests__/middleware.test.ts similarity index 83% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/middleware.test.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/__tests__/middleware.test.ts index afc30934aa..5be7a245aa 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/middleware.test.ts +++ b/packages/plugins/@nocobase/plugin-localization/src/server/__tests__/middleware.test.ts @@ -8,11 +8,11 @@ describe('middleware', () => { beforeEach(async () => { app = await createMockServer({ - plugins: ['localization-management', 'client', 'ui-schema-storage', 'system-settings'], + plugins: ['localization', 'client', 'ui-schema-storage', 'system-settings'], }); await app.localeManager.load(); agent = app.agent(); - plugin = app.pm.get('localization-management') as PluginLocalizationServer; + plugin = app.pm.get('localization') as PluginLocalizationServer; }); afterEach(async () => { diff --git a/packages/plugins/@nocobase/plugin-localization/src/server/__tests__/migrations/delete-pkg-name.test.ts b/packages/plugins/@nocobase/plugin-localization/src/server/__tests__/migrations/delete-pkg-name.test.ts new file mode 100644 index 0000000000..463b97c263 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-localization/src/server/__tests__/migrations/delete-pkg-name.test.ts @@ -0,0 +1,76 @@ +import { Repository } from '@nocobase/database'; +import { createMockServer, MockServer } from '@nocobase/test'; +import Migration from '../../migrations/20240426123538-delete-pkg-name-ns'; + +describe('delete pkg name', () => { + let app: MockServer; + let repo: Repository; + + beforeEach(async () => { + app = await createMockServer({ + plugins: ['localization'], // 插件 + version: '0.21.0-alpha.15', // 升级前的版本 + }); + repo = app.db.getRepository('localizationTexts'); + }); + + afterEach(async () => { + await app.destroy(); + }); + + it('should delete pkg name module', async () => { + await repo.create({ + values: [ + { + module: 'resources.@nocobase/plugin-for-test', + text: 'test', + }, + { + module: 'resources.for-test', + text: 'test', + }, + { + module: 'resources.@nocobase/plugin-for-test2', + text: 'test', + }, + { + module: 'resources.@custom/plugin-for-test', + text: 'test', + }, + { + module: 'resources.@nocobase/plugin-cas', + text: 'test', + }, + { + module: 'resources.cas', + text: 'test', + }, + ], + }); + const migration = new Migration({ + db: app.db, + // @ts-ignore + app: { + localeManager: { + getCacheResources: async () => ({ + '@nocobase/plugin-for-test': {}, + 'for-test': {}, + '@nocobase/plugin-for-test2': {}, + '@custom/plugin-for-test': {}, + 'auth-cas': {}, + '@nocobase/plugin-auth-cas': {}, + }), + }, + }, + }); + await migration.up(); + const result = await repo.find(); + expect(result.length).toBe(4); + expect(result.map((item) => item.module)).toMatchObject([ + 'resources.for-test', + 'resources.@nocobase/plugin-for-test2', + 'resources.@custom/plugin-for-test', + 'resources.cas', + ]); + }); +}); diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/resources.test.ts b/packages/plugins/@nocobase/plugin-localization/src/server/__tests__/resources.test.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/resources.test.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/__tests__/resources.test.ts diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/sync.test.ts b/packages/plugins/@nocobase/plugin-localization/src/server/__tests__/sync.test.ts similarity index 97% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/sync.test.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/__tests__/sync.test.ts index 24d5a84207..8e8e9dddda 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/sync.test.ts +++ b/packages/plugins/@nocobase/plugin-localization/src/server/__tests__/sync.test.ts @@ -1,8 +1,8 @@ -import { Model, Repository } from '@nocobase/database'; +import { Repository } from '@nocobase/database'; +import { UiSchemaRepository } from '@nocobase/plugin-ui-schema-storage'; import { MockServer, createMockServer } from '@nocobase/test'; import { getSchemaUid, getTextsFromDB, getTextsFromMenu } from '../actions/localization'; import { getMenuSchema, getMobileMenuSchema } from './utils'; -import { UiSchemaRepository } from '@nocobase/plugin-ui-schema-storage'; describe('sync', () => { let app: MockServer; @@ -13,8 +13,8 @@ describe('sync', () => { app = await createMockServer({ plugins: [ // 'data-source-manager', - 'collection-manager', - 'localization-management', + 'data-source-main', + 'localization', 'ui-schema-storage', 'client', 'mobile-client', diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/utils.ts b/packages/plugins/@nocobase/plugin-localization/src/server/__tests__/utils.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/__tests__/utils.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/__tests__/utils.ts diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localization.ts b/packages/plugins/@nocobase/plugin-localization/src/server/actions/localization.ts similarity index 92% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localization.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/actions/localization.ts index 6ef640f674..6d9f67ed4a 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localization.ts +++ b/packages/plugins/@nocobase/plugin-localization/src/server/actions/localization.ts @@ -4,15 +4,26 @@ import { UiSchemaRepository } from '@nocobase/plugin-ui-schema-storage'; import { NAMESPACE_COLLECTIONS, NAMESPACE_MENUS } from '../constans'; import LocalizationManagementPlugin from '../plugin'; import { getTextsFromDBRecord } from '../utils'; +import { OFFICIAL_PLUGIN_PREFIX } from '@nocobase/server'; const getResourcesInstance = async (ctx: Context) => { - const plugin = ctx.app.getPlugin('localization-management') as LocalizationManagementPlugin; + const plugin = ctx.app.getPlugin('localization') as LocalizationManagementPlugin; return plugin.resources; }; export const getResources = async (ctx: Context) => { const resources = await ctx.app.localeManager.getCacheResources(ctx.get('X-Locale') || 'en-US'); - return { ...resources }; + const result = {}; + Object.entries(resources).forEach(([module, resource]) => { + if (module.startsWith(OFFICIAL_PLUGIN_PREFIX)) { + const name = module.replace(OFFICIAL_PLUGIN_PREFIX, ''); + if (resources[name]) { + return; + } + } + result[module] = resource; + }); + return result; }; export const getUISchemas = async (db: Database) => { diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localizationTexts.ts b/packages/plugins/@nocobase/plugin-localization/src/server/actions/localizationTexts.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/actions/localizationTexts.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/actions/localizationTexts.ts diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-localization/src/server/collections/.gitkeep similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/collections/.gitkeep rename to packages/plugins/@nocobase/plugin-localization/src/server/collections/.gitkeep diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-texts.ts b/packages/plugins/@nocobase/plugin-localization/src/server/collections/localization-texts.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-texts.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/collections/localization-texts.ts diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-translations.ts b/packages/plugins/@nocobase/plugin-localization/src/server/collections/localization-translations.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/collections/localization-translations.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/collections/localization-translations.ts diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/constans.ts b/packages/plugins/@nocobase/plugin-localization/src/server/constans.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/constans.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/constans.ts diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/index.ts b/packages/plugins/@nocobase/plugin-localization/src/server/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/index.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/index.ts diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/migrations/20230706200900-roles-add-translation.ts b/packages/plugins/@nocobase/plugin-localization/src/server/migrations/20230706200900-roles-add-translation.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/migrations/20230706200900-roles-add-translation.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/migrations/20230706200900-roles-add-translation.ts diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/migrations/20231206161851-fix-module.ts b/packages/plugins/@nocobase/plugin-localization/src/server/migrations/20231206161851-fix-module.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/migrations/20231206161851-fix-module.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/migrations/20231206161851-fix-module.ts diff --git a/packages/plugins/@nocobase/plugin-localization/src/server/migrations/20240425224508-change-locale-module.ts b/packages/plugins/@nocobase/plugin-localization/src/server/migrations/20240425224508-change-locale-module.ts new file mode 100644 index 0000000000..8124f23b78 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-localization/src/server/migrations/20240425224508-change-locale-module.ts @@ -0,0 +1,21 @@ +import { Migration } from '@nocobase/server'; + +export default class extends Migration { + on = 'afterLoad'; // 'beforeLoad' or 'afterLoad' + appVersion = '<1.0.0-alpha.1'; + + async up() { + const repo = this.db.getRepository('localizationTexts'); + if (!repo) { + return; + } + await repo.update({ + filter: { + module: 'resources.localization-management', + }, + values: { + module: 'resources.localization', + }, + }); + } +} diff --git a/packages/plugins/@nocobase/plugin-localization/src/server/migrations/20240426123538-delete-pkg-name-ns.ts b/packages/plugins/@nocobase/plugin-localization/src/server/migrations/20240426123538-delete-pkg-name-ns.ts new file mode 100644 index 0000000000..649a090585 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-localization/src/server/migrations/20240426123538-delete-pkg-name-ns.ts @@ -0,0 +1,53 @@ +import { Migration, OFFICIAL_PLUGIN_PREFIX } from '@nocobase/server'; + +export default class extends Migration { + on = 'afterLoad'; // 'beforeLoad' or 'afterLoad' + appVersion = '<1.0.0-alpha.1'; + + namesMp = { + 'auth-cas': 'cas', + 'auth-oidc': 'oidc', + 'auth-saml': 'saml', + 'field-china-region': 'china-region', + 'action-custom-request': 'custom-request', + 'action-export': 'export', + 'field-formula': 'formula-field', + 'block-iframe': 'iframe-block', + 'action-import': 'import', + localization: 'localization-management', + 'field-sequence': 'sequence-field', + 'auth-sms': 'sms-auth', + }; + + async up() { + const resources = await this.app.localeManager.getCacheResources('en-US'); + const modules = Object.keys(resources); + Object.entries(this.namesMp).forEach(([newName, oldName]) => { + if (!modules.includes(newName)) { + return; + } + modules.push(oldName, `${OFFICIAL_PLUGIN_PREFIX}${oldName}`); + }); + const toBeDeleted = []; + modules.forEach((module) => { + if (!module.startsWith(OFFICIAL_PLUGIN_PREFIX)) { + return; + } + const name = module.replace(OFFICIAL_PLUGIN_PREFIX, ''); + if (!modules.includes(name)) { + return; + } + toBeDeleted.push(module); + }); + if (!toBeDeleted.length) { + return; + } + await this.db.getRepository('localizationTexts').destroy({ + filter: { + module: { + $in: toBeDeleted.map((module) => `resources.${module}`), + }, + }, + }); + } +} diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-localization/src/server/plugin.ts similarity index 93% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/plugin.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/plugin.ts index 40dd9579e6..a48cbd709c 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-localization/src/server/plugin.ts @@ -1,6 +1,6 @@ import { Model } from '@nocobase/database'; import PluginUISchemaStorageServer from '@nocobase/plugin-ui-schema-storage'; -import { InstallOptions, Plugin } from '@nocobase/server'; +import { InstallOptions, OFFICIAL_PLUGIN_PREFIX, Plugin } from '@nocobase/server'; import deepmerge from 'deepmerge'; import { resolve } from 'path'; import localization from './actions/localization'; @@ -49,14 +49,6 @@ export class PluginLocalizationServer extends Plugin { async load() { await this.importCollections(resolve(__dirname, 'collections')); - this.db.addMigrations({ - namespace: 'localization-management', - directory: resolve(__dirname, 'migrations'), - context: { - plugin: this, - }, - }); - this.app.resource({ name: 'localizationTexts', actions: localizationTexts, @@ -115,7 +107,7 @@ export class PluginLocalizationServer extends Plugin { this.registerUISchemahook(); - this.app.resourcer.use(async (ctx, next) => { + this.app.resourceManager.use(async (ctx, next) => { await next(); const { resourceName, actionName } = ctx.action.params; if (resourceName === 'app' && actionName === 'getLang') { @@ -127,6 +119,10 @@ export class PluginLocalizationServer extends Plugin { const resource = appLang.resources[module]; const customResource = custom[key]; resources[module] = resource ? deepmerge(resource, customResource) : customResource; + const pkgName = `${OFFICIAL_PLUGIN_PREFIX}${module}`; + if (appLang.resources[pkgName]) { + resources[pkgName] = { ...resources[module] }; + } }); ctx.body = { ...appLang, diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/resources.ts b/packages/plugins/@nocobase/plugin-localization/src/server/resources.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/resources.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/resources.ts diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/utils.ts b/packages/plugins/@nocobase/plugin-localization/src/server/utils.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/server/utils.ts rename to packages/plugins/@nocobase/plugin-localization/src/server/utils.ts diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/swagger/index.json b/packages/plugins/@nocobase/plugin-localization/src/swagger/index.json similarity index 100% rename from packages/plugins/@nocobase/plugin-localization-management/src/swagger/index.json rename to packages/plugins/@nocobase/plugin-localization/src/swagger/index.json diff --git a/packages/plugins/@nocobase/plugin-logger/package.json b/packages/plugins/@nocobase/plugin-logger/package.json index e9f1bf350e..cdc8b2d0d1 100644 --- a/packages/plugins/@nocobase/plugin-logger/package.json +++ b/packages/plugins/@nocobase/plugin-logger/package.json @@ -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": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/logger", @@ -14,10 +14,10 @@ "tar-fs": "^3.0.4" }, "peerDependencies": { - "@nocobase/actions": "0.x", - "@nocobase/client": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/actions": "1.x", + "@nocobase/client": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-map/package.json b/packages/plugins/@nocobase/plugin-map/package.json index 6607fda783..c4e26640b3 100644 --- a/packages/plugins/@nocobase/plugin-map/package.json +++ b/packages/plugins/@nocobase/plugin-map/package.json @@ -2,7 +2,7 @@ "name": "@nocobase/plugin-map", "displayName": "Block: Map", "displayName.zh-CN": "区块:地图", - "version": "0.21.0-alpha.16", + "version": "1.0.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", @@ -29,12 +29,12 @@ "react-router-dom": "^6.11.2" }, "peerDependencies": { - "@nocobase/actions": "0.x", - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/actions": "1.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-mobile-client/package.json b/packages/plugins/@nocobase/plugin-mobile-client/package.json index 589a44f215..544c9cf8ce 100644 --- a/packages/plugins/@nocobase/plugin-mobile-client/package.json +++ b/packages/plugins/@nocobase/plugin-mobile-client/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-mobile-client", - "version": "0.21.0-alpha.16", + "version": "1.0.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", @@ -27,11 +27,11 @@ "react-router-dom": "6.x" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" } diff --git a/packages/plugins/@nocobase/plugin-mock-collections/package.json b/packages/plugins/@nocobase/plugin-mock-collections/package.json index de54ecf2ea..494ae6a196 100644 --- a/packages/plugins/@nocobase/plugin-mock-collections/package.json +++ b/packages/plugins/@nocobase/plugin-mock-collections/package.json @@ -2,16 +2,16 @@ "name": "@nocobase/plugin-mock-collections", "displayName": "mock-collections", "description": "mock-collections", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "main": "./dist/server/index.js", "license": "AGPL-3.0", "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/plugin-error-handler": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/plugin-error-handler": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "devDependencies": { "pg": "^8.11.3" diff --git a/packages/plugins/@nocobase/plugin-mock-collections/src/server/index.ts b/packages/plugins/@nocobase/plugin-mock-collections/src/server/index.ts index 9d30d10db7..05e3ed73da 100644 --- a/packages/plugins/@nocobase/plugin-mock-collections/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-mock-collections/src/server/index.ts @@ -1,5 +1,5 @@ import Database, { Collection, Repository } from '@nocobase/database'; -import { CollectionRepository } from '@nocobase/plugin-collection-manager'; +import { CollectionRepository } from '@nocobase/plugin-data-source-main'; import { InstallOptions, Plugin } from '@nocobase/server'; import { merge, uid } from '@nocobase/utils'; import { promises as fs } from 'fs'; diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/package.json b/packages/plugins/@nocobase/plugin-multi-app-manager/package.json index 5384c9f6fa..bc65bb0782 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/package.json +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "多应用管理器", "description": "Dynamically create multiple apps without separate deployments.", "description.zh-CN": "无需单独部署即可动态创建多个应用。", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/multi-app-manager", @@ -22,11 +22,11 @@ "react-router-dom": "^6.11.2" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json b/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json index 037c46be9f..58183632cb 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "多应用数据表共享", "description": "", "description.zh-CN": "", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "main": "./dist/server/index.js", "devDependencies": { "@formily/react": "2.x", @@ -13,15 +13,15 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/plugin-collection-manager": "0.x", - "@nocobase/plugin-error-handler": "0.x", - "@nocobase/plugin-multi-app-manager": "0.x", - "@nocobase/plugin-users": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/plugin-data-source-main": "1.x", + "@nocobase/plugin-error-handler": "1.x", + "@nocobase/plugin-multi-app-manager": "1.x", + "@nocobase/plugin-users": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-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 index 1cfdef11b9..ffac7825ef 100644 --- a/packages/plugins/@nocobase/plugin-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 @@ -13,6 +13,8 @@ describe.runIf(isPg())('enable plugin', () => { plugins: ['nocobase'], }); + await app.runCommand('pm', 'add', 'multi-app-share-collection'); + mainApp = app; mainDb = mainApp.db; @@ -47,6 +49,7 @@ describe.runIf(isPg())('collection sync after main', () => { await app.db.sequelize.query(`DROP SCHEMA IF EXISTS sub2 CASCADE`); }, }); + await app.runCommand('pm', 'add', 'multi-app-share-collection'); mainApp = app; }); @@ -109,6 +112,7 @@ describe.runIf(isPg())('collection sync', () => { await app.db.sequelize.query(`DROP SCHEMA IF EXISTS sub2 CASCADE`); }, }); + await app.runCommand('pm', 'add', 'multi-app-share-collection'); await app.pm.enable('multi-app-manager'); await app.pm.enable('multi-app-share-collection'); diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/index.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/index.ts index 979ecb1667..af329dece9 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/index.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/__tests__/index.ts @@ -4,7 +4,7 @@ export async function createApp(options = {}) { const app = await createMockServer({ acl: false, ...options, - plugins: ['users', 'error-handler', 'collection-manager', 'multi-app-manager', 'multi-app-share-collection'], + plugins: ['users', 'error-handler', 'data-source-main', 'multi-app-manager', 'multi-app-share-collection'], }); return app; diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/plugin.ts index c4ef3935fc..d3a8f6c4b5 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/plugin.ts @@ -4,7 +4,7 @@ import { Application, AppSupervisor, Plugin } from '@nocobase/server'; import lodash from 'lodash'; const subAppFilteredPlugins = ['multi-app-share-collection', 'multi-app-manager']; -const unSyncPlugins = ['localization-management']; +const unSyncPlugins = ['localization']; class SubAppPlugin extends Plugin { beforeLoad() { @@ -20,7 +20,7 @@ class SubAppPlugin extends Plugin { } subApp.on('beforeLoadPlugin', (plugin) => { - if (plugin.name === 'collection-manager') { + if (plugin.name === 'data-source-main') { plugin.setLoadFilter({ 'name.$ne': 'roles', }); diff --git a/packages/plugins/@nocobase/plugin-notifications/package.json b/packages/plugins/@nocobase/plugin-notifications/package.json index a548eb06cf..df989aeaeb 100644 --- a/packages/plugins/@nocobase/plugin-notifications/package.json +++ b/packages/plugins/@nocobase/plugin-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-notifications", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "description": "", "license": "AGPL-3.0", "main": "./dist/server/index.js", @@ -10,11 +10,11 @@ "nodemailer-mock": "^1.5.11" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" } diff --git a/packages/plugins/@nocobase/plugin-oidc/README.md b/packages/plugins/@nocobase/plugin-oidc/README.md deleted file mode 100644 index 10ecf52247..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# oidc - -English | [中文](./README.zh-CN.md) - -## 安装激活 - -```bash -yarn pm enable oidc -``` - -## 使用方法 diff --git a/packages/plugins/@nocobase/plugin-oidc/README.zh-CN.md b/packages/plugins/@nocobase/plugin-oidc/README.zh-CN.md deleted file mode 100644 index 972dc9c4b1..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/README.zh-CN.md +++ /dev/null @@ -1,38 +0,0 @@ -# OIDC -提供标准Open ConnectID接入登录功能。 -本插件登录流程使用**授权码模式 (Authorization Code Flow)**. - -## 依赖 -- `@nocobase/plugin-auth` 提供表,模型函数复用等 - -## 使用方法 -> 以Sign in with Google为例 -> https://developers.google.com/identity/openid-connect/openid-connect - -### 获取Google OAuth 2.0凭据 -[Google Cloud控制台](https://console.cloud.google.com/apis/credentials) - 创建凭据 - OAuth客户端ID - - - -进入到配置界面,填写**授权重定向URL**. 重定向URL可以在Nocobase,新增认证器时获取,通常情况下为`http(s)://host:port/api/oidc:redirect`. - - - -完成后复制**客户端ID**和**客户端密钥**。 - -### 在NocoBase上新增认证器 -插件设置 - 认证 - 新增 - OIDC - - -依次填写 - -- Issuer - issuer由IdP提供,通常以`/.well-known/openid-configuration`结尾,Google的为[https://accounts.google.com/.well-known/openid-configuration](https://accounts.google.com/.well-known/openid-configuration) -- Client ID - 客户端ID -- Client Secret - 客户端密钥 -- scope - 选填,默认为openid email profile -- id_token signed response algorithm - id_token的签名方法,默认为RS256 -- HTTP - 回调地址是否为http协议,默认https -- Port - 回调地址端口,默认为443/80 -- Field Map - 如果需要将用户相关字段映射,可以在这里配置,默认昵称为openid. - -在有email的情况下,登录时将尝试匹配已有用户,否则创建新用户。 diff --git a/packages/plugins/@nocobase/plugin-oidc/client.js b/packages/plugins/@nocobase/plugin-oidc/client.js deleted file mode 100644 index b6e3be70e6..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/client.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/client/index.js'); diff --git a/packages/plugins/@nocobase/plugin-oidc/package.json b/packages/plugins/@nocobase/plugin-oidc/package.json deleted file mode 100644 index 1078d3cd5e..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "@nocobase/plugin-oidc", - "displayName": "Auth: OIDC", - "displayName.zh-CN": "认证:OIDC", - "description": "OIDC (OpenID Connect) authentication.", - "description.zh-CN": "通过 OIDC (OpenID Connect) 协议认证身份。", - "version": "0.21.0-alpha.16", - "license": "AGPL-3.0", - "main": "./dist/server/index.js", - "homepage": "https://docs.nocobase.com/handbook/auth-oidc", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/auth-oidc", - "devDependencies": { - "@ant-design/icons": "5.x", - "@formily/antd-v5": "1.x", - "@formily/react": "2.x", - "ahooks": "^3.7.2", - "antd": "5.x", - "nanoid": "3.3.4", - "openid-client": "^5.4.2", - "react": "18.x", - "react-i18next": "^11.15.1" - }, - "peerDependencies": { - "@nocobase/actions": "0.x", - "@nocobase/auth": "0.x", - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/plugin-auth": ">=0.17.0-alpha.7", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "keywords": [ - "Authentication" - ] -} diff --git a/packages/plugins/@nocobase/plugin-oidc/server.js b/packages/plugins/@nocobase/plugin-oidc/server.js deleted file mode 100644 index 972842039a..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/server.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/server/index.js'); diff --git a/packages/plugins/@nocobase/plugin-oidc/src/client/OIDCButton.tsx b/packages/plugins/@nocobase/plugin-oidc/src/client/OIDCButton.tsx deleted file mode 100644 index 1246d51ac1..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/client/OIDCButton.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { LoginOutlined } from '@ant-design/icons'; -import { css, useAPIClient } from '@nocobase/client'; -import { Button, Space, message } from 'antd'; -import React, { useEffect } from 'react'; -import { useOidcTranslation } from './locale'; -import { useLocation } from 'react-router-dom'; -import { Authenticator } from '@nocobase/plugin-auth/client'; - -export interface OIDCProvider { - clientId: string; - title: string; -} - -export const OIDCButton = ({ authenticator }: { authenticator: Authenticator }) => { - const { t } = useOidcTranslation(); - const api = useAPIClient(); - const location = useLocation(); - const params = new URLSearchParams(location.search); - const redirect = params.get('redirect'); - - const login = async () => { - const response = await api.request({ - method: 'post', - url: 'oidc:getAuthUrl', - headers: { - 'X-Authenticator': authenticator.name, - }, - data: { - redirect, - }, - }); - - const authUrl = response?.data?.data; - window.location.replace(authUrl); - }; - - useEffect(() => { - const name = params.get('authenticator'); - const error = params.get('error'); - if (name !== authenticator.name) { - return; - } - if (error) { - message.error(t(error)); - return; - } - }); - - return ( - - - - ); -}; diff --git a/packages/plugins/@nocobase/plugin-oidc/src/client/Options.tsx b/packages/plugins/@nocobase/plugin-oidc/src/client/Options.tsx deleted file mode 100644 index ca886f0fce..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/client/Options.tsx +++ /dev/null @@ -1,355 +0,0 @@ -import { CopyOutlined } from '@ant-design/icons'; -import { ArrayItems, FormTab } from '@formily/antd-v5'; -import { observer } from '@formily/react'; -import { FormItem, Input, SchemaComponent, useApp } from '@nocobase/client'; -import { Card, Space, message } from 'antd'; -import React, { useMemo } from 'react'; -import { lang, useOidcTranslation } from './locale'; - -const schema = { - type: 'object', - properties: { - public: { - type: 'object', - properties: { - autoSignup: { - 'x-decorator': 'FormItem', - type: 'boolean', - title: '{{t("Sign up automatically when the user does not exist")}}', - 'x-component': 'Checkbox', - default: true, - }, - }, - }, - oidc: { - type: 'object', - properties: { - collapse: { - type: 'void', - 'x-component': 'FormTab', - properties: { - basic: { - type: 'void', - 'x-component': 'FormTab.TabPane', - 'x-component-props': { - tab: lang('Basic configuration'), - }, - properties: { - issuer: { - type: 'string', - title: '{{t("Issuer")}}', - 'x-component': 'Input', - 'x-decorator': 'FormItem', - required: true, - }, - clientId: { - type: 'string', - title: '{{t("Client ID")}}', - 'x-component': 'Input', - 'x-decorator': 'FormItem', - required: true, - }, - clientSecret: { - type: 'string', - title: '{{t("Client Secret")}}', - 'x-component': 'Input', - 'x-decorator': 'FormItem', - required: true, - }, - scope: { - type: 'string', - title: '{{t("scope")}}', - 'x-component': 'Input', - 'x-decorator': 'FormItem', - 'x-decorator-props': { - tooltip: '{{t("Default: openid profile email")}}', - }, - }, - idTokenSignedResponseAlg: { - type: 'string', - title: '{{t("id_token signed response algorithm")}}', - 'x-component': 'Select', - 'x-decorator': 'FormItem', - enum: [ - { label: 'HS256', value: 'HS256' }, - { label: 'HS384', value: 'HS384' }, - { label: 'HS512', value: 'HS512' }, - { label: 'RS256', value: 'RS256' }, - { label: 'RS384', value: 'RS384' }, - { label: 'RS512', value: 'RS512' }, - { label: 'ES256', value: 'ES256' }, - { label: 'ES384', value: 'ES384' }, - { label: 'ES512', value: 'ES512' }, - { label: 'PS256', value: 'PS256' }, - { label: 'PS384', value: 'PS384' }, - { label: 'PS512', value: 'PS512' }, - ], - }, - }, - }, - mapping: { - type: 'void', - 'x-component': 'FormTab.TabPane', - 'x-component-props': { - tab: lang('Field mapping'), - }, - properties: { - fieldMap: { - title: '{{t("Field Map")}}', - type: 'array', - 'x-decorator': 'FormItem', - 'x-component': 'ArrayItems', - items: { - type: 'object', - 'x-decorator': 'ArrayItems.Item', - properties: { - space: { - type: 'void', - 'x-component': 'Space', - properties: { - source: { - type: 'string', - 'x-decorator': 'FormItem', - 'x-component': 'Input', - 'x-component-props': { - placeholder: '{{t("source")}}', - }, - }, - target: { - type: 'string', - 'x-decorator': 'FormItem', - 'x-component': 'Select', - 'x-component-props': { - placeholder: '{{t("target")}}', - }, - enum: [ - { label: lang('Nickname'), value: 'nickname' }, - { label: lang('Email'), value: 'email' }, - { label: lang('Phone'), value: 'phone' }, - { label: lang('Username'), value: 'username' }, - ], - }, - remove: { - type: 'void', - 'x-decorator': 'FormItem', - 'x-component': 'ArrayItems.Remove', - }, - }, - }, - }, - }, - properties: { - add: { - type: 'void', - title: 'Add', - 'x-component': 'ArrayItems.Addition', - }, - }, - }, - userBindField: { - type: 'string', - title: '{{t("Use this field to bind the user")}}', - 'x-component': 'Select', - 'x-decorator': 'FormItem', - default: 'email', - enum: [ - { label: lang('Email'), value: 'email' }, - { label: lang('Username'), value: 'username' }, - ], - required: true, - }, - }, - }, - advanced: { - type: 'void', - 'x-component': 'FormTab.TabPane', - 'x-component-props': { - tab: lang('Advanced configuration'), - }, - properties: { - http: { - type: 'boolean', - title: '{{t("HTTP")}}', - 'x-component': 'Checkbox', - 'x-decorator': 'FormItem', - 'x-decorator-props': { - tooltip: '{{t("Check if NocoBase is running on HTTP protocol")}}', - }, - }, - port: { - type: 'number', - title: '{{t("Port")}}', - 'x-component': 'InputNumber', - 'x-decorator': 'FormItem', - 'x-decorator-props': { - tooltip: '{{t("The port number of the NocoBase service if it is not 80 or 443")}}', - }, - 'x-component-props': { - style: { - width: '15%', - minWidth: '100px', - }, - }, - }, - stateToken: { - type: 'string', - title: '{{t("State token")}}', - 'x-component': 'Input', - 'x-decorator': 'FormItem', - description: lang( - "The state token helps prevent CSRF attacks. It's recommended to leave it blank for automatic random generation.", - ), - }, - exchangeBodyKeys: { - type: 'array', - title: '{{t("Pass parameters in the authorization code grant exchange")}}', - 'x-decorator': 'FormItem', - 'x-component': 'ArrayItems', - default: [ - { paramName: '', optionsKey: 'clientId' }, - { - paramName: '', - optionsKey: 'clientSecret', - }, - ], - items: { - type: 'object', - 'x-decorator': 'ArrayItems.Item', - properties: { - space: { - type: 'void', - 'x-component': 'Space', - properties: { - enabled: { - type: 'boolean', - 'x-decorator': 'FormItem', - 'x-component': 'Checkbox', - }, - optionsKey: { - type: 'string', - 'x-decorator': 'FormItem', - 'x-decorator-props': { - style: { - width: '100px', - }, - }, - 'x-component': 'Select', - 'x-read-pretty': true, - enum: [ - { label: lang('Client ID'), value: 'clientId' }, - { label: lang('Client Secret'), value: 'clientSecret' }, - ], - }, - paramName: { - type: 'string', - 'x-decorator': 'FormItem', - 'x-component': 'Input', - 'x-component-props': { - placeholder: '{{t("Parameter name")}}', - }, - }, - }, - }, - }, - }, - }, - userInfoMethod: { - type: 'string', - title: '{{t("Method to call the user info endpoint")}}', - 'x- decorator': 'FormItem', - 'x-component': 'Radio.Group', - default: 'GET', - enum: [ - { - label: 'GET', - value: 'GET', - }, - { - label: 'POST', - value: 'POST', - }, - ], - 'x-reactions': [ - { - dependencies: ['.accessTokenVia'], - when: '{{$deps[0] === "query"}}', - fulfill: { - state: { - value: 'GET', - }, - }, - }, - { - dependencies: ['.accessTokenVia'], - when: '{{$deps[0] === "body"}}', - fulfill: { - state: { - value: 'POST', - }, - }, - }, - ], - }, - accessTokenVia: { - type: 'string', - title: '{{t("Where to put the access token when calling the user info endpoint")}}', - 'x- decorator': 'FormItem', - 'x-component': 'Radio.Group', - default: 'header', - enum: [ - { - label: lang('Header'), - value: 'header', - }, - { - label: lang('Body (Use with POST method)'), - value: 'body', - }, - { - label: lang('Query parameters (Use with GET method)'), - value: 'query', - }, - ], - }, - }, - }, - }, - }, - }, - }, - usage: { - type: 'void', - 'x-component': 'Usage', - }, - }, -}; - -const Usage = observer( - () => { - const { t } = useOidcTranslation(); - const app = useApp(); - - const url = useMemo(() => { - return app.getApiUrl('oidc:redirect'); - }, [app]); - - const copy = (text: string) => { - navigator.clipboard.writeText(text); - message.success(t('Copied')); - }; - - return ( - - - copy(url)} />} /> - - - ); - }, - { displayName: 'Usage' }, -); - -export const Options = () => { - const { t } = useOidcTranslation(); - return ; -}; diff --git a/packages/plugins/@nocobase/plugin-oidc/src/client/index.tsx b/packages/plugins/@nocobase/plugin-oidc/src/client/index.tsx deleted file mode 100644 index 6f3f069fee..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/client/index.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { Plugin } from '@nocobase/client'; -import AuthPlugin from '@nocobase/plugin-auth/client'; -import { authType } from '../constants'; -import { OIDCButton } from './OIDCButton'; -import { Options } from './Options'; - -export class PluginOIDCClient extends Plugin { - async load() { - const auth = this.app.pm.get(AuthPlugin); - auth.registerType(authType, { - components: { - SignInButton: OIDCButton, - AdminSettingsForm: Options, - }, - }); - } -} - -export default PluginOIDCClient; diff --git a/packages/plugins/@nocobase/plugin-oidc/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-oidc/src/client/locale/index.ts deleted file mode 100644 index 4492ea69f2..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/client/locale/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { i18n } from '@nocobase/client'; -import { useTranslation } from 'react-i18next'; - -export const NAMESPACE = 'oidc'; - -// i18n.addResources('zh-CN', NAMESPACE, zhCN); -// i18n.addResources('en-US', NAMESPACE, enUS); -// i18n.addResources('ja-JP', NAMESPACE, jaJP); -// i18n.addResources('ru-RU', NAMESPACE, ruRU); -// i18n.addResources('tr-TR', NAMESPACE, trTR); - -export function lang(key: string) { - return i18n.t(key, { ns: NAMESPACE }); -} - -export function useOidcTranslation() { - return useTranslation(NAMESPACE); -} diff --git a/packages/plugins/@nocobase/plugin-oidc/src/constants.ts b/packages/plugins/@nocobase/plugin-oidc/src/constants.ts deleted file mode 100644 index 4cd7070334..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/constants.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-ignore -import { name } from '../package.json'; - -export const authType = 'OIDC'; -export const cookieName = 'nocobase_oidc'; -export const namespace = name; diff --git a/packages/plugins/@nocobase/plugin-oidc/src/locale/en-US.json b/packages/plugins/@nocobase/plugin-oidc/src/locale/en-US.json deleted file mode 100644 index 4ce29c41f3..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/locale/en-US.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "Enable": "Enable", - "Issuer": "Issuer", - "OIDC manager": "OIDC manager", - "OIDC Providers": "OIDC Providers", - "Provider name": "Name", - "Client id": "Client id", - "Client secret": "Client secret", - "Openid configuration": "Openid configuration", - "Authorization endpoint": "Authorization endpoint", - "Access token endpoint": "Access token endpoint", - "JWKS endpoint": "JWKS endpoint", - "Userinfo endpoint": "Userinfo endpoint", - "Redirect url": "Redirect url", - "Logout endpoint": "Logout endpoint", - "Id token sign alg": "Id token sign alg", - "Add provider": "Add", - "Edit provider": "Edit", - "Delete provider": "Delete", - "Sign in button name, which will be displayed on the sign in page": "Sign in button name, which will be displayed on the sign in page", - "Use this field to bind the user": "Use this field to bind the user", - "Sign up automatically when the user does not exist": "Sign up automatically when the user does not exist", - "Username must be 2-16 characters in length (excluding @.<>\"'/)": "Username must be 2-16 characters in length (excluding @.<>\"'/)", - "User not found": "User not found", - "Basic configuration": "Basic configuration", - "Field mapping": "Field mapping", - "Advanced configuration": "Advanced configuration", - "Usage": "Usage", - "Redirect URL": "Redirect URL", - "Check if NocoBase is running on HTTP protocol": "Check if NocoBase is running on HTTP protocol", - "The port number of the NocoBase service if it is not 80 or 443": "The port number of the NocoBase service if it is not 80 or 443", - "Pass parameters in the authorization code grant exchange": "Pass parameters in the authorization code grant exchange", - "Method to call the user info endpoint": "Method to call the user info endpoint", - "Where to put the access token when calling the user info endpoint": "Where to put the access token when calling the user info endpoint", - "Header": "Header", - "Body (Use with POST method)": "Body (Use with POST method)", - "Query parameters (Use with GET method)": "Query parameters (Use with GET method)", - "Parameter name": "Parameter name", - "The state token helps prevent CSRF attacks. It's recommended to leave it blank for automatic random generation.": "The state token helps prevent CSRF attacks. It's recommended to leave it blank for automatic random generation." -} diff --git a/packages/plugins/@nocobase/plugin-oidc/src/locale/es-ES.json b/packages/plugins/@nocobase/plugin-oidc/src/locale/es-ES.json deleted file mode 100644 index e31ce83d8a..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/locale/es-ES.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "Enable": "Activar", - "Issuer": "Emisor", - "Actions": "Acciones", - "Delete": "Borrar", - "Edit": "Editar", - "Button title": "Título del botón", - "OIDC manager": "Gestor OIDC", - "OIDC Providers": "Proveedores OIDC", - "Provider name": "Nombre", - "Client id": "Id de cliente", - "Client secret": "Secreto del cliente", - "Openid configuration": "Configuración Openid", - "Authorization endpoint": "Endpoint de autorización ", - "Access token endpoint": "Endpoint de token de acceso", - "JWKS endpoint": "Endpoint de JWKS", - "Userinfo endpoint": "Userinfo endpoint", - "Redirect url": "Redirect url", - "Logout endpoint": "Endpoint de cierre de sesión", - "Id token sign alg": "Id token sign alg", - "Add provider": "Añadir Proveedor", - "Edit provider": "Editar Proveedor", - "Delete provider": "Borrar Proveedor", - "Sign in button name, which will be displayed on the sign in page": "Nombre del botón de inicio de sesión, que se mostrará en la página de inicio de sesión" -} diff --git a/packages/plugins/@nocobase/plugin-oidc/src/locale/fr-FR.json b/packages/plugins/@nocobase/plugin-oidc/src/locale/fr-FR.json deleted file mode 100644 index 7927beced6..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/locale/fr-FR.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "Enable": "Activer", - "Issuer": "Issuer", - "OIDC manager": "OIDC manager", - "OIDC Providers": "OIDC Providers", - "Provider name": "Nom", - "Client id": "Client id", - "Client secret": "Client secret", - "Openid configuration": "Openid configuration", - "Authorization endpoint": "Authorization endpoint", - "Access token endpoint": "Access token endpoint", - "JWKS endpoint": "JWKS endpoint", - "Userinfo endpoint": "Userinfo endpoint", - "Redirect url": "Redirect url", - "Logout endpoint": "Logout endpoint", - "Id token sign alg": "Id token sign alg", - "Add provider": "Ajouter", - "Edit provider": "Modifier", - "Delete provider": "Supprimer", - "Sign in button name, which will be displayed on the sign in page": "Nom du bouton de connexion, qui sera affiché sur la page de connexion" -} diff --git a/packages/plugins/@nocobase/plugin-oidc/src/locale/ko_KR.json b/packages/plugins/@nocobase/plugin-oidc/src/locale/ko_KR.json deleted file mode 100644 index ab7840e2f4..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/locale/ko_KR.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "Enable": "활성화", - "Actions": "작업", - "Delete": "삭제", - "Edit": "편집", - "Copied": "복사됨", - "Field Map": "필드 매핑", - "id_token signed response algorithm": "id_token 서명 응답 알고리즘", - "Use this field to bind the user": "이 필드를 사용하여 사용자를 바인딩합니다", - "Sign up automatically when the user does not exist": "사용자가 존재하지 않을 때 자동으로 가입", - "Username must be 2-16 characters in length (excluding @.<>\"'/)": "사용자 이름은 2-16 자여야합니다 (@.<>\"'/ 제외)", - "User not found": "사용자를 찾을 수 없음", - "Basic configuration": "기본 설정", - "Field mapping": "필드 매핑", - "Advanced configuration": "고급 설정", - "Usage": "사용 방법", - "Redirect URL": "리디렉션 URL", - "Check if NocoBase is running on HTTP protocol": "NocoBase가 HTTP 프로토콜에서 실행 중인지 확인", - "The port number of the NocoBase service if it is not 80 or 443": "NocoBase 서비스의 포트 번호, 기본값은 443/80", - "Pass parameters in the authorization code grant exchange": "권한 부여 코드 교환 중에 매개 변수를 전달", - "Method to call the user info endpoint": "사용자 정보 엔드포인트를 호출하는 방법", - "Where to put the access token when calling the user info endpoint": "사용자 정보 엔드포인트를 호출할 때 access_token을 어디에 두어야 하는지", - "Header": "헤더 (기본값)", - "Body (Use with POST method)": "바디 (POST 방식과 함께 사용)", - "Query parameters (Use with GET method)": "쿼리 매개 변수 (GET 방식과 함께 사용)", - "Parameter name": "매개 변수 이름", - "The state token helps prevent CSRF attacks. It's recommended to leave it blank for automatic random generation.": "상태 토큰은 CSRF 공격을 방지하는 데 도움이 됩니다. 자동으로 무작위로 생성하려면 비워 두는 것이 좋습니다." - } diff --git a/packages/plugins/@nocobase/plugin-oidc/src/locale/pt-BR.json b/packages/plugins/@nocobase/plugin-oidc/src/locale/pt-BR.json deleted file mode 100644 index 533f645e46..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/locale/pt-BR.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "Enable": "Habilitar", - "Issuer": "Emissor", - "OIDC manager": "Gerenciador OIDC", - "OIDC Providers": "Provedores OIDC", - "Provider name": "Nome do provedor", - "Client id": "ID do cliente", - "Client secret": "Segredo do cliente", - "Openid configuration": "Configuração OpenID", - "Authorization endpoint": "Endpoint de autorização", - "Access token endpoint": "Endpoint de token de acesso", - "JWKS endpoint": "Endpoint JWKS", - "Userinfo endpoint": "Endpoint de informações do usuário", - "Redirect url": "URL de redirecionamento", - "Logout endpoint": "Endpoint de logout", - "Id token sign alg": "Algoritmo de assinatura do token de ID", - "Add provider": "Adicionar", - "Edit provider": "Editar", - "Delete provider": "Excluir", - "Sign in button name, which will be displayed on the sign in page": "Nome do botão de login, que será exibido na página de login" -} diff --git a/packages/plugins/@nocobase/plugin-oidc/src/locale/zh-CN.json b/packages/plugins/@nocobase/plugin-oidc/src/locale/zh-CN.json deleted file mode 100644 index ba528657db..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/locale/zh-CN.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "Enable": "启用", - "Actions": "操作", - "Delete": "删除", - "Edit": "编辑", - "Copied": "已复制", - "Field Map": "字段映射", - "id_token signed response algorithm": "id_token签名算法", - "Use this field to bind the user": "使用此字段绑定用户", - "Sign up automatically when the user does not exist": "用户不存在时自动注册", - "Username must be 2-16 characters in length (excluding @.<>\"'/)": "用户名必须为2-16个字符并且不包含@.<>\"'/)", - "User not found": "用户不存在", - "Basic configuration": "基础配置", - "Field mapping": "字段映射", - "Advanced configuration": "高级配置", - "Usage": "使用", - "Redirect URL": "回调 URL", - "Check if NocoBase is running on HTTP protocol": "NocoBase 应用为HTTP协议时勾选", - "The port number of the NocoBase service if it is not 80 or 443": "NocoBase 应用端口,默认 443/80", - "Pass parameters in the authorization code grant exchange": "使用 code 交换 token 时需要传递的参数", - "Method to call the user info endpoint": "访问获取用户信息的 API 的 HTTP 方法", - "Where to put the access token when calling the user info endpoint": "访问获取用户信息的 API 时 access_token 的传递方式", - "Header": "请求头 (Header, 默认)", - "Body (Use with POST method)": "请求体(Body, 配合 POST 方法使用)", - "Query parameters (Use with GET method)": "请求 URL 参数(Query, 配合 GET 方法使用)", - "Parameter name": "参数名", - "The state token helps prevent CSRF attacks. It's recommended to leave it blank for automatic random generation.": "state token 用于防止 CSRF 攻击,建议留空使用自动生成的随机值。" -} diff --git a/packages/plugins/@nocobase/plugin-oidc/src/server/__tests__/oidc.test.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/__tests__/oidc.test.ts deleted file mode 100644 index 92a0a404ce..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/server/__tests__/oidc.test.ts +++ /dev/null @@ -1,283 +0,0 @@ -import { Database } from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; -import { vi } from 'vitest'; -import { authType } from '../../constants'; -import { OIDCAuth } from '../oidc-auth'; -import { AppSupervisor } from '@nocobase/server'; - -describe('oidc', () => { - let app: MockServer; - let db: Database; - let agent; - let authenticator; - - beforeAll(async () => { - app = await createMockServer({ - plugins: ['users', 'auth', 'oidc'], - }); - db = app.db; - agent = app.agent(); - - const authenticatorRepo = db.getRepository('authenticators'); - authenticator = await authenticatorRepo.create({ - values: { - name: 'oidc-auth', - authType: authType, - enabled: 1, - options: { - oidc: { - issuer: '', - clientId: '', - clientSecret: '', - }, - }, - }, - }); - }); - - afterAll(async () => { - await app.destroy(); - }); - - afterEach(async () => { - vi.restoreAllMocks(); - await db.getRepository('users').destroy({ - truncate: true, - }); - }); - - it('should get auth url', async () => { - agent = app.agent(); - vi.spyOn(OIDCAuth.prototype, 'createOIDCClient').mockResolvedValue({ - authorizationUrl: ({ state }) => state, - } as any); - const res = await agent.set('X-Authenticator', 'oidc-auth').resource('oidc').getAuthUrl(); - expect(res.body.data).toBeDefined(); - const search = new URLSearchParams(decodeURIComponent(res.body.data)); - expect(search.get('token')).toBeDefined(); - expect(search.get('name')).toBe('oidc-auth'); - expect(res.headers['set-cookie']).toBeDefined(); - const token = res.headers['set-cookie'][0].split(';')[0].split('=')[1]; - expect(token).toBe(search.get('token')); - }); - - it('should not sign in without auto signup', async () => { - await authenticator.update({ - options: { - public: { - autoSignup: false, - }, - }, - }); - agent = app.agent(); - vi.spyOn(OIDCAuth.prototype, 'createOIDCClient').mockResolvedValue({ - callback: (uri, { code }) => ({ - access_token: 'access_token', - }), - userinfo: () => ({ - sub: 'user1', - }), - } as any); - - const res = await agent - .set('X-Authenticator', 'oidc-auth') - .set('Cookie', ['nocobase_oidc=token']) - .get('/auth:signIn?state=token%3Dtoken&name=oidc-auth'); - - expect(res.statusCode).toBe(401); - }); - - it('should sign in with auto signup', async () => { - await authenticator.update({ - options: { - public: { - autoSignup: true, - }, - }, - }); - agent = app.agent(); - vi.spyOn(OIDCAuth.prototype, 'createOIDCClient').mockResolvedValue({ - callback: (uri, { code }) => ({ - access_token: 'access_token', - }), - userinfo: () => ({ - sub: 'user1', - }), - } as any); - - const res = await agent - .set('X-Authenticator', 'oidc-auth') - .set('Cookie', ['nocobase_oidc=token']) - .get('/auth:signIn?state=token%3Dtoken&name=oidc-auth'); - expect(res.statusCode).toBe(200); - expect(res.body.data.user).toBeDefined(); - expect(res.body.data.user.nickname).toBe('user1'); - }); - - it('should sign in with existed email', async () => { - await authenticator.update({ - options: { - oidc: { - userBindField: 'email', - }, - public: { - autoSignup: false, - }, - }, - }); - const user = await db.getRepository('users').create({ - values: { - nickname: 'has-email', - email: 'test@nocobase.com', - }, - }); - agent = app.agent(); - vi.spyOn(OIDCAuth.prototype, 'createOIDCClient').mockResolvedValue({ - callback: (uri, { code }) => ({ - access_token: 'access_token', - }), - userinfo: () => ({ - sub: 'user1', - email: 'test@nocobase.com', - }), - } as any); - - const res = await agent - .set('X-Authenticator', 'oidc-auth') - .set('Cookie', ['nocobase_oidc=token']) - .get('/auth:signIn?state=token%3Dtoken&name=oidc-auth'); - - expect(res.body.data.user).toBeDefined(); - expect(res.body.data.user.id).toBe(user.id); - }); - - it('should sign in with existed username', async () => { - await authenticator.update({ - options: { - oidc: { - userBindField: 'username', - }, - public: { - autoSignup: false, - }, - }, - }); - - const user = await db.getRepository('users').create({ - values: { - nickname: 'has-username', - username: 'username', - }, - }); - agent = app.agent(); - vi.spyOn(OIDCAuth.prototype, 'createOIDCClient').mockResolvedValue({ - callback: (uri, { code }) => ({ - access_token: 'access_token', - }), - userinfo: () => ({ - username: 'username', - sub: 'username', - }), - } as any); - - const res = await agent - .set('X-Authenticator', 'oidc-auth') - .set('Cookie', ['nocobase_oidc=token']) - .get('/auth:signIn?state=token%3Dtoken&name=oidc-auth'); - - expect(res.body.data.user).toBeDefined(); - expect(res.body.data.user.id).toBe(user.id); - }); - - it('oidc:redirect', async () => { - vi.spyOn(OIDCAuth.prototype, 'signIn').mockResolvedValue({ - user: {} as any, - token: 'test-token', - }); - const res = await agent.get(`/oidc:redirect?state=${encodeURIComponent('name=oidc-auth&app=main')}`); - expect(res.statusCode).toBe(302); - expect(res.headers.location).toBe(`/admin?authenticator=oidc-auth&token=test-token`); - }); - - it('oidc:redirect, sub app', async () => { - vi.spyOn(OIDCAuth.prototype, 'signIn').mockResolvedValue({ - user: {} as any, - token: 'test-token', - }); - vi.spyOn(AppSupervisor, 'getInstance').mockReturnValue({ - runningMode: 'multiple', - } as any); - const res = await agent.get(`/oidc:redirect?state=${encodeURIComponent('name=oidc-auth&app=sub')}`); - expect(res.statusCode).toBe(302); - expect(res.headers.location).toBe(`/apps/sub/admin?authenticator=oidc-auth&token=test-token`); - }); - - it('oidc:redirect, error', async () => { - vi.spyOn(OIDCAuth.prototype, 'signIn').mockRejectedValue(new Error('test error')); - const res = await agent.get(`/oidc:redirect?state=${encodeURIComponent('name=oidc-auth&app=main')}`); - expect(res.statusCode).toBe(302); - expect(res.headers.location).toBe(`/signin?redirect=/admin&authenticator=oidc-auth&error=test%20error`); - }); -}); - -test('field mapping', () => { - const auth = new OIDCAuth({ - authenticator: null, - ctx: { - db: { - getCollection: () => ({}), - } as any, - } as any, - options: { - oidc: { - fieldMap: [ - { - source: 'username', - target: 'nickname', - }, - ], - }, - }, - }); - const userInfo = auth.mapField({ - sub: 1, - username: 'user1', - }); - expect(userInfo).toEqual({ - sub: 1, - username: 'user1', - nickname: 'user1', - }); -}); - -test('getExchangeBody', () => { - const auth = new OIDCAuth({ - ctx: { - db: { - getCollection: () => ({}), - }, - }, - options: { - oidc: { - clientId: 'test_client_id', - clientSecret: 'test_client_secret', - exchangeBodyKeys: [ - { - paramName: 'client_id', - optionsKey: 'clientId', - enabled: true, - }, - { - paramName: 'client_secret', - optionsKey: 'clientSecret', - enabled: false, - }, - ], - }, - }, - } as any); - const body = auth.getExchangeBody(); - expect(body).toMatchObject({ - client_id: 'test_client_id', - }); -}); diff --git a/packages/plugins/@nocobase/plugin-oidc/src/server/actions/getAuthUrl.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/actions/getAuthUrl.ts deleted file mode 100644 index c96f6e25c2..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/server/actions/getAuthUrl.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Context, Next } from '@nocobase/actions'; -import { OIDCAuth } from '../oidc-auth'; -import { nanoid } from 'nanoid'; -import { cookieName } from '../../constants'; - -export const getAuthUrl = async (ctx: Context, next: Next) => { - const { redirect = '' } = ctx.action.params.values || {}; - const app = ctx.app.name; - const auth = ctx.auth as OIDCAuth; - const client = await auth.createOIDCClient(); - const { scope, stateToken } = auth.getOptions(); - const token = stateToken || nanoid(15); - ctx.cookies.set(cookieName, token, { - httpOnly: true, - domain: ctx.hostname, - }); - ctx.body = client.authorizationUrl({ - response_type: 'code', - scope: scope || 'openid email profile', - redirect_uri: `${auth.getRedirectUri()}`, - state: encodeURIComponent(`token=${token}&name=${ctx.headers['x-authenticator']}&app=${app}&redirect=${redirect}`), - }); - - return next(); -}; diff --git a/packages/plugins/@nocobase/plugin-oidc/src/server/actions/redirect.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/actions/redirect.ts deleted file mode 100644 index 40eb787671..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/server/actions/redirect.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Context, Next } from '@nocobase/actions'; -import { AppSupervisor } from '@nocobase/server'; -import { OIDCAuth } from '../oidc-auth'; - -export const redirect = async (ctx: Context, next: Next) => { - const { - params: { state }, - } = ctx.action; - const search = new URLSearchParams(decodeURIComponent(state)); - const authenticator = search.get('name'); - const appName = search.get('app'); - const redirect = search.get('redirect') || '/admin'; - let prefix = process.env.APP_PUBLIC_PATH || ''; - if (appName && appName !== 'main') { - const appSupervisor = AppSupervisor.getInstance(); - if (appSupervisor?.runningMode !== 'single') { - prefix += `apps/${appName}`; - } - } - const auth = (await ctx.app.authManager.get(authenticator, ctx)) as OIDCAuth; - if (prefix.endsWith('/')) { - prefix = prefix.slice(0, -1); - } - try { - const { token } = await auth.signIn(); - ctx.redirect(`${prefix}${redirect}?authenticator=${authenticator}&token=${token}`); - } catch (error) { - ctx.logger.error('OIDC auth error', { error }); - ctx.redirect(`${prefix}/signin?redirect=${redirect}&authenticator=${authenticator}&error=${error.message}`); - } - await next(); -}; diff --git a/packages/plugins/@nocobase/plugin-oidc/src/server/index.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/index.ts deleted file mode 100644 index b68aea57f9..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/server/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './plugin'; diff --git a/packages/plugins/@nocobase/plugin-oidc/src/server/migrations/20231007124508-update-autosignup.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/migrations/20231007124508-update-autosignup.ts deleted file mode 100644 index 2590ff746b..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/server/migrations/20231007124508-update-autosignup.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Migration } from '@nocobase/server'; -import { authType } from '../../constants'; - -export default class UpdateAutoSignupMigration extends Migration { - appVersion = '<0.14.0-alpha.8'; - async up() { - const result = await this.app.version.satisfies('<=0.14.0-alpha.8'); - - if (!result) { - return; - } - - const r = this.db.getRepository('authenticators'); - const items = await r.find({ - filter: { - authType, - }, - }); - - await this.db.sequelize.transaction(async (transaction) => { - for (const item of items) { - let options = item.options; - options = { - public: { autoSignup: true, ...options.public }, - oidc: { userBindField: 'email', ...options.oidc }, - }; - item.set('options', options); - await item.save({ transaction }); - } - }); - } - - async down() {} -} diff --git a/packages/plugins/@nocobase/plugin-oidc/src/server/oidc-auth.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/oidc-auth.ts deleted file mode 100644 index 021e5a591e..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/server/oidc-auth.ts +++ /dev/null @@ -1,138 +0,0 @@ -import { AuthConfig, BaseAuth } from '@nocobase/auth'; -import { AuthModel } from '@nocobase/plugin-auth'; -import { Issuer } from 'openid-client'; -import { cookieName } from '../constants'; - -export class OIDCAuth extends BaseAuth { - constructor(config: AuthConfig) { - const { ctx } = config; - super({ - ...config, - userCollection: ctx.db.getCollection('users'), - }); - } - - getRedirectUri() { - const ctx = this.ctx; - const { http, port } = this.getOptions(); - const protocol = http ? 'http' : 'https'; - const host = port ? `${ctx.hostname}${port ? `:${port}` : ''}` : ctx.host; - return `${protocol}://${host}${process.env.API_BASE_PATH}oidc:redirect`; - } - - getOptions() { - return this.options?.oidc || {}; - } - - getExchangeBody() { - const options = this.getOptions(); - const { exchangeBodyKeys } = options; - if (!exchangeBodyKeys) { - return {}; - } - const body = {}; - exchangeBodyKeys - .filter((item: { enabled: boolean }) => item.enabled) - .forEach((item: { paramName: string; optionsKey: string }) => { - const name = item.paramName || item.optionsKey; - body[name] = options[item.optionsKey]; - }); - return body; - } - - mapField(userInfo: { [source: string]: any }) { - const { fieldMap } = this.getOptions(); - if (!fieldMap) { - return userInfo; - } - fieldMap.forEach((item: { source: string; target: string }) => { - const { source, target } = item; - if (userInfo[source]) { - userInfo[target] = userInfo[source]; - } - }); - return userInfo; - } - - async createOIDCClient() { - const { issuer, clientId, clientSecret, idTokenSignedResponseAlg } = this.getOptions(); - const oidc = await Issuer.discover(issuer); - return new oidc.Client({ - client_id: clientId, - client_secret: clientSecret, - id_token_signed_response_alg: idTokenSignedResponseAlg || 'RS256', - }); - } - - async validate() { - const ctx = this.ctx; - const { params: values } = ctx.action; - const { userInfoMethod = 'GET', accessTokenVia = 'header', stateToken } = this.getOptions(); - const token = stateToken || ctx.cookies.get(cookieName); - const search = new URLSearchParams(decodeURIComponent(values.state)); - if (search.get('token') !== token) { - ctx.logger.error('nocobase_oidc state mismatch', { method: 'validate' }); - return null; - } - const client = await this.createOIDCClient(); - const tokens = await client.callback( - this.getRedirectUri(), - { - code: values.code, - iss: values.iss, - }, - {}, - { exchangeBody: this.getExchangeBody() }, - ); - const userInfo: { [key: string]: any } = await client.userinfo(tokens, { - method: userInfoMethod, - via: accessTokenVia !== 'query' ? accessTokenVia : 'header', - params: - accessTokenVia === 'query' - ? { - access_token: tokens.access_token, - } - : {}, - }); - const mappedUserInfo = this.mapField(userInfo); - const { nickname, username, name, sub, email, phone } = mappedUserInfo; - const authenticator = this.authenticator as AuthModel; - let user = await authenticator.findUser(sub); - if (user) { - return user; - } - // Bind existed user - const { userBindField = 'email' } = this.getOptions(); - if (userBindField === 'email' && email) { - user = await this.userRepository.findOne({ - filter: { email }, - }); - } else if (userBindField === 'username' && username) { - user = await this.userRepository.findOne({ - filter: { username }, - }); - } - if (user) { - await authenticator.addUser(user.id, { - through: { - uuid: sub, - }, - }); - return user; - } - // Create new user - const { autoSignup } = this.options?.public || {}; - if (!autoSignup) { - throw new Error('User not found'); - } - if (username && !this.validateUsername(username)) { - throw new Error('Username must be 2-16 characters in length (excluding @.<>"\'/)'); - } - return await authenticator.newUser(sub, { - username: username ?? null, - nickname: nickname || name || username || sub, - email: email ?? null, - phone: phone ?? null, - }); - } -} diff --git a/packages/plugins/@nocobase/plugin-oidc/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/plugin.ts deleted file mode 100644 index 95d0b7c2ca..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/server/plugin.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { Gateway, InstallOptions, Plugin } from '@nocobase/server'; -import { getAuthUrl } from './actions/getAuthUrl'; -import { redirect } from './actions/redirect'; -import { authType } from '../constants'; -import { OIDCAuth } from './oidc-auth'; -import { resolve } from 'path'; - -export class PluginOIDCServer extends Plugin { - afterAdd() {} - - beforeLoad() {} - - async load() { - this.db.addMigrations({ - namespace: 'auth', - directory: resolve(__dirname, 'migrations'), - context: { - plugin: this, - }, - }); - - this.app.authManager.registerTypes(authType, { - auth: OIDCAuth, - }); - - // 注册接口 - this.app.resource({ - name: 'oidc', - actions: { - getAuthUrl, - redirect, - }, - }); - - this.app.acl.allow('oidc', '*', 'public'); - - /* istanbul ignore next -- @preserve */ - Gateway.getInstance().addAppSelectorMiddleware(async (ctx, next) => { - const { req } = ctx; - const url = new URL(req.url, `http://${req.headers.host}`); - const params = url.searchParams; - const state = params.get('state'); - if (!state) { - return next(); - } - const search = new URLSearchParams(state); - const appName = search.get('app'); - if (appName) { - ctx.resolvedAppName = appName; - } - await next(); - }); - } - - async install(options?: InstallOptions) {} - - async afterEnable() {} - - async afterDisable() {} - - async remove() {} -} - -export default PluginOIDCServer; diff --git a/packages/plugins/@nocobase/plugin-oidc/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-oidc/src/swagger/index.ts deleted file mode 100644 index 163cf4db99..0000000000 --- a/packages/plugins/@nocobase/plugin-oidc/src/swagger/index.ts +++ /dev/null @@ -1,157 +0,0 @@ -const user = { - type: 'object', - description: '用户', - properties: { - id: { - type: 'integer', - description: 'ID', - }, - nickname: { - type: 'string', - description: '昵称', - }, - email: { - type: 'string', - description: '邮箱', - }, - phone: { - type: 'string', - description: '手机号', - }, - appLang: { - type: 'string', - description: '用户使用语言', - }, - systemSettings: { - type: 'object', - description: '系统设置', - properties: { - theme: { - type: 'string', - description: '用户使用主题', - }, - }, - }, - createdAt: { - type: 'string', - format: 'date-time', - description: '创建时间', - }, - updatedAt: { - type: 'string', - format: 'date-time', - description: '更新时间', - }, - createdById: { - type: 'integer', - description: '创建人', - }, - updatedById: { - type: 'integer', - description: '更新人', - }, - }, -}; - -export default { - info: { - title: 'NocoBase API - OIDC plugin', - }, - paths: { - '/oidc:getAuthUrl': { - security: [], - get: { - description: 'Get OIDC authorization url', - tags: ['OIDC'], - parameters: [ - { - name: 'X-Authenticator', - description: '登录方式标识', - in: 'header', - schema: { - type: 'string', - }, - required: true, - }, - ], - responses: { - 200: { - description: 'ok', - content: { - 'application/json': { - schema: { - type: 'string', - }, - }, - }, - }, - }, - }, - }, - '/auth:signIn': { - security: [], - post: { - description: 'OIDC sign in', - tags: ['OIDC'], - parameters: [ - { - name: 'X-Authenticator', - description: '登录方式标识', - in: 'header', - schema: { - type: 'string', - }, - required: true, - }, - { - name: 'nocobase_oidc', - description: 'state校验值', - in: 'cookie', - schema: { - type: 'string', - }, - required: true, - }, - ], - requestBody: { - content: { - 'application/json': { - schema: { - type: 'object', - properties: { - code: { - type: 'string', - }, - state: { - type: 'string', - }, - iss: { - type: 'string', - }, - }, - }, - }, - }, - }, - responses: { - 200: { - description: 'ok', - content: { - 'application/json': { - schema: { - type: 'object', - properties: { - token: { - type: 'string', - }, - user, - }, - }, - }, - }, - }, - }, - }, - }, - }, -}; diff --git a/packages/plugins/@nocobase/plugin-saml/.npmignore b/packages/plugins/@nocobase/plugin-saml/.npmignore deleted file mode 100644 index c593fe9df7..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -/node_modules -/src \ No newline at end of file diff --git a/packages/plugins/@nocobase/plugin-saml/README.md b/packages/plugins/@nocobase/plugin-saml/README.md deleted file mode 100644 index 3ec0e4bb71..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# SAML - -English | [中文](./README.zh-CN.md) - -## 安装激活 - -```bash -yarn pm enable saml -``` - -## 使用方法 diff --git a/packages/plugins/@nocobase/plugin-saml/README.zh-CN.md b/packages/plugins/@nocobase/plugin-saml/README.zh-CN.md deleted file mode 100644 index 1fa35a61e0..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/README.zh-CN.md +++ /dev/null @@ -1,55 +0,0 @@ -# SAML - -提供SAML2.0 SSO登录功能。 - -## 依赖 - -- `@nocobase/auth` 认证插件,提供认证相关功能,表、模型、函数复用等。 - -## 使用方法 - -> 以Google WorkSpace IdP为例 - -### 将Google设置为IdP - -[Google管理控制台](https://admin.google.com/) - 应用 - Web应用和移动应用 - - - - -进行应用设置之后,复制**SSO网址**、**实体ID**和**证书**。 - - - -### 在Nocobase上新增认证器 - -插件设置 - 认证 - 新增 - SAML - - - -将刚才复制的信息依次进行填写 -- SSO URL: SSO网址 -- Public Certificate: 证书 -- idP Issuer: 实体id -- http: 如果是本地http测试可以勾选 - -之后复制`Usage`中的`SP Issuer/EntityID`和`ACS URL`. - -### 在Google上填写SP信息 - -回到Google控制台,在**服务提供商详细信息**页面,输入刚才复制的ACS网址和实体ID,并勾选**已签署响应**。 - -在**属性映射**位置,添加映射,映射对应属性,Nocobase可供映射的字段有: - -- email(必填) -- phone (仅对scope支持phone的平台生效,如阿里云) -- nickname -- username -- firstName -- lastName - -用户名使用规则优先级: `nickname` > `username` > `firstName lastName` > `nameID` - -`nameID`为SAML协议携带,无需映射,将作为用户唯一标识保存。 - -在有email或nameID为email的情况下,登录时将尝试匹配已有用户,否则创建新用户。 \ No newline at end of file diff --git a/packages/plugins/@nocobase/plugin-saml/client.d.ts b/packages/plugins/@nocobase/plugin-saml/client.d.ts deleted file mode 100644 index 6c459cbac4..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/client.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './dist/client'; -export { default } from './dist/client'; diff --git a/packages/plugins/@nocobase/plugin-saml/client.js b/packages/plugins/@nocobase/plugin-saml/client.js deleted file mode 100644 index b6e3be70e6..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/client.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/client/index.js'); diff --git a/packages/plugins/@nocobase/plugin-saml/package.json b/packages/plugins/@nocobase/plugin-saml/package.json deleted file mode 100644 index e8816dec7d..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@nocobase/plugin-saml", - "displayName": "Auth: SAML 2.0", - "displayName.zh-CN": "认证:SAML 2.0", - "description": "SAML 2.0 authentication.", - "description.zh-CN": "通过 SAML 2.0 协议认证身份。", - "version": "0.21.0-alpha.16", - "license": "AGPL-3.0", - "main": "./dist/server/index.js", - "homepage": "https://docs.nocobase.com/handbook/auth-saml", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/auth-saml", - "devDependencies": { - "@ant-design/icons": "5.x", - "@formily/react": "2.x", - "@node-saml/node-saml": "^4.0.2", - "antd": "5.x", - "react": "18.x", - "react-i18next": "^11.15.1" - }, - "peerDependencies": { - "@nocobase/actions": "0.x", - "@nocobase/auth": "0.x", - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/plugin-auth": ">=0.17.0-alpha.7", - "@nocobase/sdk": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "keywords": [ - "Authentication" - ] -} diff --git a/packages/plugins/@nocobase/plugin-saml/server.d.ts b/packages/plugins/@nocobase/plugin-saml/server.d.ts deleted file mode 100644 index c41081ddc6..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/server.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './dist/server'; -export { default } from './dist/server'; diff --git a/packages/plugins/@nocobase/plugin-saml/server.js b/packages/plugins/@nocobase/plugin-saml/server.js deleted file mode 100644 index 972842039a..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/server.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/server/index.js'); diff --git a/packages/plugins/@nocobase/plugin-saml/src/client/Options.tsx b/packages/plugins/@nocobase/plugin-saml/src/client/Options.tsx deleted file mode 100644 index 62a75786fa..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/client/Options.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import { CopyOutlined } from '@ant-design/icons'; -import { observer, useForm } from '@formily/react'; -import { FormItem, Input, SchemaComponent, useApp, useRecord } from '@nocobase/client'; -import { getSubAppName } from '@nocobase/sdk'; -import { Card, message } from 'antd'; -import React, { useMemo } from 'react'; -import { lang, useSamlTranslation } from './locale'; - -const schema = { - type: 'object', - properties: { - saml: { - type: 'object', - properties: { - ssoUrl: { - title: '{{t("SSO URL")}}', - 'x-component': 'Input', - 'x-decorator': 'FormItem', - required: true, - }, - certificate: { - title: '{{t("Public Certificate")}}', - 'x-component': 'Input.TextArea', - 'x-decorator': 'FormItem', - required: true, - }, - idpIssuer: { - title: 'idP Issuer', - 'x-component': 'Input', - 'x-decorator': 'FormItem', - }, - http: { - title: '{{t("http")}}', - 'x-component': 'Checkbox', - 'x-decorator': 'FormItem', - }, - userBindField: { - type: 'string', - title: '{{t("Use this field to bind the user")}}', - 'x-component': 'Select', - 'x-decorator': 'FormItem', - default: 'email', - enum: [ - { label: lang('Email'), value: 'email' }, - { label: lang('Username'), value: 'username' }, - ], - required: true, - }, - }, - }, - public: { - type: 'object', - properties: { - autoSignup: { - 'x-decorator': 'FormItem', - type: 'boolean', - title: '{{t("Sign up automatically when the user does not exist")}}', - 'x-component': 'Checkbox', - default: true, - }, - }, - }, - usage: { - type: 'void', - 'x-component': 'Usage', - }, - }, -}; - -const Usage = observer( - () => { - const form = useForm(); - const record = useRecord(); - const { t } = useSamlTranslation(); - - const app = useApp(); - const name = form.values.name ?? record.name; - - const url = useMemo(() => { - const appName = getSubAppName(app.getPublicPath()) || 'main'; - return app.getApiUrl(`saml:redirect?authenticator=${name}&__appName=${appName}`); - }, [app, name]); - - const copy = (text: string) => { - navigator.clipboard.writeText(text); - message.success(t('Copied')); - }; - - return ( - - - copy(name)} />} /> - - - copy(url)} />} /> - - - ); - }, - { displayName: 'Usage' }, -); - -export const Options = () => { - const { t } = useSamlTranslation(); - return ; -}; diff --git a/packages/plugins/@nocobase/plugin-saml/src/client/SAMLButton.tsx b/packages/plugins/@nocobase/plugin-saml/src/client/SAMLButton.tsx deleted file mode 100644 index ad88a2e6ab..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/client/SAMLButton.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { LoginOutlined } from '@ant-design/icons'; -import { css, useAPIClient } from '@nocobase/client'; -import { Button, Space, message } from 'antd'; -import React, { useEffect } from 'react'; -import { useSamlTranslation } from './locale'; -import { useLocation } from 'react-router-dom'; -import { Authenticator } from '@nocobase/plugin-auth/client'; - -export const SAMLButton = ({ authenticator }: { authenticator: Authenticator }) => { - const { t } = useSamlTranslation(); - const api = useAPIClient(); - const location = useLocation(); - const params = new URLSearchParams(location.search); - const redirect = params.get('redirect'); - - const login = async () => { - const response = await api.request({ - method: 'post', - url: 'saml:getAuthUrl', - headers: { - 'X-Authenticator': authenticator.name, - }, - data: { - redirect, - }, - }); - - const authUrl = response?.data?.data; - window.location.replace(authUrl); - }; - - useEffect(() => { - const name = params.get('authenticator'); - const error = params.get('error'); - if (name !== authenticator.name) { - return; - } - if (error) { - message.error(error); - return; - } - }); - - return ( - - - - ); -}; diff --git a/packages/plugins/@nocobase/plugin-saml/src/client/index.tsx b/packages/plugins/@nocobase/plugin-saml/src/client/index.tsx deleted file mode 100644 index 71f4c07efb..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/client/index.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { Plugin } from '@nocobase/client'; -import AuthPlugin from '@nocobase/plugin-auth/client'; -import { authType } from '../constants'; -import { SAMLButton } from './SAMLButton'; -import { Options } from './Options'; - -export class PluginSAMLClient extends Plugin { - async load() { - const auth = this.app.pm.get(AuthPlugin); - auth.registerType(authType, { - components: { - SignInButton: SAMLButton, - AdminSettingsForm: Options, - }, - }); - } -} - -export default PluginSAMLClient; diff --git a/packages/plugins/@nocobase/plugin-saml/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-saml/src/client/locale/index.ts deleted file mode 100644 index 5b802647bd..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/client/locale/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { i18n } from '@nocobase/client'; -import { useTranslation } from 'react-i18next'; - -export const NAMESPACE = 'saml'; - -// i18n.addResources('zh-CN', NAMESPACE, zhCN); -// i18n.addResources('en-US', NAMESPACE, enUS); -// i18n.addResources('ja-JP', NAMESPACE, jaJP); -// i18n.addResources('ru-RU', NAMESPACE, ruRU); -// i18n.addResources('tr-TR', NAMESPACE, trTR); - -export function lang(key: string) { - return i18n.t(key, { ns: NAMESPACE }); -} - -export function useSamlTranslation() { - return useTranslation(NAMESPACE); -} diff --git a/packages/plugins/@nocobase/plugin-saml/src/client/schemas/saml.ts b/packages/plugins/@nocobase/plugin-saml/src/client/schemas/saml.ts deleted file mode 100644 index a9594bf485..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/client/schemas/saml.ts +++ /dev/null @@ -1,356 +0,0 @@ -import { ISchema } from '@formily/react'; -import { useActionContext, useRequest } from '@nocobase/client'; - -const collection = { - name: 'samlProviders', - fields: [ - { - type: 'string', - name: 'title', - interface: 'input', - uiSchema: { - title: '{{t("Title")}}', - type: 'string', - 'x-component': 'Input', - required: true, - } as ISchema, - }, - { - type: 'string', - name: 'clientId', - interface: 'input', - uiSchema: { - title: '{{t("Client id")}}', - type: 'string', - 'x-component': 'Input', - required: true, - } as ISchema, - }, - { - type: 'string', - name: 'issuer', - interface: 'input', - uiSchema: { - title: '{{t("Entity id or issuer")}}', - type: 'string', - 'x-component': 'Input', - required: true, - } as ISchema, - }, - { - type: 'string', - name: 'loginUrl', - interface: 'input', - uiSchema: { - title: '{{t("Login Url")}}', - type: 'string', - 'x-component': 'Input', - required: true, - } as ISchema, - }, - { - type: 'string', - name: 'certificate', - interface: 'input', - uiSchema: { - title: '{{t("Public cert")}}', - type: 'string', - 'x-component': 'Input.TextArea', - required: true, - } as ISchema, - }, - { - type: 'string', - name: 'certificate', - interface: 'input', - uiSchema: { - title: '{{t("Public cert")}}', - type: 'string', - 'x-component': 'Input.TextArea', - required: true, - } as ISchema, - }, - { - type: 'string', - name: 'redirectUrl', - interface: 'input', - uiSchema: { - title: '{{t("Redirect url")}}', - type: 'string', - 'x-component': 'RedirectURLInput', - } as ISchema, - }, - { - type: 'boolean', - name: 'enabled', - interface: 'boolean', - uiSchema: { - title: '{{t("Enable")}}', - type: 'boolean', - 'x-component': 'Checkbox', - } as ISchema, - }, - ], -}; - -export const formProperties = { - title: { - 'x-component': 'CollectionField', - 'x-decorator': 'FormItem', - description: '{{t("Sign in button name, which will be displayed on the sign in page")}}', - }, - clientId: { - 'x-component': 'CollectionField', - 'x-decorator': 'FormItem', - }, - issuer: { - 'x-component': 'CollectionField', - 'x-decorator': 'FormItem', - }, - loginUrl: { - 'x-component': 'CollectionField', - 'x-decorator': 'FormItem', - }, - certificate: { - 'x-component': 'CollectionField', - 'x-decorator': 'FormItem', - }, - redirectUrl: { - 'x-component': 'CollectionField', - 'x-decorator': 'FormItem', - }, - enabled: { - 'x-component': 'CollectionField', - 'x-decorator': 'FormItem', - title: '', - 'x-content': '{{t("Enable")}}', - }, -}; - -export const samlSchema: ISchema = { - type: 'object', - properties: { - block1: { - type: 'void', - 'x-decorator': 'ResourceActionProvider', - 'x-decorator-props': { - collection, - resourceName: 'samlProviders', - request: { - resource: 'samlProviders', - action: 'list', - params: { - pageSize: 50, - sort: ['id'], - appends: [], - }, - }, - }, - 'x-component': 'CollectionProvider_deprecated', - 'x-component-props': { - collection, - }, - properties: { - actions: { - type: 'void', - 'x-component': 'ActionBar', - 'x-component-props': { - style: { - marginBottom: 16, - }, - }, - properties: { - delete: { - type: 'void', - title: '{{ t("Delete") }}', - 'x-component': 'Action', - 'x-component-props': { - useAction: '{{ cm.useBulkDestroyAction }}', - confirm: { - title: "{{t('Delete provider')}}", - content: "{{t('Are you sure you want to delete it?')}}", - }, - }, - }, - create: { - type: 'void', - title: '{{t("Add provider")}}', - 'x-component': 'Action', - 'x-component-props': { - type: 'primary', - }, - properties: { - drawer: { - type: 'void', - 'x-component': 'Action.Drawer', - 'x-decorator': 'Form', - 'x-decorator-props': { - useValues(options) { - const ctx = useActionContext(); - // 初始化数据 - return useRequest( - () => - Promise.resolve({ - data: { - enable: true, - }, - }), - { ...options, refreshDeps: [ctx.visible] }, - ); - }, - }, - title: '{{t("Add provider")}}', - properties: { - ...formProperties, - footer: { - type: 'void', - 'x-component': 'Action.Drawer.Footer', - properties: { - cancel: { - title: '{{t("Cancel")}}', - 'x-component': 'Action', - 'x-component-props': { - useAction: '{{ cm.useCancelAction }}', - }, - }, - submit: { - title: '{{t("Submit")}}', - 'x-component': 'Action', - 'x-component-props': { - type: 'primary', - useAction: '{{ cm.useCreateAction }}', - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - table: { - type: 'void', - 'x-uid': 'input', - 'x-component': 'Table.Void', - 'x-component-props': { - rowKey: 'id', - rowSelection: { - type: 'checkbox', - }, - useDataSource: '{{ cm.useDataSourceFromRAC }}', - }, - properties: { - column1: { - type: 'void', - 'x-decorator': 'Table.Column.Decorator', - 'x-component': 'Table.Column', - properties: { - title: { - type: 'string', - 'x-component': 'CollectionField', - 'x-read-pretty': true, - }, - }, - }, - column2: { - type: 'void', - 'x-decorator': 'Table.Column.Decorator', - 'x-component': 'Table.Column', - properties: { - redirectUrl: { - type: 'string', - 'x-component': 'CollectionField', - 'x-read-pretty': true, - }, - }, - }, - column4: { - type: 'void', - 'x-decorator': 'Table.Column.Decorator', - 'x-component': 'Table.Column', - properties: { - enabled: { - type: 'boolean', - 'x-component': 'CollectionField', - 'x-read-pretty': true, - }, - }, - }, - column5: { - type: 'void', - title: '{{t("Actions")}}', - 'x-component': 'Table.Column', - properties: { - actions: { - type: 'void', - 'x-component': 'Space', - 'x-component-props': { - split: '|', - }, - properties: { - update: { - type: 'void', - title: '{{t("Edit")}}', - 'x-component': 'Action.Link', - 'x-component-props': { - type: 'primary', - }, - properties: { - drawer: { - type: 'void', - 'x-component': 'Action.Drawer', - 'x-decorator': 'Form', - 'x-decorator-props': { - useValues: '{{ cm.useValuesFromRecord }}', - }, - title: '{{t("Edit provider")}}', - properties: { - ...formProperties, - footer: { - type: 'void', - 'x-component': 'Action.Drawer.Footer', - properties: { - cancel: { - title: '{{t("Cancel")}}', - 'x-component': 'Action', - 'x-component-props': { - useAction: '{{ cm.useCancelAction }}', - }, - }, - submit: { - title: '{{t("Submit")}}', - 'x-component': 'Action', - 'x-component-props': { - type: 'primary', - useAction: '{{ cm.useUpdateAction }}', - }, - }, - }, - }, - }, - }, - }, - }, - delete: { - type: 'void', - title: '{{ t("Delete") }}', - 'x-component': 'Action.Link', - 'x-component-props': { - confirm: { - title: "{{t('Delete role')}}", - content: "{{t('Are you sure you want to delete it?')}}", - }, - useAction: '{{cm.useDestroyAction}}', - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, -}; diff --git a/packages/plugins/@nocobase/plugin-saml/src/constants.ts b/packages/plugins/@nocobase/plugin-saml/src/constants.ts deleted file mode 100644 index cf7b0fdb2a..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/constants.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-ignore -import { name } from '../package.json'; - -export const authType = 'SAML'; -export const namespace = name; diff --git a/packages/plugins/@nocobase/plugin-saml/src/locale/en-US.json b/packages/plugins/@nocobase/plugin-saml/src/locale/en-US.json deleted file mode 100644 index 2646be723f..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/locale/en-US.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "Edit": "Edit", - "Delete": "Delete", - "Cancel": "Cancel", - "Submit": "Submit", - "Actions": "Actions", - "Title": "Title", - "Enable": "Enable", - "SAML manager": "SAML manager", - "SAML Providers": "SAML Providers", - "Redirect url": "Redirect url", - "SP entity id": "SP entity id", - "Add provider": "Add", - "Edit provider": "Edit", - "Client id": "Client id", - "Entity id or issuer": "Entity id or issuer", - "Login Url": "Login Url", - "Public cert": "Public cert", - "Delete provider": "Delete", - "Are you sure you want to delete it?": "Are you sure you want to delete it?", - "Sign in button name, which will be displayed on the sign in page": "Sign in button name, which will be displayed on the sign in page", - "Use this field to bind the user": "Use this field to bind the user", - "Sign up automatically when the user does not exist": "Sign up automatically when the user does not exist", - "Username must be 2-16 characters in length (excluding @.<>\"'/)": "Username must be 2-16 characters in length (excluding @.<>\"'/)", - "User not found": "User not found" -} diff --git a/packages/plugins/@nocobase/plugin-saml/src/locale/es-ES.json b/packages/plugins/@nocobase/plugin-saml/src/locale/es-ES.json deleted file mode 100644 index 5ae7b99da1..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/locale/es-ES.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "Edit": "Editar", - "Delete": "Borrar", - "Cancel": "Cancelar", - "Submit": "Enviar", - "Actions": "Acciones", - "Title": "Título", - "Enable": " Activar ", - "SAML manager": "Gestor SAML", - "SAML Providers": "Proveedores SAML", - "Redirect url": "Redirect url", - "SP entity id": "SP entity id", - "Add provider": "Añadir Proveedor", - "Edit provider": "Editar Proveedor", - "Client id": "Id de cliente", - "Entity id or issuer": "Id de entidad o emisor", - "Login Url": "Url de inicio de sesión", - "Public cert": "Certificado público", - "Delete provider": "Borrar Proveedor", - "Are you sure you want to delete it?": "¿Está seguro de que quiere borrarlo?", - "Sign in button name, which will be displayed on the sign in page": "Nombre del botón de inicio de sesión, que se mostrará en la página de inicio de sesión" -} diff --git a/packages/plugins/@nocobase/plugin-saml/src/locale/fr-FR.json b/packages/plugins/@nocobase/plugin-saml/src/locale/fr-FR.json deleted file mode 100644 index ac68754523..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/locale/fr-FR.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "Edit": "Modifier", - "Delete": "Supprimer", - "Cancel": "Annuler", - "Submit": "Envoyer", - "Actions": "Actions", - "Title": "Titre", - "Enable": "Activer", - "SAML manager": "SAML manager", - "SAML Providers": "SAML Providers", - "Redirect url": "Url de redirection", - "SP entity id": "SP entity id", - "Add provider": "Ajouter", - "Edit provider": "Modifier", - "Client id": "Client id", - "Entity id or issuer": "Entity id or issuer", - "Login Url": "Url de connexion", - "Public cert": "Public cert", - "Delete provider": "Supprimer", - "Are you sure you want to delete it?": "Êtes-vous sûr de vouloir le supprimer ?", - "Sign in button name, which will be displayed on the sign in page": "Nom du bouton de connexion, qui sera affiché sur la page de connexion" -} diff --git a/packages/plugins/@nocobase/plugin-saml/src/locale/ko_KR.json b/packages/plugins/@nocobase/plugin-saml/src/locale/ko_KR.json deleted file mode 100644 index 9aa97a594e..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/locale/ko_KR.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "Edit": "편집", - "Delete": "삭제", - "Cancel": "취소", - "Submit": "제출", - "Actions": "동작", - "Title": "이름", - "Enable": "사용", - "Button title": "로그인 버튼 제목", - "SAML manager": "SAML 매니저", - "SAML Providers": "SAML 제공자", - "Redirect url": "리디렉션 URL", - "SP entity id": "애플리케이션 고유 식별자 (SP Entity ID)", - "Add provider": "추가", - "Edit provider": "편집", - "Client id": "클라이언트 ID", - "Entity id or issuer": "IdP 고유 식별자", - "Login Url": "로그인 URL", - "Public cert": "공개 키", - "Delete provider": "삭제", - "Are you sure you want to delete it?": "삭제하시겠습니까?", - "Sign in button name, which will be displayed on the sign-in page": "로그인 페이지에 표시되는 로그인 버튼 이름", - "Copied": "복사됨", - "Usage": "사용", - "Use this field to bind the user": "이 필드를 사용하여 사용자를 바인딩합니다", - "Sign up automatically when the user does not exist": "사용자가 존재하지 않을 때 자동으로 가입", - "Username must be 2-16 characters in length (excluding @.<>\"'/)": "사용자 이름은 2-16 자여야합니다 (@.<>\"'/ 제외)", - "User not found": "사용자를 찾을 수 없음" -} diff --git a/packages/plugins/@nocobase/plugin-saml/src/locale/pt-BR.json b/packages/plugins/@nocobase/plugin-saml/src/locale/pt-BR.json deleted file mode 100644 index 3f09d0b9c1..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/locale/pt-BR.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "Edit": "Editar", - "Delete": "Excluir", - "Cancel": "Cacelar", - "Submit": "Enviar", - "Actions": "Ações", - "Title": "Titulo", - "Enable": "Ativo", - "SAML manager": "Gerenciador SAML", - "SAML Providers": "Fornecedores SAML", - "Redirect url": "URL de redirecionamento", - "SP entity id": "ID da entidade do provedor de serviços", - "Add provider": "Adicionar", - "Edit provider": "Editar", - "Client id": "ID do cliente", - "Entity id or issuer": "ID da entidade ou emissor", - "Login Url": "URL de login", - "Public cert": "Certificado público", - "Delete provider": "Excluir", - "Are you sure you want to delete it?": "Tem certeza de que deseja excluí-lo?", - "Sign in button name, which will be displayed on the sign in page": "Nome do botão de login, que será exibido na página de login" -} diff --git a/packages/plugins/@nocobase/plugin-saml/src/locale/zh-CN.json b/packages/plugins/@nocobase/plugin-saml/src/locale/zh-CN.json deleted file mode 100644 index 56cd21d931..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/locale/zh-CN.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "Edit": "编辑", - "Delete": "删除", - "Cancel": "取消", - "Submit": "提交", - "Actions": "操作", - "Title": "名称", - "Enable": "启用", - "Button title": "登录按钮标题", - "SAML manager": "SAML 管理", - "SAML Providers": "SAML 身份提供者", - "Redirect url": "重定向地址", - "SP entity id": "应用唯一标识(SP Entity ID)", - "Add provider": "添加", - "Edit provider": "编辑", - "Client id": "客户端 id", - "Entity id or issuer": "IdP 唯一标识", - "Login Url": "登录地址", - "Public cert": "公钥", - "Delete provider": "删除", - "Are you sure you want to delete it?": "你确定要删除它吗?", - "Sign in button name, which will be displayed on the sign in page": "登录按钮名称,将在登录页中显示", - "Copied": "已复制", - "Usage": "使用", - "Use this field to bind the user": "使用此字段绑定用户", - "Sign up automatically when the user does not exist": "用户不存在时自动注册", - "Username must be 2-16 characters in length (excluding @.<>\"'/)": "用户名必须为2-16个字符并且不包含@.<>\"'/)", - "User not found": "用户不存在" -} diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/__tests__/saml.test.ts b/packages/plugins/@nocobase/plugin-saml/src/server/__tests__/saml.test.ts deleted file mode 100644 index c71f1d6469..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/server/__tests__/saml.test.ts +++ /dev/null @@ -1,239 +0,0 @@ -import { Database } from '@nocobase/database'; -import { MockServer, createMockServer } from '@nocobase/test'; -import { SAML } from '@node-saml/node-saml'; -import { vi } from 'vitest'; -import { authType } from '../../constants'; -import { SAMLAuth } from '../saml-auth'; -import { AppSupervisor } from '@nocobase/server'; - -describe('saml', () => { - let app: MockServer; - let db: Database; - let agent; - let authenticator; - - beforeAll(async () => { - app = await createMockServer({ - plugins: ['users', 'auth', 'saml'], - }); - db = app.db; - agent = app.agent(); - - const authenticatorRepo = db.getRepository('authenticators'); - authenticator = await authenticatorRepo.create({ - values: { - name: 'saml-auth', - authType: authType, - enabled: 1, - options: { - saml: { - ssoUrl: 'http://localhost:3000/saml/sso', - certificate: `certificate`, - idpIssuer: 'idpIssuer', - }, - }, - }, - }); - }); - - afterAll(async () => { - await app.destroy(); - }); - - afterEach(async () => { - vi.restoreAllMocks(); - await db.getRepository('users').destroy({ - truncate: true, - }); - }); - - it('should get auth url', async () => { - const res = await agent.set('X-Authenticator', 'saml-auth').resource('saml').getAuthUrl(); - expect(res.body.data).toBeDefined(); - }); - - it('should not sign in without auto signup', async () => { - await authenticator.update({ - options: { - ...authenticator.options, - public: { - autoSignup: false, - }, - }, - }); - vi.spyOn(SAML.prototype, 'validatePostResponseAsync').mockResolvedValue({ - profile: { - nameID: 'test@nocobase.com', - email: 'test@nocobase.com', - firstName: 'Test', - lastName: 'Nocobase', - issuer: 'issuer', - nameIDFormat: 'Email', - }, - loggedOut: false, - }); - - const res = await agent.set('X-Authenticator', 'saml-auth').resource('auth').signIn().send({ - samlResponse: {}, - }); - - expect(res.statusCode).toBe(401); - }); - - it('should sign in with auto signup', async () => { - await authenticator.update({ - options: { - ...authenticator.options, - public: { - autoSignup: true, - }, - }, - }); - vi.spyOn(SAML.prototype, 'validatePostResponseAsync').mockResolvedValue({ - profile: { - nameID: 'test@nocobase.com', - email: 'test@nocobase.com', - firstName: 'Test', - lastName: 'Nocobase', - issuer: 'issuer', - nameIDFormat: 'Email', - }, - loggedOut: false, - }); - - const res = await agent.set('X-Authenticator', 'saml-auth').resource('auth').signIn().send({ - samlResponse: {}, - }); - - expect(res.statusCode).toBe(200); - expect(res.body.data.user).toBeDefined(); - expect(res.body.data.user.nickname).toBe('Test Nocobase'); - }); - - it('should sign in via email', async () => { - await authenticator.update({ - options: { - saml: { - ...authenticator.options.saml, - userBindField: 'email', - }, - public: { - autoSignup: false, - }, - }, - }); - - vi.spyOn(SAML.prototype, 'validatePostResponseAsync').mockResolvedValue({ - profile: { - nameID: 'old@nocobase.com', - email: 'old@nocobase.com', - firstName: 'Old', - lastName: 'Nocobase', - issuer: 'issuer', - nameIDFormat: 'Email', - }, - loggedOut: false, - }); - - const email = 'old@nocobase.com'; - const userRepo = db.getRepository('users'); - const user = await userRepo.create({ - values: { - nickname: email, - email, - }, - }); - - const res = await agent - .set('X-Authenticator', 'saml-auth') - .resource('auth') - .signIn() - .send({ - samlResponse: { - SAMLResponse: '', - }, - }); - - expect(res.body.data.user).toBeDefined(); - expect(res.body.data.user.id).toBe(user.id); - }); - - it('should sign in via usernmae', async () => { - await authenticator.update({ - options: { - saml: { - ...authenticator.options.saml, - userBindField: 'username', - }, - public: { - autoSignup: false, - }, - }, - }); - - vi.spyOn(SAML.prototype, 'validatePostResponseAsync').mockResolvedValue({ - profile: { - nameID: 'username', - email: 'old@nocobase.com', - firstName: 'Old', - lastName: 'Nocobase', - issuer: 'issuer', - nameIDFormat: '', - }, - loggedOut: false, - }); - - const email = 'old@nocobase.com'; - const userRepo = db.getRepository('users'); - const user = await userRepo.create({ - values: { - username: 'username', - nickname: email, - email, - }, - }); - - const res = await agent - .set('X-Authenticator', 'saml-auth') - .resource('auth') - .signIn() - .send({ - samlResponse: { - SAMLResponse: '', - }, - }); - - expect(res.body.data.user).toBeDefined(); - expect(res.body.data.user.id).toBe(user.id); - }); - - it('saml:redirect', async () => { - vi.spyOn(SAMLAuth.prototype, 'signIn').mockResolvedValue({ - user: {} as any, - token: 'test-token', - }); - const res = await agent.get('/saml:redirect?authenticator=saml-auth&__appName=main'); - expect(res.statusCode).toBe(302); - expect(res.headers.location).toBe(`/admin?authenticator=saml-auth&token=test-token`); - }); - - it('saml:redirect, sub app', async () => { - vi.spyOn(SAMLAuth.prototype, 'signIn').mockResolvedValue({ - user: {} as any, - token: 'test-token', - }); - vi.spyOn(AppSupervisor, 'getInstance').mockReturnValue({ - runningMode: 'multiple', - } as any); - const res = await agent.get('/saml:redirect?authenticator=saml-auth&__appName=sub'); - expect(res.statusCode).toBe(302); - expect(res.headers.location).toBe(`/apps/sub/admin?authenticator=saml-auth&token=test-token`); - }); - - it('saml:redirect, error', async () => { - vi.spyOn(SAMLAuth.prototype, 'signIn').mockRejectedValue(new Error('test error')); - const res = await agent.get('/saml:redirect?authenticator=saml-auth&__appName=main'); - expect(res.statusCode).toBe(302); - expect(res.headers.location).toBe(`/signin?authenticator=saml-auth&error=test%20error&redirect=/admin`); - }); -}); diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/actions/getAuthUrl.ts b/packages/plugins/@nocobase/plugin-saml/src/server/actions/getAuthUrl.ts deleted file mode 100644 index c3fad8eb37..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/server/actions/getAuthUrl.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Context, Next } from '@nocobase/actions'; -import { SAML } from '@node-saml/node-saml'; -import { SAMLAuth } from '../saml-auth'; - -export const getAuthUrl = async (ctx: Context, next: Next) => { - const { redirect = '' } = ctx.action.params.values || {}; - const auth = ctx.auth as SAMLAuth; - const options = auth.getOptions(); - const saml = new SAML(options); - - ctx.body = await saml.getAuthorizeUrlAsync(redirect, '', {}); - - return next(); -}; diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/actions/redirect.ts b/packages/plugins/@nocobase/plugin-saml/src/server/actions/redirect.ts deleted file mode 100644 index 85043f3e2b..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/server/actions/redirect.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Context, Next } from '@nocobase/actions'; -import { AppSupervisor } from '@nocobase/server'; -import { SAMLAuth } from '../saml-auth'; - -export const redirect = async (ctx: Context, next: Next) => { - const { authenticator, __appName: appName } = ctx.action.params || {}; - const { RelayState: redirect } = ctx.action.params.values || {}; - let prefix = process.env.APP_PUBLIC_PATH || ''; - if (appName && appName !== 'main') { - const appSupervisor = AppSupervisor.getInstance(); - if (appSupervisor?.runningMode !== 'single') { - prefix += `apps/${appName}`; - } - } - const auth = (await ctx.app.authManager.get(authenticator, ctx)) as SAMLAuth; - if (prefix.endsWith('/')) { - prefix = prefix.slice(0, -1); - } - try { - const { token } = await auth.signIn(); - ctx.redirect(`${prefix}${redirect || '/admin'}?authenticator=${authenticator}&token=${token}`); - } catch (error) { - ctx.redirect( - `${prefix}/signin?authenticator=${authenticator}&error=${error.message}&redirect=${redirect || '/admin'}`, - ); - } - await next(); -}; diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/index.ts b/packages/plugins/@nocobase/plugin-saml/src/server/index.ts deleted file mode 100644 index b68aea57f9..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/server/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './plugin'; diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/migrations/20231008112900-update-autosignup.ts b/packages/plugins/@nocobase/plugin-saml/src/server/migrations/20231008112900-update-autosignup.ts deleted file mode 100644 index 0d05aab406..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/server/migrations/20231008112900-update-autosignup.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Migration } from '@nocobase/server'; -import { authType } from '../../constants'; - -export default class UpdateAutoSignupMigration extends Migration { - appVersion = '<0.14.0-alpha.8'; - async up() { - const result = await this.app.version.satisfies('<=0.14.0-alpha.8'); - - if (!result) { - return; - } - - const r = this.db.getRepository('authenticators'); - const items = await r.find({ - filter: { - authType, - }, - }); - await this.db.sequelize.transaction(async (transaction) => { - for (const item of items) { - let options = item.options; - options = { - public: { autoSignup: true, ...options.public }, - saml: { userBindField: 'email', ...options.saml }, - }; - item.set('options', options); - await item.save({ transaction }); - } - }); - } - - async down() {} -} diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-saml/src/server/plugin.ts deleted file mode 100644 index 7eba6d6f6a..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/server/plugin.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { InstallOptions, Plugin } from '@nocobase/server'; -import { getAuthUrl } from './actions/getAuthUrl'; -import { redirect } from './actions/redirect'; -import { SAMLAuth } from './saml-auth'; -import { authType } from '../constants'; -import { resolve } from 'path'; - -export class PluginSAMLServer extends Plugin { - afterAdd() {} - - beforeLoad() {} - - async load() { - this.db.addMigrations({ - namespace: 'auth', - directory: resolve(__dirname, 'migrations'), - context: { - plugin: this, - }, - }); - - this.app.authManager.registerTypes(authType, { - auth: SAMLAuth, - }); - - // 注册接口 - this.app.resource({ - name: 'saml', - actions: { - redirect, - getAuthUrl, - }, - }); - - // 开放访问权限 - this.app.acl.allow('saml', '*', 'public'); - } - - async install(options?: InstallOptions) {} - - async afterEnable() {} - - async afterDisable() {} - - async remove() {} -} - -export default PluginSAMLServer; diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/saml-auth.ts b/packages/plugins/@nocobase/plugin-saml/src/server/saml-auth.ts deleted file mode 100644 index 51fd19eb4f..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/server/saml-auth.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { AuthConfig, BaseAuth } from '@nocobase/auth'; -import { AuthModel } from '@nocobase/plugin-auth'; -import { SAML, SamlConfig } from '@node-saml/node-saml'; - -interface SAMLOptions { - ssoUrl?: string; - certificate?: string; - idpIssuer?: string; - http?: boolean; -} - -export class SAMLAuth extends BaseAuth { - constructor(config: AuthConfig) { - const { ctx } = config; - super({ - ...config, - userCollection: ctx.db.getCollection('users'), - }); - } - - getOptions(): SamlConfig { - const ctx = this.ctx; - const { ssoUrl, certificate, idpIssuer, http }: SAMLOptions = this.options?.saml || {}; - const name = this.authenticator.get('name'); - const protocol = http ? 'http' : 'https'; - return { - callbackUrl: `${protocol}://${ctx.host}${process.env.API_BASE_PATH}saml:redirect?authenticator=${name}&__appName=${ctx.app.name}`, - entryPoint: ssoUrl, - issuer: name, - cert: certificate, - idpIssuer, - wantAssertionsSigned: false, - }; - } - - async validate() { - const ctx = this.ctx; - const { - params: { values: samlResponse }, - } = ctx.action; - const saml = new SAML(this.getOptions()); - - const { profile } = await saml.validatePostResponseAsync(samlResponse); - const { nameID, nickname, firstName, lastName, phone } = profile; - let { email, username } = profile; - const isEmail = nameID.match(/^.+@.+\..+$/); - if (!email && isEmail) { - email = nameID; - } - if (!username && !isEmail) { - username = nameID; - } - - const authenticator = this.authenticator as AuthModel; - let user = await authenticator.findUser(nameID); - if (user) { - return user; - } - // Bind existed user - const { userBindField = 'email' } = this.options?.saml || {}; - if (userBindField === 'email' && email) { - user = await this.userRepository.findOne({ - filter: { email }, - }); - } else if (userBindField === 'username' && username) { - user = await this.userRepository.findOne({ - filter: { username }, - }); - } - if (user) { - await this.authenticator.addUser(user.id, { - through: { - uuid: nameID, - }, - }); - return user; - } - // Create new user - const { autoSignup } = this.options?.public || {}; - if (!autoSignup) { - throw new Error('User not found'); - } - if (username && !this.validateUsername(username as string)) { - throw new Error('Username must be 2-16 characters in length (excluding @.<>"\'/)'); - } - const fullName = firstName && lastName && `${firstName} ${lastName}`; - return await authenticator.newUser(nameID, { - username: username ?? null, - nickname: nickname || fullName || username || nameID, - email: email ?? null, - phone: phone ?? null, - }); - } -} diff --git a/packages/plugins/@nocobase/plugin-saml/src/swagger/index.ts b/packages/plugins/@nocobase/plugin-saml/src/swagger/index.ts deleted file mode 100644 index 8e24e44e31..0000000000 --- a/packages/plugins/@nocobase/plugin-saml/src/swagger/index.ts +++ /dev/null @@ -1,142 +0,0 @@ -const user = { - type: 'object', - description: '用户', - properties: { - id: { - type: 'integer', - description: 'ID', - }, - nickname: { - type: 'string', - description: '昵称', - }, - email: { - type: 'string', - description: '邮箱', - }, - phone: { - type: 'string', - description: '手机号', - }, - appLang: { - type: 'string', - description: '用户使用语言', - }, - systemSettings: { - type: 'object', - description: '系统设置', - properties: { - theme: { - type: 'string', - description: '用户使用主题', - }, - }, - }, - createdAt: { - type: 'string', - format: 'date-time', - description: '创建时间', - }, - updatedAt: { - type: 'string', - format: 'date-time', - description: '更新时间', - }, - createdById: { - type: 'integer', - description: '创建人', - }, - updatedById: { - type: 'integer', - description: '更新人', - }, - }, -}; - -export default { - info: { - title: 'NocoBase API - SAML plugin', - }, - paths: { - '/saml:getAuthUrl': { - security: [], - get: { - description: 'Get SAML authorization url', - tags: ['SAML'], - parameters: [ - { - name: 'X-Authenticator', - description: '登录方式标识', - in: 'header', - schema: { - type: 'string', - }, - required: true, - }, - ], - responses: { - 200: { - description: 'ok', - content: { - 'application/json': { - schema: { - type: 'string', - }, - }, - }, - }, - }, - }, - }, - '/auth:signIn': { - security: [], - post: { - description: 'SAML sign in', - tags: ['SAML'], - parameters: [ - { - name: 'X-Authenticator', - description: '登录方式标识', - in: 'header', - schema: { - type: 'string', - }, - required: true, - }, - ], - requestBody: { - content: { - 'application/json': { - schema: { - type: 'object', - properties: { - samlResponse: { - type: 'string', - }, - }, - }, - }, - }, - }, - responses: { - 200: { - description: 'ok', - content: { - 'application/json': { - schema: { - type: 'object', - properties: { - user, - token: { - type: 'string', - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, -}; diff --git a/packages/plugins/@nocobase/plugin-sample-hello/package.json b/packages/plugins/@nocobase/plugin-sample-hello/package.json index a1c31224d4..311cd07ad9 100644 --- a/packages/plugins/@nocobase/plugin-sample-hello/package.json +++ b/packages/plugins/@nocobase/plugin-sample-hello/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-sample-hello", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "main": "./dist/server/index.js", "displayName": "Hello", "displayName.zh-CN": "Hello", @@ -14,9 +14,9 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/client": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" } diff --git a/packages/plugins/@nocobase/plugin-sequence-field/.npmignore b/packages/plugins/@nocobase/plugin-sequence-field/.npmignore deleted file mode 100644 index c593fe9df7..0000000000 --- a/packages/plugins/@nocobase/plugin-sequence-field/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -/node_modules -/src \ No newline at end of file diff --git a/packages/plugins/@nocobase/plugin-sequence-field/LICENSE b/packages/plugins/@nocobase/plugin-sequence-field/LICENSE deleted file mode 100644 index 0ad25db4bd..0000000000 --- a/packages/plugins/@nocobase/plugin-sequence-field/LICENSE +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -. diff --git a/packages/plugins/@nocobase/plugin-sequence-field/client.d.ts b/packages/plugins/@nocobase/plugin-sequence-field/client.d.ts deleted file mode 100644 index 6c459cbac4..0000000000 --- a/packages/plugins/@nocobase/plugin-sequence-field/client.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './dist/client'; -export { default } from './dist/client'; diff --git a/packages/plugins/@nocobase/plugin-sequence-field/client.js b/packages/plugins/@nocobase/plugin-sequence-field/client.js deleted file mode 100644 index b6e3be70e6..0000000000 --- a/packages/plugins/@nocobase/plugin-sequence-field/client.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/client/index.js'); diff --git a/packages/plugins/@nocobase/plugin-sequence-field/server.d.ts b/packages/plugins/@nocobase/plugin-sequence-field/server.d.ts deleted file mode 100644 index c41081ddc6..0000000000 --- a/packages/plugins/@nocobase/plugin-sequence-field/server.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './dist/server'; -export { default } from './dist/server'; diff --git a/packages/plugins/@nocobase/plugin-sequence-field/server.js b/packages/plugins/@nocobase/plugin-sequence-field/server.js deleted file mode 100644 index 972842039a..0000000000 --- a/packages/plugins/@nocobase/plugin-sequence-field/server.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/server/index.js'); diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/index.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/index.ts deleted file mode 100644 index 7e74612df8..0000000000 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './server'; -export { default } from './server'; diff --git a/packages/plugins/@nocobase/plugin-sms-auth/.npmignore b/packages/plugins/@nocobase/plugin-sms-auth/.npmignore deleted file mode 100644 index c593fe9df7..0000000000 --- a/packages/plugins/@nocobase/plugin-sms-auth/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -/node_modules -/src \ No newline at end of file diff --git a/packages/plugins/@nocobase/plugin-sms-auth/LICENSE b/packages/plugins/@nocobase/plugin-sms-auth/LICENSE deleted file mode 100644 index 0ad25db4bd..0000000000 --- a/packages/plugins/@nocobase/plugin-sms-auth/LICENSE +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -. diff --git a/packages/plugins/@nocobase/plugin-sms-auth/client.d.ts b/packages/plugins/@nocobase/plugin-sms-auth/client.d.ts deleted file mode 100644 index 6c459cbac4..0000000000 --- a/packages/plugins/@nocobase/plugin-sms-auth/client.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './dist/client'; -export { default } from './dist/client'; diff --git a/packages/plugins/@nocobase/plugin-sms-auth/server.d.ts b/packages/plugins/@nocobase/plugin-sms-auth/server.d.ts deleted file mode 100644 index c41081ddc6..0000000000 --- a/packages/plugins/@nocobase/plugin-sms-auth/server.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './dist/server'; -export { default } from './dist/server'; diff --git a/packages/plugins/@nocobase/plugin-sms-auth/src/index.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/index.ts deleted file mode 100644 index 7e74612df8..0000000000 --- a/packages/plugins/@nocobase/plugin-sms-auth/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './server'; -export { default } from './server'; diff --git a/packages/plugins/@nocobase/plugin-sms-auth/src/server/collections/.gitkeep b/packages/plugins/@nocobase/plugin-sms-auth/src/server/collections/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/plugins/@nocobase/plugin-sms-auth/src/server/index.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/index.ts deleted file mode 100644 index b68aea57f9..0000000000 --- a/packages/plugins/@nocobase/plugin-sms-auth/src/server/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './plugin'; diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/package.json b/packages/plugins/@nocobase/plugin-snapshot-field/package.json index b8831432e9..a626dfb43a 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/package.json +++ b/packages/plugins/@nocobase/plugin-snapshot-field/package.json @@ -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": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/field-snapshot", @@ -20,11 +20,11 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/server/__tests__/fieldsHistory.test.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/__tests__/fieldsHistory.test.ts index ba6e682547..cdba2038c5 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/server/__tests__/fieldsHistory.test.ts +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/__tests__/fieldsHistory.test.ts @@ -7,7 +7,7 @@ describe('actions', () => { app = await createMockServer({ registerActions: true, acl: false, - plugins: ['error-handler', 'users', 'ui-schema-storage', 'collection-manager', 'snapshot-field'], + plugins: ['error-handler', 'users', 'ui-schema-storage', 'data-source-main', 'snapshot-field'], }); }); diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/server/__tests__/snapshots.test.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/__tests__/snapshots.test.ts index 49a054837e..39b2d1e8e6 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/server/__tests__/snapshots.test.ts +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/__tests__/snapshots.test.ts @@ -18,7 +18,7 @@ describe('actions', () => { app = await createMockServer({ registerActions: true, acl: false, - plugins: ['error-handler', 'users', 'ui-schema-storage', 'collection-manager', 'snapshot-field'], + plugins: ['error-handler', 'users', 'ui-schema-storage', 'data-source-main', 'snapshot-field'], }); }); diff --git a/packages/plugins/@nocobase/plugin-system-settings/package.json b/packages/plugins/@nocobase/plugin-system-settings/package.json index 7ab29499d1..6693c9f6d6 100644 --- a/packages/plugins/@nocobase/plugin-system-settings/package.json +++ b/packages/plugins/@nocobase/plugin-system-settings/package.json @@ -4,16 +4,16 @@ "displayName.zh-CN": "系统设置", "description": "Used to adjust the system title, logo, language, etc.", "description.zh-CN": "用于调整系统的标题、LOGO、语言等。", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/system-settings", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/system-settings", "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-theme-editor/package.json b/packages/plugins/@nocobase/plugin-theme-editor/package.json index 0e9a707bfb..60a40a48b1 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/package.json +++ b/packages/plugins/@nocobase/plugin-theme-editor/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-theme-editor", - "version": "0.21.0-alpha.16", + "version": "1.0.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", @@ -25,12 +25,12 @@ "vanilla-jsoneditor": "^0.17.8" }, "peerDependencies": { - "@nocobase/actions": "0.x", - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/actions": "1.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json b/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json index c5704bf1e6..55edc2a0fe 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "UI schema 存储服务", "description": "Provides centralized UI schema storage service.", "description.zh-CN": "提供中心化的 UI schema 存储服务。", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/ui-schema-storage", @@ -13,16 +13,16 @@ "@formily/json-schema": "2.x" }, "peerDependencies": { - "@nocobase/actions": "0.x", - "@nocobase/cache": "0.x", - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/plugin-error-handler": "0.x", - "@nocobase/plugin-users": "0.x", - "@nocobase/resourcer": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/actions": "1.x", + "@nocobase/cache": "1.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/plugin-error-handler": "1.x", + "@nocobase/plugin-users": "1.x", + "@nocobase/resourcer": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-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 index 4bcfd988fc..7ba54d5e59 100644 --- a/packages/plugins/@nocobase/plugin-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 @@ -1,6 +1,6 @@ import { BelongsToManyRepository, Database } from '@nocobase/database'; import UiSchemaStoragePlugin, { UiSchemaRepository } from '@nocobase/plugin-ui-schema-storage'; -import { createMockServer, MockServer } from '@nocobase/test'; +import { MockServer, createMockServer } from '@nocobase/test'; describe('server hooks', () => { let app: MockServer; @@ -15,7 +15,7 @@ describe('server hooks', () => { beforeEach(async () => { app = await createMockServer({ registerActions: true, - plugins: ['ui-schema-storage', 'collection-manager', 'error-handler', 'users', 'acl', 'data-source-manager'], + plugins: ['ui-schema-storage', 'data-source-main', 'error-handler', 'users', 'acl', 'data-source-manager'], }); await app.runCommand('install', '-f'); db = app.db; diff --git a/packages/plugins/@nocobase/plugin-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 index 5443458a07..7bffd92221 100644 --- a/packages/plugins/@nocobase/plugin-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 @@ -56,7 +56,7 @@ describe('server hooks', () => { beforeEach(async () => { app = await createMockServer({ registerActions: true, - plugins: ['ui-schema-storage', 'collection-manager', 'error-handler'], + plugins: ['ui-schema-storage', 'data-source-main', 'error-handler'], }); db = app.db; diff --git a/packages/plugins/@nocobase/plugin-users/package.json b/packages/plugins/@nocobase/plugin-users/package.json index 3e2a531e8d..54efe0cda1 100644 --- a/packages/plugins/@nocobase/plugin-users/package.json +++ b/packages/plugins/@nocobase/plugin-users/package.json @@ -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": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/users", @@ -14,15 +14,15 @@ "jsonwebtoken": "^8.5.1" }, "peerDependencies": { - "@nocobase/actions": "0.x", - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/plugin-acl": "0.x", - "@nocobase/plugin-auth": "0.x", - "@nocobase/resourcer": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/actions": "1.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/plugin-acl": "1.x", + "@nocobase/plugin-auth": "1.x", + "@nocobase/resourcer": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-users/src/server/__tests__/fields.test.ts b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/fields.test.ts index 69255bb19d..9bfaccdab5 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/__tests__/fields.test.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/fields.test.ts @@ -9,7 +9,7 @@ describe('createdBy/updatedBy', () => { beforeEach(async () => { api = await createMockServer({ - plugins: ['acl', 'users', 'collection-manager', 'error-handler', 'data-source-manager'], + plugins: ['acl', 'users', 'data-source-main', 'error-handler', 'data-source-manager'], }); db = api.db; diff --git a/packages/plugins/@nocobase/plugin-verification/package.json b/packages/plugins/@nocobase/plugin-verification/package.json index ca47f7eb61..6396023aab 100644 --- a/packages/plugins/@nocobase/plugin-verification/package.json +++ b/packages/plugins/@nocobase/plugin-verification/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "验证码", "description": "verification setting.", "description.zh-CN": "验证码配置。", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/verification", @@ -23,13 +23,13 @@ "tencentcloud-sdk-nodejs": "^4.0.525" }, "peerDependencies": { - "@nocobase/actions": "0.x", - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/resourcer": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/actions": "1.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/resourcer": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json b/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json index defc2f55fe..612dbfa1c4 100644 --- a/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json @@ -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": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/plugins/workflow-action-trigger", @@ -15,11 +15,11 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", "@nocobase/plugin-workflow": ">=0.17.0-alpha.3", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json b/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json index d95fa77d4d..fa471634cc 100644 --- a/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json @@ -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": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-aggregate", @@ -15,11 +15,11 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", "@nocobase/plugin-workflow": ">=0.17.0-alpha.3", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-workflow-delay/package.json b/packages/plugins/@nocobase/plugin-workflow-delay/package.json index 1777882064..5a023b2d5b 100644 --- a/packages/plugins/@nocobase/plugin-workflow-delay/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-delay/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:延时节点", "description": "Could be used in workflow parallel branch for waiting other branches.", "description.zh-CN": "可用于工作流并行分支中等待其他分支执行完成。", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-delay", @@ -15,11 +15,11 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", "@nocobase/plugin-workflow": ">=0.17.0-alpha.3", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json b/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json index 6127e3c346..845225eb21 100644 --- a/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json @@ -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": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-dynamic-calculation", @@ -21,14 +21,14 @@ "react-router-dom": "^6.11.2" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/evaluators": "0.x", - "@nocobase/plugin-collection-manager": "0.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/evaluators": "1.x", + "@nocobase/plugin-data-source-main": "1.x", "@nocobase/plugin-workflow": ">=0.17.0-alpha.3", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-workflow-loop/package.json b/packages/plugins/@nocobase/plugin-workflow-loop/package.json index 0ae0389bff..9abd611d91 100644 --- a/packages/plugins/@nocobase/plugin-workflow-loop/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-loop/package.json @@ -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": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-loop", @@ -15,11 +15,11 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", "@nocobase/plugin-workflow": ">=0.17.0-alpha.3", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-workflow-manual/package.json b/packages/plugins/@nocobase/plugin-workflow-manual/package.json index f33ce01d0a..adde78cc19 100644 --- a/packages/plugins/@nocobase/plugin-workflow-manual/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-manual/package.json @@ -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": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-manual", @@ -21,14 +21,14 @@ "react-router-dom": "^6.11.2" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/plugin-collection-manager": "0.x", - "@nocobase/plugin-users": "0.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/plugin-data-source-main": "1.x", + "@nocobase/plugin-users": "1.x", "@nocobase/plugin-workflow": ">=0.17.0-alpha.3", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-workflow-manual/src/server/migrations/20240325213145-fix-schema.ts b/packages/plugins/@nocobase/plugin-workflow-manual/src/server/migrations/20240325213145-fix-schema.ts index 04cfad3bff..ebb4f86056 100644 --- a/packages/plugins/@nocobase/plugin-workflow-manual/src/server/migrations/20240325213145-fix-schema.ts +++ b/packages/plugins/@nocobase/plugin-workflow-manual/src/server/migrations/20240325213145-fix-schema.ts @@ -44,6 +44,7 @@ function migrateSchema(schema) { } export default class extends Migration { + appVersion = '<0.21.0-alpha.15'; async up() { const { db } = this.context; const NodeRepo = db.getRepository('flow_nodes'); diff --git a/packages/plugins/@nocobase/plugin-workflow-parallel/package.json b/packages/plugins/@nocobase/plugin-workflow-parallel/package.json index 17651bc45a..4b3a2bb658 100644 --- a/packages/plugins/@nocobase/plugin-workflow-parallel/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-parallel/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:并行分支节点", "description": "Could be used for parallel execution of branch processes in the workflow.", "description.zh-CN": "用于在工作流中需要并行执行的分支流程。", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-parallel", @@ -16,11 +16,11 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", "@nocobase/plugin-workflow": ">=0.17.0-alpha.3", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-workflow-request/package.json b/packages/plugins/@nocobase/plugin-workflow-request/package.json index 54b80f62d0..d9519283bc 100644 --- a/packages/plugins/@nocobase/plugin-workflow-request/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-request/package.json @@ -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": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-request", @@ -18,11 +18,11 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", "@nocobase/plugin-workflow": ">=0.17.0-alpha.3", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-workflow-sql/package.json b/packages/plugins/@nocobase/plugin-workflow-sql/package.json index 3a01a8e3c9..2e5cb5afae 100644 --- a/packages/plugins/@nocobase/plugin-workflow-sql/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-sql/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:SQL 节点", "description": "Execute SQL statements in workflow.", "description.zh-CN": "可用于在工作流中对数据库执行任意 SQL 语句。", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-sql", @@ -15,11 +15,11 @@ "react-i18next": "^11.15.1" }, "peerDependencies": { - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", "@nocobase/plugin-workflow": ">=0.17.0-alpha.3", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-workflow-test/package.json b/packages/plugins/@nocobase/plugin-workflow-test/package.json index 1cf610f04c..6f1d554d10 100644 --- a/packages/plugins/@nocobase/plugin-workflow-test/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-test/package.json @@ -2,14 +2,14 @@ "name": "@nocobase/plugin-workflow-test", "displayName": "Workflow: test kit", "displayName.zh-CN": "工作流:测试工具包", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "dist/server/index.js", "types": "./dist/server/index.d.ts", "peerDependencies": { - "@nocobase/database": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x" + "@nocobase/database": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" } diff --git a/packages/plugins/@nocobase/plugin-workflow/package.json b/packages/plugins/@nocobase/plugin-workflow/package.json index c017dc53a2..e4aa24848f 100644 --- a/packages/plugins/@nocobase/plugin-workflow/package.json +++ b/packages/plugins/@nocobase/plugin-workflow/package.json @@ -4,13 +4,13 @@ "displayName.zh-CN": "工作流", "description": "A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.", "description.zh-CN": "一个强大的 BPM 工具,为业务自动化提供基础支持,并且可任意扩展更多的触发器和节点。", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/workflow", "dependencies": { - "@nocobase/plugin-workflow-test": "0.21.0-alpha.16" + "@nocobase/plugin-workflow-test": "1.0.0-alpha.1" }, "devDependencies": { "@ant-design/icons": "5.x", @@ -31,18 +31,18 @@ "sequelize": "^6.26.0" }, "peerDependencies": { - "@nocobase/actions": "0.x", - "@nocobase/client": "0.x", - "@nocobase/database": "0.x", - "@nocobase/evaluators": "0.x", - "@nocobase/logger": "0.x", - "@nocobase/plugin-collection-manager": "0.x", - "@nocobase/plugin-error-handler": "0.x", - "@nocobase/plugin-users": "0.x", - "@nocobase/resourcer": "0.x", - "@nocobase/server": "0.x", - "@nocobase/test": "0.x", - "@nocobase/utils": "0.x" + "@nocobase/actions": "1.x", + "@nocobase/client": "1.x", + "@nocobase/database": "1.x", + "@nocobase/evaluators": "1.x", + "@nocobase/logger": "1.x", + "@nocobase/plugin-data-source-main": "1.x", + "@nocobase/plugin-error-handler": "1.x", + "@nocobase/plugin-users": "1.x", + "@nocobase/resourcer": "1.x", + "@nocobase/server": "1.x", + "@nocobase/test": "1.x", + "@nocobase/utils": "1.x" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", "keywords": [ diff --git a/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/triggers/collection.test.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/triggers/collection.test.ts index 98d2f65ad4..e8ca8f52a6 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/triggers/collection.test.ts +++ b/packages/plugins/@nocobase/plugin-workflow/src/server/__tests__/triggers/collection.test.ts @@ -1,6 +1,6 @@ import { MockDatabase } from '@nocobase/database'; -import { MockServer } from '@nocobase/test'; import { getApp, sleep } from '@nocobase/plugin-workflow-test'; +import { MockServer } from '@nocobase/test'; import { EXECUTION_STATUS } from '../../constants'; @@ -15,7 +15,7 @@ describe('workflow > triggers > collection', () => { beforeEach(async () => { app = await getApp({ - plugins: ['error-handler', 'collection-manager', 'users', 'auth'], + plugins: ['error-handler', 'data-source-main', 'users', 'auth'], }); db = app.db; diff --git a/packages/presets/nocobase/package.json b/packages/presets/nocobase/package.json index 6fe370090b..9e666d3c12 100644 --- a/packages/presets/nocobase/package.json +++ b/packages/presets/nocobase/package.json @@ -1,67 +1,64 @@ { "name": "@nocobase/preset-nocobase", - "version": "0.21.0-alpha.16", + "version": "1.0.0-alpha.1", "license": "AGPL-3.0", "main": "./lib/server/index.js", "dependencies": { "@formily/json-schema": "2.x", - "@nocobase/plugin-acl": "0.21.0-alpha.16", - "@nocobase/plugin-action-bulk-edit": "0.21.0-alpha.16", - "@nocobase/plugin-action-bulk-update": "0.21.0-alpha.16", - "@nocobase/plugin-action-duplicate": "0.21.0-alpha.16", - "@nocobase/plugin-action-print": "0.21.0-alpha.16", - "@nocobase/plugin-api-doc": "0.21.0-alpha.16", - "@nocobase/plugin-api-keys": "0.21.0-alpha.16", - "@nocobase/plugin-audit-logs": "0.21.0-alpha.16", - "@nocobase/plugin-auth": "0.21.0-alpha.16", - "@nocobase/plugin-backup-restore": "0.21.0-alpha.16", - "@nocobase/plugin-calendar": "0.21.0-alpha.16", - "@nocobase/plugin-cas": "0.21.0-alpha.16", - "@nocobase/plugin-charts": "0.21.0-alpha.16", - "@nocobase/plugin-china-region": "0.21.0-alpha.16", - "@nocobase/plugin-client": "0.21.0-alpha.16", - "@nocobase/plugin-collection-manager": "0.21.0-alpha.16", - "@nocobase/plugin-custom-request": "0.21.0-alpha.16", - "@nocobase/plugin-data-source-manager": "0.21.0-alpha.16", - "@nocobase/plugin-data-visualization": "0.21.0-alpha.16", - "@nocobase/plugin-error-handler": "0.21.0-alpha.16", - "@nocobase/plugin-export": "0.21.0-alpha.16", - "@nocobase/plugin-field-markdown-vditor": "0.21.0-alpha.16", - "@nocobase/plugin-file-manager": "0.21.0-alpha.16", - "@nocobase/plugin-formula-field": "0.21.0-alpha.16", - "@nocobase/plugin-gantt": "0.21.0-alpha.16", - "@nocobase/plugin-graph-collection-manager": "0.21.0-alpha.16", - "@nocobase/plugin-iframe-block": "0.21.0-alpha.16", - "@nocobase/plugin-import": "0.21.0-alpha.16", - "@nocobase/plugin-kanban": "0.21.0-alpha.16", - "@nocobase/plugin-localization-management": "0.21.0-alpha.16", - "@nocobase/plugin-logger": "0.21.0-alpha.16", - "@nocobase/plugin-map": "0.21.0-alpha.16", - "@nocobase/plugin-mobile-client": "0.21.0-alpha.16", - "@nocobase/plugin-mock-collections": "0.21.0-alpha.16", - "@nocobase/plugin-multi-app-manager": "0.21.0-alpha.16", - "@nocobase/plugin-multi-app-share-collection": "0.21.0-alpha.16", - "@nocobase/plugin-oidc": "0.21.0-alpha.16", - "@nocobase/plugin-saml": "0.21.0-alpha.16", - "@nocobase/plugin-sequence-field": "0.21.0-alpha.16", - "@nocobase/plugin-sms-auth": "0.21.0-alpha.16", - "@nocobase/plugin-snapshot-field": "0.21.0-alpha.16", - "@nocobase/plugin-system-settings": "0.21.0-alpha.16", - "@nocobase/plugin-theme-editor": "0.21.0-alpha.16", - "@nocobase/plugin-ui-schema-storage": "0.21.0-alpha.16", - "@nocobase/plugin-users": "0.21.0-alpha.16", - "@nocobase/plugin-verification": "0.21.0-alpha.16", - "@nocobase/plugin-workflow": "0.21.0-alpha.16", - "@nocobase/plugin-workflow-action-trigger": "0.21.0-alpha.16", - "@nocobase/plugin-workflow-aggregate": "0.21.0-alpha.16", - "@nocobase/plugin-workflow-delay": "0.21.0-alpha.16", - "@nocobase/plugin-workflow-dynamic-calculation": "0.21.0-alpha.16", - "@nocobase/plugin-workflow-loop": "0.21.0-alpha.16", - "@nocobase/plugin-workflow-manual": "0.21.0-alpha.16", - "@nocobase/plugin-workflow-parallel": "0.21.0-alpha.16", - "@nocobase/plugin-workflow-request": "0.21.0-alpha.16", - "@nocobase/plugin-workflow-sql": "0.21.0-alpha.16", - "@nocobase/server": "0.21.0-alpha.16", + "@nocobase/plugin-acl": "1.0.0-alpha.1", + "@nocobase/plugin-action-bulk-edit": "1.0.0-alpha.1", + "@nocobase/plugin-action-bulk-update": "1.0.0-alpha.1", + "@nocobase/plugin-action-custom-request": "1.0.0-alpha.1", + "@nocobase/plugin-action-duplicate": "1.0.0-alpha.1", + "@nocobase/plugin-action-export": "1.0.0-alpha.1", + "@nocobase/plugin-action-import": "1.0.0-alpha.1", + "@nocobase/plugin-action-print": "1.0.0-alpha.1", + "@nocobase/plugin-api-doc": "1.0.0-alpha.1", + "@nocobase/plugin-api-keys": "1.0.0-alpha.1", + "@nocobase/plugin-audit-logs": "1.0.0-alpha.1", + "@nocobase/plugin-auth": "1.0.0-alpha.1", + "@nocobase/plugin-auth-sms": "1.0.0-alpha.1", + "@nocobase/plugin-backup-restore": "1.0.0-alpha.1", + "@nocobase/plugin-block-iframe": "1.0.0-alpha.1", + "@nocobase/plugin-calendar": "1.0.0-alpha.1", + "@nocobase/plugin-charts": "1.0.0-alpha.1", + "@nocobase/plugin-client": "1.0.0-alpha.1", + "@nocobase/plugin-data-source-main": "1.0.0-alpha.1", + "@nocobase/plugin-data-source-manager": "1.0.0-alpha.1", + "@nocobase/plugin-data-visualization": "1.0.0-alpha.1", + "@nocobase/plugin-error-handler": "1.0.0-alpha.1", + "@nocobase/plugin-field-china-region": "1.0.0-alpha.1", + "@nocobase/plugin-field-formula": "1.0.0-alpha.1", + "@nocobase/plugin-field-markdown-vditor": "1.0.0-alpha.1", + "@nocobase/plugin-field-sequence": "1.0.0-alpha.1", + "@nocobase/plugin-file-manager": "1.0.0-alpha.1", + "@nocobase/plugin-gantt": "1.0.0-alpha.1", + "@nocobase/plugin-graph-collection-manager": "1.0.0-alpha.1", + "@nocobase/plugin-kanban": "1.0.0-alpha.1", + "@nocobase/plugin-localization": "1.0.0-alpha.1", + "@nocobase/plugin-logger": "1.0.0-alpha.1", + "@nocobase/plugin-map": "1.0.0-alpha.1", + "@nocobase/plugin-mobile-client": "1.0.0-alpha.1", + "@nocobase/plugin-mock-collections": "1.0.0-alpha.1", + "@nocobase/plugin-multi-app-manager": "1.0.0-alpha.1", + "@nocobase/plugin-multi-app-share-collection": "1.0.0-alpha.1", + "@nocobase/plugin-snapshot-field": "1.0.0-alpha.1", + "@nocobase/plugin-system-settings": "1.0.0-alpha.1", + "@nocobase/plugin-theme-editor": "1.0.0-alpha.1", + "@nocobase/plugin-ui-schema-storage": "1.0.0-alpha.1", + "@nocobase/plugin-users": "1.0.0-alpha.1", + "@nocobase/plugin-verification": "1.0.0-alpha.1", + "@nocobase/plugin-workflow": "1.0.0-alpha.1", + "@nocobase/plugin-workflow-action-trigger": "1.0.0-alpha.1", + "@nocobase/plugin-workflow-aggregate": "1.0.0-alpha.1", + "@nocobase/plugin-workflow-delay": "1.0.0-alpha.1", + "@nocobase/plugin-workflow-dynamic-calculation": "1.0.0-alpha.1", + "@nocobase/plugin-workflow-loop": "1.0.0-alpha.1", + "@nocobase/plugin-workflow-manual": "1.0.0-alpha.1", + "@nocobase/plugin-workflow-parallel": "1.0.0-alpha.1", + "@nocobase/plugin-workflow-request": "1.0.0-alpha.1", + "@nocobase/plugin-workflow-sql": "1.0.0-alpha.1", + "@nocobase/server": "1.0.0-alpha.1", "cronstrue": "^2.11.0" }, "repository": { diff --git a/packages/presets/nocobase/src/server/__tests__/migrations/pro-plugins-detect.test.ts b/packages/presets/nocobase/src/server/__tests__/migrations/pro-plugins-detect.test.ts new file mode 100644 index 0000000000..8af533e1eb --- /dev/null +++ b/packages/presets/nocobase/src/server/__tests__/migrations/pro-plugins-detect.test.ts @@ -0,0 +1,96 @@ +import { Repository } from '@nocobase/database'; +import { MockServer, createMockServer } from '@nocobase/test'; +import Migration from '../../migrations/20240424125531-pro-plugins-detect'; +import { PluginManager } from '@nocobase/server'; + +describe('pro plugins detect', () => { + let app: MockServer; + let repo: Repository; + + beforeEach(async () => { + app = await createMockServer({ + version: '0.21.0-alpha.15', + }); + repo = app.db.getRepository('applicationPlugins'); + }); + + afterEach(async () => { + vi.resetAllMocks(); + await app.db.clean({ drop: true }); + await app.destroy(); + }); + + it('should delete removed but not enabled plugins', async () => { + vi.spyOn(PluginManager, 'getPackageName').mockRejectedValue(new Error('not found')); + await repo.create({ + values: { + name: 'saml', + packageName: '@nocobase/plugin-saml', + version: '0.21.0-alpha.15', + enabled: false, + }, + }); + const migration = new Migration({ + db: app.db, + // @ts-ignore + app: app, + }); + await migration.up(); + const exists = await repo.count({ + filter: { + name: 'saml', + }, + }); + expect(exists).toBe(0); + }); + + it('should throw error when enabled plugin not found', async () => { + vi.spyOn(PluginManager, 'getPackageName').mockRejectedValue(new Error('not found')); + const plugin = await repo.create({ + values: { + name: 'saml', + packageName: '@nocobase/plugin-saml', + version: '0.21.0-alpha.15', + enabled: true, + }, + }); + const migration = new Migration({ + db: app.db, + // @ts-ignore + app: app, + }); + await expect(migration.up()).rejects.toThrowError(); + const p = await repo.findOne({ + filter: { + id: plugin.id, + }, + }); + expect(p.name).toBe('saml'); + expect(p.packageName).toBe('@nocobase/plugin-saml'); + }); + + it('should rename enabled plugins', async () => { + vi.spyOn(PluginManager, 'getPackageName').mockResolvedValue('@nocobase/plugin-saml'); + const plugin = await repo.create({ + values: { + name: 'saml', + packageName: '@nocobase/plugin-saml', + version: '0.21.0-alpha.15', + enabled: true, + }, + }); + const migration = new Migration({ + db: app.db, + // @ts-ignore + app: app, + }); + await migration.up(); + const p = await repo.findOne({ + filter: { + id: plugin.id, + }, + }); + expect(p.name).toBe('auth-saml'); + expect(p.packageName).toBe('@nocobase/plugin-auth-saml'); + }); +}); diff --git a/packages/presets/nocobase/src/server/__tests__/migrations/rename.test.ts b/packages/presets/nocobase/src/server/__tests__/migrations/rename.test.ts new file mode 100644 index 0000000000..ce6ec55f92 --- /dev/null +++ b/packages/presets/nocobase/src/server/__tests__/migrations/rename.test.ts @@ -0,0 +1,44 @@ +import { Repository } from '@nocobase/database'; +import { MockServer, createMockServer } from '@nocobase/test'; +import Migration from '../../migrations/20240424131556-rename'; + +describe('rename', () => { + let app: MockServer; + let repo: Repository; + + beforeEach(async () => { + app = await createMockServer({ + version: '0.21.0-alpha.15', + }); + repo = app.db.getRepository('applicationPlugins'); + }); + + afterEach(async () => { + await app.db.clean({ drop: true }); + await app.destroy(); + }); + + it('should rename', async () => { + const plugin = await repo.create({ + values: { + name: 'collection-manager', + version: '0.21.0-alpha.15', + enabled: true, + installed: true, + builtIn: true, + }, + }); + const migration = new Migration({ + // @ts-ignore + app, + }); + await migration.up(); + const p = await repo.findOne({ + filter: { + id: plugin.id, + }, + }); + expect(p.name).toBe('data-source-main'); + expect(p.packageName).toBe('@nocobase/plugin-data-source-main'); + }); +}); diff --git a/packages/presets/nocobase/src/server/index.ts b/packages/presets/nocobase/src/server/index.ts index e9fa4a8702..bfd5be1af7 100644 --- a/packages/presets/nocobase/src/server/index.ts +++ b/packages/presets/nocobase/src/server/index.ts @@ -5,16 +5,16 @@ export class PresetNocoBase extends Plugin { builtInPlugins = [ 'data-source-manager', 'error-handler', - 'collection-manager', + 'data-source-main', 'ui-schema-storage', // 'ui-routes-storage', 'file-manager', 'system-settings', - 'sequence-field', + 'field-sequence', 'verification', 'users', 'acl', - 'china-region', + 'field-china-region', 'workflow', 'workflow-action-trigger', 'workflow-aggregate', @@ -26,15 +26,15 @@ export class PresetNocoBase extends Plugin { 'workflow-request', 'workflow-sql', 'client', - 'export', - 'import', + 'action-import', + 'action-export', 'backup-restore', - 'iframe-block', - 'formula-field', + 'block-iframe', + 'field-formula', 'data-visualization', 'auth', 'logger', - 'custom-request', + 'action-custom-request', 'calendar', 'action-bulk-update', 'action-bulk-edit', @@ -48,18 +48,15 @@ export class PresetNocoBase extends Plugin { 'multi-app-manager>=0.7.0-alpha.1', // 'audit-logs>=0.7.1-alpha.4', 'map>=0.8.1-alpha.3', - 'saml>=0.8.1-alpha.3', // 'snapshot-field>=0.8.1-alpha.3', 'graph-collection-manager>=0.9.0-alpha.1', - 'multi-app-share-collection>=0.9.2-alpha.1', - 'oidc>=0.9.2-alpha.1', + // 'multi-app-share-collection>=0.9.2-alpha.1', 'mobile-client>=0.10.0-alpha.2', 'api-keys>=0.10.1-alpha.1', - 'localization-management>=0.11.1-alpha.1', + 'localization>=0.11.1-alpha.1', 'theme-editor>=0.11.1-alpha.1', 'api-doc>=0.13.0-alpha.1', - 'cas>=0.13.0-alpha.5', - 'sms-auth>=0.10.0-alpha.2', + 'auth-sms>=0.10.0-alpha.2', 'field-markdown-vditor>=0.21.0-alpha.16', ]; diff --git a/packages/presets/nocobase/src/server/migrations/20240424125531-pro-plugins-detect.ts b/packages/presets/nocobase/src/server/migrations/20240424125531-pro-plugins-detect.ts new file mode 100644 index 0000000000..5e8b2b14ff --- /dev/null +++ b/packages/presets/nocobase/src/server/migrations/20240424125531-pro-plugins-detect.ts @@ -0,0 +1,92 @@ +import { Migration, PluginManager } from '@nocobase/server'; +import { getAutoDeletePluginsWarning, getNotExistsEnabledPluginsError } from '../wording'; + +export default class extends Migration { + on = 'beforeLoad'; // 'beforeLoad' or 'afterLoad' + appVersion = '<1.0.0-alpha.1'; + + oldNames = ['oidc', 'cas', 'saml']; + + async getSystemLang() { + const repo = this.db.getRepository('systemSettings'); + if (!repo) { + return 'en-US'; + } + const systemSettings = await repo.findOne(); + if (!systemSettings) { + return 'en-US'; + } + return systemSettings.enabledLanguages?.[0] || process.env.APP_LANG || 'en-US'; + } + + async processRemovedPlugins() { + const repository = this.pm.repository; + const plugins = await repository.find({ + filter: { + name: { + $in: this.oldNames, + }, + }, + }); + if (!plugins.length) { + return; + } + const pluginsToBeDeleted = plugins.filter((plugin: { enabled: boolean }) => !plugin.enabled); + if (pluginsToBeDeleted.length) { + await repository.destroy({ + filter: { + name: { + $in: pluginsToBeDeleted.map((plugin: { name: string }) => plugin.name), + }, + }, + }); + this.app.log.warn( + getAutoDeletePluginsWarning( + pluginsToBeDeleted.map((plugin: { name: string; packageName?: string }) => plugin.packageName || plugin.name), + ), + ); + } + + const enabledPlugins = plugins.filter((plugin: { enabled: boolean }) => plugin.enabled); + if (!enabledPlugins.length) { + return; + } + await this.sequelize.transaction(async (t) => { + for (const plugin of enabledPlugins) { + await repository.update({ + filter: { + name: plugin.name, + }, + values: { + name: `auth-${plugin.name}`, + packageName: `@nocobase/plugin-auth-${plugin.name}`, + }, + transaction: t, + }); + } + + const notExistsEnabledPlugins = new Map(); + for (const plugin of enabledPlugins) { + try { + await PluginManager.getPackageName(`auth-${plugin.name}`); + } catch (error) { + notExistsEnabledPlugins.set(plugin.name, plugin.packageName || plugin.name); + } + } + if (!notExistsEnabledPlugins.size) { + return; + } + const lang = await this.getSystemLang(); + const errMsg = getNotExistsEnabledPluginsError(notExistsEnabledPlugins, this.app.name); + const error = new Error(errMsg[lang]) as any; + error.stack = undefined; + error.cause = undefined; + error.onlyLogCause = true; + throw error; + }); + } + + async up() { + await this.processRemovedPlugins(); + } +} diff --git a/packages/presets/nocobase/src/server/migrations/20240424131556-rename.ts b/packages/presets/nocobase/src/server/migrations/20240424131556-rename.ts new file mode 100644 index 0000000000..a4c4b36f6c --- /dev/null +++ b/packages/presets/nocobase/src/server/migrations/20240424131556-rename.ts @@ -0,0 +1,32 @@ +import { Migration } from '@nocobase/server'; + +export default class extends Migration { + on = 'beforeLoad'; // 'beforeLoad' or 'afterLoad' + appVersion = '<1.0.0-alpha.1'; + + async up() { + const names = { + 'collection-manager': '@nocobase/plugin-data-source-main', + 'china-region': '@nocobase/plugin-field-china-region', + 'custom-request': '@nocobase/plugin-action-custom-request', + export: '@nocobase/plugin-action-export', + import: '@nocobase/plugin-action-import', + 'formula-field': '@nocobase/plugin-field-formula', + 'iframe-block': '@nocobase/plugin-block-iframe', + 'localization-management': '@nocobase/plugin-localization', + 'sequence-field': '@nocobase/plugin-field-sequence', + 'sms-auth': '@nocobase/plugin-auth-sms', + }; + for (const original of Object.keys(names)) { + await this.pm.repository.update({ + filter: { + name: original, + }, + values: { + name: names[original].replace('@nocobase/plugin-', ''), + packageName: names[original], + }, + }); + } + } +} diff --git a/packages/presets/nocobase/src/server/wording.ts b/packages/presets/nocobase/src/server/wording.ts new file mode 100644 index 0000000000..2aee9311c0 --- /dev/null +++ b/packages/presets/nocobase/src/server/wording.ts @@ -0,0 +1,34 @@ +export const getAutoDeletePluginsWarning = (plugins: string[]) => { + return `The following plugins have been automatically removed from the database as they no longer exist and are not enabled: ${plugins.join( + ',', + )}. You can reinstall it using the plugin package at any time.`; +}; + +export const getNotExistsEnabledPluginsError = (plugins: Map, app: string) => { + const pluginNames = Array.from(plugins.keys()).map((name) => plugins.get(name) || name); + const appOption = app === 'main' ? '' : ` --app ${app}`; + const removeCmds = `yarn pm remove ${Array.from(plugins.keys()).join(' ')} --force${appOption}`; + const enErrMsg = ` +The following plugins you are currently using will become commercial plugins after the upgrade: +${pluginNames.join(', ')} + +💎 If you are interested in purchasing, please visit: https://www.nocobase.com/commercial.html for more detail. + +If you decide not to use them anymore, please delete them from the "applicationPlugins" table. You can use the command: +${removeCmds} +`; + const cnErrMsg = ` +以下您正在使用的插件在升级后将变为商业插件: +${pluginNames.join(', ')} + +💎 如果您有购买意向,请访问: https://www.nocobase.com/commercial.html 了解详情。 + +如果您决定不再使用它们,请将这些插件记录从 "applicationPlugins" 表中删除。你可以使用命令: +${removeCmds} +`; + + return { + 'en-US': enErrMsg, + 'zh-CN': cnErrMsg, + }; +}; diff --git a/yarn.lock b/yarn.lock index dc7c9fed85..5e4c1442d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4609,23 +4609,6 @@ dependencies: eslint-scope "5.1.1" -"@node-saml/node-saml@^4.0.2": - version "4.0.5" - resolved "https://registry.npmmirror.com/@node-saml/node-saml/-/node-saml-4.0.5.tgz#039e387095b54639b06df62b1b4a6d8941c6d907" - integrity sha512-J5DglElbY1tjOuaR1NPtjOXkXY5bpUhDoKVoeucYN98A3w4fwgjIOPqIGcb6cQsqFq2zZ6vTCeKn5C/hvefSaw== - dependencies: - "@types/debug" "^4.1.7" - "@types/passport" "^1.0.11" - "@types/xml-crypto" "^1.4.2" - "@types/xml-encryption" "^1.2.1" - "@types/xml2js" "^0.4.11" - "@xmldom/xmldom" "^0.8.6" - debug "^4.3.4" - xml-crypto "^3.0.1" - xml-encryption "^3.0.2" - xml2js "^0.5.0" - xmlbuilder "^15.1.1" - "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -4865,15 +4848,6 @@ dependencies: "@opentelemetry/semantic-conventions" "1.19.0" -"@opentelemetry/exporter-prometheus@^0.46.0": - version "0.46.0" - resolved "https://registry.npmmirror.com/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.46.0.tgz#c411a1e8a5266f9f3ddc44a088a538c3c1ee4830" - integrity sha512-AXcoCHG31K2PLGizlJJWcfQqZsGfUZkT7ik6C8VJu7U2Cenk0Xhvd3rO+vVNSSjP1+LHkP4MQtqEXpIZttw5cw== - dependencies: - "@opentelemetry/core" "1.19.0" - "@opentelemetry/resources" "1.19.0" - "@opentelemetry/sdk-metrics" "1.19.0" - "@opentelemetry/instrumentation@^0.46.0": version "0.46.0" resolved "https://registry.npmmirror.com/@opentelemetry/instrumentation/-/instrumentation-0.46.0.tgz#a8a252306f82e2eace489312798592a14eb9830e" @@ -4907,7 +4881,7 @@ "@opentelemetry/core" "1.19.0" "@opentelemetry/semantic-conventions" "1.19.0" -"@opentelemetry/sdk-metrics@1.19.0", "@opentelemetry/sdk-metrics@^1.19.0": +"@opentelemetry/sdk-metrics@^1.19.0": version "1.19.0" resolved "https://registry.npmmirror.com/@opentelemetry/sdk-metrics/-/sdk-metrics-1.19.0.tgz#fe8029af29402563eb8dba75a85fc02006ea92c4" integrity sha512-FiMii40zr0Fmys4F1i8gmuCvbinBnBsDeGBr4FQemOf0iPCLytYQm5AZJ/nn4xSc71IgKBQwTFQRAGJI7JvZ4Q== @@ -6395,7 +6369,7 @@ resolved "https://registry.npmmirror.com/@types/date-arithmetic/-/date-arithmetic-4.1.4.tgz#bdb441f61a916f11af1874a8c2cf787f77ffcb94" integrity sha512-p9eZ2X9B80iKiTW4ukVj8B4K6q9/+xFtQ5MGYA5HWToY9nL4EkhV9+6ftT2VHpVMEZb5Tv00Iel516bVdO+yRw== -"@types/debug@^4.0.0", "@types/debug@^4.1.7", "@types/debug@^4.1.8": +"@types/debug@^4.0.0", "@types/debug@^4.1.8": version "4.1.12" resolved "https://registry.npmmirror.com/@types/debug/-/debug-4.1.12.tgz#a155f21690871953410df4b6b6f53187f0500917" integrity sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ== @@ -6472,11 +6446,6 @@ resolved "https://registry.npmmirror.com/@types/geojson/-/geojson-7946.0.13.tgz#e6e77ea9ecf36564980a861e24e62a095988775e" integrity sha512-bmrNrgKMOhM3WsafmbGmC+6dsF2Z308vLFsQ3a/bT8X8Sv5clVYpPars/UPq+sAaJP+5OoLAYgwbkS5QEJdLUQ== -"@types/geojson@^7946.0.14": - version "7946.0.14" - resolved "https://registry.npmmirror.com/@types/geojson/-/geojson-7946.0.14.tgz#319b63ad6df705ee2a65a73ef042c8271e696613" - integrity sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg== - "@types/glob-stream@*": version "8.0.2" resolved "https://registry.npmmirror.com/@types/glob-stream/-/glob-stream-8.0.2.tgz#56234435cd20f9b7b08c993be9267d661f9b914d" @@ -6790,13 +6759,6 @@ resolved "https://registry.npmmirror.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw== -"@types/node@^20.11.17": - version "20.12.2" - resolved "https://registry.npmmirror.com/@types/node/-/node-20.12.2.tgz#9facdd11102f38b21b4ebedd9d7999663343d72e" - integrity sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ== - dependencies: - undici-types "~5.26.4" - "@types/nodemailer@6.4.4": version "6.4.4" resolved "https://registry.npmmirror.com/@types/nodemailer/-/nodemailer-6.4.4.tgz#c265f7e7a51df587597b3a49a023acaf0c741f4b" @@ -6824,22 +6786,6 @@ resolved "https://registry.npmmirror.com/@types/parse5/-/parse5-6.0.3.tgz#705bb349e789efa06f43f128cef51240753424cb" integrity sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g== -"@types/passport@^1.0.11": - version "1.0.16" - resolved "https://registry.npmmirror.com/@types/passport/-/passport-1.0.16.tgz#5a2918b180a16924c4d75c31254c31cdca5ce6cf" - integrity sha512-FD0qD5hbPWQzaM0wHUnJ/T0BBCJBxCeemtnCwc/ThhTg3x9jfrAcRUmj5Dopza+MfFS9acTe3wk7rcVnRIp/0A== - dependencies: - "@types/express" "*" - -"@types/pg@^8.10.9": - version "8.11.4" - resolved "https://registry.npmmirror.com/@types/pg/-/pg-8.11.4.tgz#befbe4dc0c14aa31acf86bbce83641b73ff838a7" - integrity sha512-yw3Bwbda6vO+NvI1Ue/YKOwtl31AYvvd/e73O3V4ZkNzuGpTDndLSyc0dQRB2xrQqDePd20pEGIfqSp/GH3pRw== - dependencies: - "@types/node" "*" - pg-protocol "*" - pg-types "^4.0.1" - "@types/picomatch@*": version "2.3.3" resolved "https://registry.npmmirror.com/@types/picomatch/-/picomatch-2.3.3.tgz#be60498568c19e989e43fb39aa84be1ed3655e92" @@ -7080,22 +7026,7 @@ dependencies: "@types/node" "*" -"@types/xml-crypto@^1.4.2": - version "1.4.6" - resolved "https://registry.npmmirror.com/@types/xml-crypto/-/xml-crypto-1.4.6.tgz#6d1fd7d41c91554f2aed97c2ba273af0388fa5cf" - integrity sha512-A6jEW2FxLZo1CXsRWnZHUX2wzR3uDju2Bozt6rDbSmU/W8gkilaVbwFEVN0/NhnUdMVzwYobWtM6bU1QJJFb7Q== - dependencies: - "@types/node" "*" - xpath "0.0.27" - -"@types/xml-encryption@^1.2.1": - version "1.2.4" - resolved "https://registry.npmmirror.com/@types/xml-encryption/-/xml-encryption-1.2.4.tgz#0eceea58c82a89f62c0a2dc383a6461dfc2fe1ba" - integrity sha512-I69K/WW1Dv7j6O3jh13z0X8sLWJRXbu5xnHDl9yHzUNDUBtUoBY058eb5s+x/WG6yZC1h8aKdI2EoyEPjyEh+Q== - dependencies: - "@types/node" "*" - -"@types/xml2js@^0.4.11", "@types/xml2js@^0.4.5": +"@types/xml2js@^0.4.5": version "0.4.14" resolved "https://registry.npmmirror.com/@types/xml2js/-/xml2js-0.4.14.tgz#5d462a2a7330345e2309c6b549a183a376de8f9a" integrity sha512-4YnrRemBShWRO2QjvUin8ESA41rH+9nQGLUGZV/1IDhi3SL9OhdpNC/MrulTWuptXKwhx/aDxE7toV0f/ypIXQ== @@ -7754,11 +7685,6 @@ loupe "^2.3.7" pretty-format "^29.7.0" -"@xmldom/xmldom@^0.8.5", "@xmldom/xmldom@^0.8.6", "@xmldom/xmldom@^0.8.8": - version "0.8.10" - resolved "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz#a1337ca426aa61cef9fe15b5b28e340a72f6fa99" - integrity sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw== - "@zeit/schemas@2.6.0": version "2.6.0" resolved "https://registry.npmmirror.com/@zeit/schemas/-/schemas-2.6.0.tgz#004e8e553b4cd53d538bd38eac7bcbf58a867fe3" @@ -9020,7 +8946,7 @@ bessel@^1.0.2: resolved "https://registry.npmmirror.com/bessel/-/bessel-1.0.2.tgz#828812291e0b62e94959cdea43fac186e8a7202d" integrity sha512-Al3nHGQGqDYqqinXhQzmwmcRToe/3WyBv4N8aZc5Pef8xw2neZlR9VPi84Sa23JtgWcucu18HxVZrnI0fn2etw== -big-integer@^1.6.44, big-integer@^1.6.48: +big-integer@^1.6.44: version "1.6.52" resolved "https://registry.npmmirror.com/big-integer/-/big-integer-1.6.52.tgz#60a887f3047614a8e1bffe5d7173490a97dc8c85" integrity sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg== @@ -11851,7 +11777,7 @@ delegates@^1.0.0: resolved "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== -denque@^2.0.1, denque@^2.1.0: +denque@^2.0.1: version "2.1.0" resolved "https://registry.npmmirror.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1" integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== @@ -16451,16 +16377,6 @@ jest-worker@^29.7.0: merge-stream "^2.0.0" supports-color "^8.0.0" -jmespath@^0.16.0: - version "0.16.0" - resolved "https://registry.npmmirror.com/jmespath/-/jmespath-0.16.0.tgz#b15b0a85dfd4d930d43e69ed605943c802785076" - integrity sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw== - -jose@^4.15.1: - version "4.15.4" - resolved "https://registry.npmmirror.com/jose/-/jose-4.15.4.tgz#02a9a763803e3872cf55f29ecef0dfdcc218cc03" - integrity sha512-W+oqK4H+r5sITxfxpSU+MMdr/YSWGvgZMQDIsNoBDGGy4i7GBPTtvFKibQzW06n3U3TqHjhvBJsirShsEJ6eeQ== - joycon@^3.0.1: version "3.1.1" resolved "https://registry.npmmirror.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03" @@ -16650,11 +16566,6 @@ json5@^2.1.2, json5@^2.2.2, json5@^2.2.3: resolved "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonata@^2.0.3: - version "2.0.4" - resolved "https://registry.npmmirror.com/jsonata/-/jsonata-2.0.4.tgz#d8575d4c7695a2086162a2baebce0f0ee4e84fdb" - integrity sha512-vfavX4/G/yrYxE+UrmT/oUJ3ph7KqUrb0R7b0LVRcntQwxw+Z5kA1pNUIQzX5hF04Oe1eKxyoIPsmXtc2LgJTQ== - jsonc-parser@^3.2.0: version "3.2.0" resolved "https://registry.npmmirror.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" @@ -16688,11 +16599,6 @@ jsonparse@^1.2.0, jsonparse@^1.3.1: resolved "https://registry.npmmirror.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -jsonpath-plus@^7.2.0: - version "7.2.0" - resolved "https://registry.npmmirror.com/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz#7ad94e147b3ed42f7939c315d2b9ce490c5a3899" - integrity sha512-zBfiUPM5nD0YZSBT/o/fbCUlCcepMIdP0CJZxM1+KgA4f2T206f6VAg9e7mX35+KlMaIc5qXW34f3BnwJ3w+RA== - jsonwebtoken@^8.5.1: version "8.5.1" resolved "https://registry.npmmirror.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" @@ -17464,7 +17370,7 @@ long@^4.0.0: resolved "https://registry.npmmirror.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== -long@^5.2.0, long@^5.2.1: +long@^5.2.0: version "5.2.3" resolved "https://registry.npmmirror.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== @@ -17510,7 +17416,7 @@ lowercase-keys@^2.0.0: resolved "https://registry.npmmirror.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== -lru-cache@8.0.5, lru-cache@^8.0.0: +lru-cache@8.0.5: version "8.0.5" resolved "https://registry.npmmirror.com/lru-cache/-/lru-cache-8.0.5.tgz#983fe337f3e176667f8e567cfcce7cb064ea214e" integrity sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA== @@ -17520,11 +17426,6 @@ lru-cache@^10.0.2: resolved "https://registry.npmmirror.com/lru-cache/-/lru-cache-10.1.0.tgz#2098d41c2dc56500e6c88584aa656c84de7d0484" integrity sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag== -lru-cache@^10.2.0: - version "10.2.0" - resolved "https://registry.npmmirror.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3" - integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== - lru-cache@^4.0.1, lru-cache@^4.1.1: version "4.1.5" resolved "https://registry.npmmirror.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" @@ -17736,17 +17637,6 @@ mariadb@^2.5.6: moment-timezone "^0.5.34" please-upgrade-node "^3.2.0" -mariadb@^3.3.0: - version "3.3.0" - resolved "https://registry.npmmirror.com/mariadb/-/mariadb-3.3.0.tgz#e9c844965d616a1842fa05221206e8678842c09e" - integrity sha512-sAL4bJgbfCAtXcE8bXI+NAMzVaPNkIU8hRZUXYfgNFoWB9U57G3XQiMeCx/A6IrS6y7kGwBLylrwgsZQ8kUYlw== - dependencies: - "@types/geojson" "^7946.0.14" - "@types/node" "^20.11.17" - denque "^2.1.0" - iconv-lite "^0.6.3" - lru-cache "^10.2.0" - markdown-it-highlightjs@3.3.1: version "3.3.1" resolved "https://registry.npmmirror.com/markdown-it-highlightjs/-/markdown-it-highlightjs-3.3.1.tgz#38403610487292b8a1ae2d1acc7bb66e4ede6be8" @@ -18916,20 +18806,6 @@ mysql2@^2.3.3: seq-queue "^0.0.5" sqlstring "^2.3.2" -mysql2@^3.9.1: - version "3.9.3" - resolved "https://registry.npmmirror.com/mysql2/-/mysql2-3.9.3.tgz#72a5e0c90d78ec2d8f9846e83727067c0cc8c25e" - integrity sha512-+ZaoF0llESUy7BffccHG+urErHcWPZ/WuzYAA9TEeLaDYyke3/3D+VQDzK9xzRnXpd0eMtRf0WNOeo4Q1Baung== - dependencies: - denque "^2.1.0" - generate-function "^2.3.1" - iconv-lite "^0.6.3" - long "^5.2.1" - lru-cache "^8.0.0" - named-placeholders "^1.1.3" - seq-queue "^0.0.5" - sqlstring "^2.3.2" - mz@^2.7.0: version "2.7.0" resolved "https://registry.npmmirror.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" @@ -18939,7 +18815,7 @@ mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" -named-placeholders@^1.1.2, named-placeholders@^1.1.3: +named-placeholders@^1.1.2: version "1.1.3" resolved "https://registry.npmmirror.com/named-placeholders/-/named-placeholders-1.1.3.tgz#df595799a36654da55dda6152ba7a137ad1d9351" integrity sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w== @@ -19171,13 +19047,6 @@ node-releases@^2.0.14: resolved "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== -node-sql-parser@^4.11.0: - version "4.18.0" - resolved "https://registry.npmmirror.com/node-sql-parser/-/node-sql-parser-4.18.0.tgz#516b6e633c55c5abbba1ca588ab372db81ae9318" - integrity sha512-2YEOR5qlI1zUFbGMLKNfsrR5JUvFg9LxIRVE+xJe962pfVLH0rnItqLzv96XVs1Y1UIR8FxsXAuvX/lYAWZ2BQ== - dependencies: - big-integer "^1.6.48" - node-xlsx@^0.16.1: version "0.16.2" resolved "https://registry.npmmirror.com/node-xlsx/-/node-xlsx-0.16.2.tgz#40f580187eae0e032cac96e958e97cb6ceca09f6" @@ -19487,7 +19356,7 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-hash@^2.0.1, object-hash@^2.2.0: +object-hash@^2.0.1: version "2.2.0" resolved "https://registry.npmmirror.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== @@ -19641,16 +19510,11 @@ object.values@^1.1.6, object.values@^1.1.7: define-properties "^1.2.0" es-abstract "^1.22.1" -obuf@^1.0.0, obuf@^1.1.2, obuf@~1.1.2: +obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" resolved "https://registry.npmmirror.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== -oidc-token-hash@^5.0.3: - version "5.0.3" - resolved "https://registry.npmmirror.com/oidc-token-hash/-/oidc-token-hash-5.0.3.tgz#9a229f0a1ce9d4fc89bcaee5478c97a889e7b7b6" - integrity sha512-IF4PcGgzAr6XXSff26Sk/+P4KZFJVuHAJZj3wgO3vX2bMdNVp/QXTP3P7CEm9V1IdG8lDLY3HhiqpsE/nOwpPw== - omit-deep@0.3.0: version "0.3.0" resolved "https://registry.npmmirror.com/omit-deep/-/omit-deep-0.3.0.tgz#21c8af3499bcadd29651a232cbcacbc52445ebec" @@ -19747,16 +19611,6 @@ open@^9.1.0: is-inside-container "^1.0.0" is-wsl "^2.2.0" -openid-client@^5.4.2: - version "5.6.1" - resolved "https://registry.npmmirror.com/openid-client/-/openid-client-5.6.1.tgz#8f7526a50c290a5e28a7fe21b3ece3107511bc73" - integrity sha512-PtrWsY+dXg6y8mtMPyL/namZSYVz8pjXz3yJiBNZsEdCnu9miHLB4ELVC85WvneMKo2Rg62Ay7NkuCpM0bgiLQ== - dependencies: - jose "^4.15.1" - lru-cache "^6.0.0" - object-hash "^2.2.0" - oidc-token-hash "^5.0.3" - opt-cli@1.5.1: version "1.5.1" resolved "https://registry.npmmirror.com/opt-cli/-/opt-cli-1.5.1.tgz#04db447b13c96b992eb31685266f4ed0d9736dc2" @@ -20470,21 +20324,11 @@ pg-int8@1.0.1: resolved "https://registry.npmmirror.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== -pg-numeric@1.0.2: - version "1.0.2" - resolved "https://registry.npmmirror.com/pg-numeric/-/pg-numeric-1.0.2.tgz#816d9a44026086ae8ae74839acd6a09b0636aa3a" - integrity sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw== - pg-pool@^3.6.1: version "3.6.1" resolved "https://registry.npmmirror.com/pg-pool/-/pg-pool-3.6.1.tgz#5a902eda79a8d7e3c928b77abf776b3cb7d351f7" integrity sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og== -pg-protocol@*: - version "1.6.1" - resolved "https://registry.npmmirror.com/pg-protocol/-/pg-protocol-1.6.1.tgz#21333e6d83b01faaebfe7a33a7ad6bfd9ed38cb3" - integrity sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg== - pg-protocol@^1.6.0: version "1.6.0" resolved "https://registry.npmmirror.com/pg-protocol/-/pg-protocol-1.6.0.tgz#4c91613c0315349363af2084608db843502f8833" @@ -20501,19 +20345,6 @@ pg-types@^2.1.0: postgres-date "~1.0.4" postgres-interval "^1.1.0" -pg-types@^4.0.1: - version "4.0.2" - resolved "https://registry.npmmirror.com/pg-types/-/pg-types-4.0.2.tgz#399209a57c326f162461faa870145bb0f918b76d" - integrity sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng== - dependencies: - pg-int8 "1.0.1" - pg-numeric "1.0.2" - postgres-array "~3.0.1" - postgres-bytea "~3.0.0" - postgres-date "~2.1.0" - postgres-interval "^3.0.0" - postgres-range "^1.1.1" - pg@^8.11.3, pg@^8.7.3: version "8.11.3" resolved "https://registry.npmmirror.com/pg/-/pg-8.11.3.tgz#d7db6e3fe268fcedd65b8e4599cda0b8b4bf76cb" @@ -21112,33 +20943,16 @@ postgres-array@~2.0.0: resolved "https://registry.npmmirror.com/postgres-array/-/postgres-array-2.0.0.tgz#48f8fce054fbc69671999329b8834b772652d82e" integrity sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA== -postgres-array@~3.0.1: - version "3.0.2" - resolved "https://registry.npmmirror.com/postgres-array/-/postgres-array-3.0.2.tgz#68d6182cb0f7f152a7e60dc6a6889ed74b0a5f98" - integrity sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog== - postgres-bytea@~1.0.0: version "1.0.0" resolved "https://registry.npmmirror.com/postgres-bytea/-/postgres-bytea-1.0.0.tgz#027b533c0aa890e26d172d47cf9ccecc521acd35" integrity sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w== -postgres-bytea@~3.0.0: - version "3.0.0" - resolved "https://registry.npmmirror.com/postgres-bytea/-/postgres-bytea-3.0.0.tgz#9048dc461ac7ba70a6a42d109221619ecd1cb089" - integrity sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw== - dependencies: - obuf "~1.1.2" - postgres-date@~1.0.4: version "1.0.7" resolved "https://registry.npmmirror.com/postgres-date/-/postgres-date-1.0.7.tgz#51bc086006005e5061c591cee727f2531bf641a8" integrity sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q== -postgres-date@~2.1.0: - version "2.1.0" - resolved "https://registry.npmmirror.com/postgres-date/-/postgres-date-2.1.0.tgz#b85d3c1fb6fb3c6c8db1e9942a13a3bf625189d0" - integrity sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA== - postgres-interval@^1.1.0: version "1.2.0" resolved "https://registry.npmmirror.com/postgres-interval/-/postgres-interval-1.2.0.tgz#b460c82cb1587507788819a06aa0fffdb3544695" @@ -21146,16 +20960,6 @@ postgres-interval@^1.1.0: dependencies: xtend "^4.0.0" -postgres-interval@^3.0.0: - version "3.0.0" - resolved "https://registry.npmmirror.com/postgres-interval/-/postgres-interval-3.0.0.tgz#baf7a8b3ebab19b7f38f07566c7aab0962f0c86a" - integrity sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw== - -postgres-range@^1.1.1: - version "1.1.4" - resolved "https://registry.npmmirror.com/postgres-range/-/postgres-range-1.1.4.tgz#a59c5f9520909bcec5e63e8cf913a92e4c952863" - integrity sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w== - prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -23455,28 +23259,6 @@ sequelize@^6.26.0: validator "^13.9.0" wkx "^0.5.0" -sequelize@^6.35.0: - version "6.37.2" - resolved "https://registry.npmmirror.com/sequelize/-/sequelize-6.37.2.tgz#f98052f81c40c26ba85382fcb35e7346308542f4" - integrity sha512-bnb7swGANONXCTrVyebpOOZssLwQrVkYX2tcC6qOIvH+P+OhsoMBi7c3GXI5bC+Z4b4tOl+kQy6yeqLCZ1YQAQ== - dependencies: - "@types/debug" "^4.1.8" - "@types/validator" "^13.7.17" - debug "^4.3.4" - dottie "^2.0.6" - inflection "^1.13.4" - lodash "^4.17.21" - moment "^2.29.4" - moment-timezone "^0.5.43" - pg-connection-string "^2.6.1" - retry-as-promised "^7.0.4" - semver "^7.5.4" - sequelize-pool "^7.1.0" - toposort-class "^1.0.1" - uuid "^8.3.2" - validator "^13.9.0" - wkx "^0.5.0" - serve-handler@6.1.3: version "6.1.3" resolved "https://registry.npmmirror.com/serve-handler/-/serve-handler-6.1.3.tgz#1bf8c5ae138712af55c758477533b9117f6435e8" @@ -26800,23 +26582,6 @@ xlsx@^0.17.0: wmf "~1.0.1" word "~0.3.0" -xml-crypto@^3.0.1: - version "3.2.0" - resolved "https://registry.npmmirror.com/xml-crypto/-/xml-crypto-3.2.0.tgz#a9debab572c8e895cff5fb351a8d8be3f6e1962e" - integrity sha512-qVurBUOQrmvlgmZqIVBqmb06TD2a/PpEUfFPgD7BuBfjmoH4zgkqaWSIJrnymlCvM2GGt9x+XtJFA+ttoAufqg== - dependencies: - "@xmldom/xmldom" "^0.8.8" - xpath "0.0.32" - -xml-encryption@^3.0.2: - version "3.0.2" - resolved "https://registry.npmmirror.com/xml-encryption/-/xml-encryption-3.0.2.tgz#d3cb67d97cdd9673313a42cc0d7fa43ff0886c21" - integrity sha512-VxYXPvsWB01/aqVLd6ZMPWZ+qaj0aIdF+cStrVJMcFj3iymwZeI0ABzB3VqMYv48DkSpRhnrXqTUkR34j+UDyg== - dependencies: - "@xmldom/xmldom" "^0.8.5" - escape-html "^1.0.3" - xpath "0.0.32" - xml-lexer@^0.2.2: version "0.2.2" resolved "https://registry.npmmirror.com/xml-lexer/-/xml-lexer-0.2.2.tgz#518193a4aa334d58fc7d248b549079b89907e046" @@ -26845,14 +26610,6 @@ xml2js@^0.4.22: sax ">=0.6.0" xmlbuilder "~11.0.0" -xml2js@^0.5.0: - version "0.5.0" - resolved "https://registry.npmmirror.com/xml2js/-/xml2js-0.5.0.tgz#d9440631fbb2ed800203fad106f2724f62c493b7" - integrity sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA== - dependencies: - sax ">=0.6.0" - xmlbuilder "~11.0.0" - xml2js@^0.6.2: version "0.6.2" resolved "https://registry.npmmirror.com/xml2js/-/xml2js-0.6.2.tgz#dd0b630083aa09c161e25a4d0901e2b2a929b499" @@ -26861,11 +26618,6 @@ xml2js@^0.6.2: sax ">=0.6.0" xmlbuilder "~11.0.0" -xmlbuilder@^15.1.1: - version "15.1.1" - resolved "https://registry.npmmirror.com/xmlbuilder/-/xmlbuilder-15.1.1.tgz#9dcdce49eea66d8d10b42cae94a79c3c8d0c2ec5" - integrity sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg== - xmlbuilder@~11.0.0: version "11.0.1" resolved "https://registry.npmmirror.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" @@ -26876,16 +26628,6 @@ xmlchars@^2.2.0: resolved "https://registry.npmmirror.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== -xpath@0.0.27: - version "0.0.27" - resolved "https://registry.npmmirror.com/xpath/-/xpath-0.0.27.tgz#dd3421fbdcc5646ac32c48531b4d7e9d0c2cfa92" - integrity sha512-fg03WRxtkCV6ohClePNAECYsmpKKTv5L8y/X3Dn1hQrec3POx2jHZ/0P2qQ6HvsrU1BmeqXcof3NGGueG6LxwQ== - -xpath@0.0.32: - version "0.0.32" - resolved "https://registry.npmmirror.com/xpath/-/xpath-0.0.32.tgz#1b73d3351af736e17ec078d6da4b8175405c48af" - integrity sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw== - xpipe@^1.0.5: version "1.0.5" resolved "https://registry.npmmirror.com/xpipe/-/xpipe-1.0.5.tgz#8dd8bf45fc3f7f55f0e054b878f43a62614dafdf"