@nocobase/plugin-data-source-main 1.2.13-alpha → 1.3.0-alpha.20240710084543
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/dist/client/index.d.ts +0 -13
- package/dist/client/index.js +0 -10
- package/dist/externalVersion.js +0 -21
- package/dist/index.d.ts +0 -10
- package/dist/index.js +0 -48
- package/dist/locale/en-US.json +0 -4
- package/dist/locale/zh-CN.json +0 -4
- package/dist/server/collections/collectionCategories.d.ts +0 -11
- package/dist/server/collections/collectionCategories.js +0 -61
- package/dist/server/collections/collections.d.ts +0 -11
- package/dist/server/collections/collections.js +0 -101
- package/dist/server/collections/fields.d.ts +0 -11
- package/dist/server/collections/fields.js +0 -103
- package/dist/server/errors/field-is-depended-on-by-other.d.ts +0 -12
- package/dist/server/errors/field-is-depended-on-by-other.js +0 -44
- package/dist/server/errors/field-name-exists-error.d.ts +0 -13
- package/dist/server/errors/field-name-exists-error.js +0 -45
- package/dist/server/hooks/afterCreateForForeignKeyField.d.ts +0 -10
- package/dist/server/hooks/afterCreateForForeignKeyField.js +0 -217
- package/dist/server/hooks/afterCreateForReverseField.d.ts +0 -12
- package/dist/server/hooks/afterCreateForReverseField.js +0 -46
- package/dist/server/hooks/afterDestroyForForeignKeyField.d.ts +0 -10
- package/dist/server/hooks/afterDestroyForForeignKeyField.js +0 -98
- package/dist/server/hooks/beforeCreateForChildrenCollection.d.ts +0 -13
- package/dist/server/hooks/beforeCreateForChildrenCollection.js +0 -67
- package/dist/server/hooks/beforeCreateForReverseField.d.ts +0 -12
- package/dist/server/hooks/beforeCreateForReverseField.js +0 -73
- package/dist/server/hooks/beforeCreateForValidateField.d.ts +0 -15
- package/dist/server/hooks/beforeCreateForValidateField.js +0 -76
- package/dist/server/hooks/beforeCreateForViewCollection.d.ts +0 -13
- package/dist/server/hooks/beforeCreateForViewCollection.js +0 -39
- package/dist/server/hooks/beforeDestoryField.d.ts +0 -2
- package/dist/server/hooks/beforeDestoryField.js +0 -80
- package/dist/server/hooks/beforeDestroyForeignKey.d.ts +0 -10
- package/dist/server/hooks/beforeDestroyForeignKey.js +0 -75
- package/dist/server/hooks/beforeInitOptions.d.ts +0 -23
- package/dist/server/hooks/beforeInitOptions.js +0 -137
- package/dist/server/hooks/index.d.ts +0 -13
- package/dist/server/hooks/index.js +0 -38
- package/dist/server/index.d.ts +0 -12
- package/dist/server/index.js +0 -54
- package/dist/server/migrations/20220613103214-alert-sub-table.d.ts +0 -13
- package/dist/server/migrations/20220613103214-alert-sub-table.js +0 -50
- package/dist/server/migrations/20220704225714-drop-foreign-keys.d.ts +0 -13
- package/dist/server/migrations/20220704225714-drop-foreign-keys.js +0 -79
- package/dist/server/migrations/20221101111110-update-foreign-fields.d.ts +0 -13
- package/dist/server/migrations/20221101111110-update-foreign-fields.js +0 -74
- package/dist/server/migrations/20221104151410-update-collections-hidden.d.ts +0 -13
- package/dist/server/migrations/20221104151410-update-collections-hidden.js +0 -57
- package/dist/server/migrations/20221121111110-update-fk-type.d.ts +0 -13
- package/dist/server/migrations/20221121111110-update-fk-type.js +0 -155
- package/dist/server/migrations/20221121111113-update-id-to-bigint.d.ts +0 -13
- package/dist/server/migrations/20221121111113-update-id-to-bigint.js +0 -189
- package/dist/server/migrations/20221221103220-timestamps.d.ts +0 -13
- package/dist/server/migrations/20221221103220-timestamps.js +0 -55
- package/dist/server/migrations/20230225111112-drop-ui-schema-relation.d.ts +0 -13
- package/dist/server/migrations/20230225111112-drop-ui-schema-relation.js +0 -97
- package/dist/server/migrations/20230509111114-alert-ui-schema.d.ts +0 -13
- package/dist/server/migrations/20230509111114-alert-ui-schema.js +0 -87
- package/dist/server/migrations/20230623145414-number-step.d.ts +0 -13
- package/dist/server/migrations/20230623145414-number-step.js +0 -81
- package/dist/server/migrations/20230704222935-tableoid.d.ts +0 -13
- package/dist/server/migrations/20230704222935-tableoid.js +0 -83
- package/dist/server/migrations/20230918024546-set-collection-schema.d.ts +0 -13
- package/dist/server/migrations/20230918024546-set-collection-schema.js +0 -55
- package/dist/server/migrations/20240220153103-install-main-datasource.d.ts +0 -14
- package/dist/server/migrations/20240220153103-install-main-datasource.js +0 -51
- package/dist/server/migrations/20240419182147-fix-created-by-field-target.d.ts +0 -14
- package/dist/server/migrations/20240419182147-fix-created-by-field-target.js +0 -49
- package/dist/server/migrations/20240420105949-add-sort-field.d.ts +0 -14
- package/dist/server/migrations/20240420105949-add-sort-field.js +0 -81
- package/dist/server/migrations/20240517101001-fix-target-option-in-tree-collection.d.ts +0 -14
- package/dist/server/migrations/20240517101001-fix-target-option-in-tree-collection.js +0 -54
- package/dist/server/models/collection.d.ts +0 -27
- package/dist/server/models/collection.js +0 -197
- package/dist/server/models/field.d.ts +0 -26
- package/dist/server/models/field.js +0 -173
- package/dist/server/models/index.d.ts +0 -10
- package/dist/server/models/index.js +0 -32
- package/dist/server/repositories/collection-repository.d.ts +0 -20
- package/dist/server/repositories/collection-repository.js +0 -169
- package/dist/server/repositories/index.d.ts +0 -9
- package/dist/server/repositories/index.js +0 -30
- package/dist/server/resourcers/collections.d.ts +0 -12
- package/dist/server/resourcers/collections.js +0 -102
- package/dist/server/resourcers/views.d.ts +0 -17
- package/dist/server/resourcers/views.js +0 -116
- package/dist/server/server.d.ts +0 -19
- package/dist/server/server.js +0 -407
- package/dist/swagger/index.d.ts +0 -413
- package/dist/swagger/index.js +0 -440
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "数据源:主数据库",
|
|
5
5
|
"description": "NocoBase main database, supports relational databases such as MySQL, PostgreSQL, SQLite and so on.",
|
|
6
6
|
"description.zh-CN": "NocoBase 主数据库,支持 MySQL、PostgreSQL、SQLite 等关系型数据库。",
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.3.0-alpha.20240710084543",
|
|
8
8
|
"main": "./dist/server/index.js",
|
|
9
9
|
"homepage": "https://docs.nocobase.com/handbook/data-source-main",
|
|
10
10
|
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/data-source-main",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@nocobase/test": "1.x",
|
|
23
23
|
"@nocobase/utils": "1.x"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "07a8b596fc64a9779a194cb9b0dc2ca7570ed9d4",
|
|
26
26
|
"keywords": [
|
|
27
27
|
"Data sources"
|
|
28
28
|
]
|
package/dist/client/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { Plugin } from '@nocobase/client';
|
|
10
|
-
declare class PluginDataSourceMainClient extends Plugin {
|
|
11
|
-
load(): Promise<void>;
|
|
12
|
-
}
|
|
13
|
-
export default PluginDataSourceMainClient;
|
package/dist/client/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
(function(e,n){typeof exports=="object"&&typeof module!="undefined"?n(exports,require("@nocobase/client")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client"],n):(e=typeof globalThis!="undefined"?globalThis:e||self,n(e["@nocobase/plugin-data-source-main"]={},e["@nocobase/client"]))})(this,function(e,n){"use strict";var a=(e,n,o)=>new Promise((u,d)=>{var c=i=>{try{t(o.next(i))}catch(s){d(s)}},l=i=>{try{t(o.throw(i))}catch(s){d(s)}},t=i=>i.done?u(i.value):Promise.resolve(i.value).then(c,l);t((o=o.apply(e,n)).next())});class o extends n.Plugin{load(){return a(this,null,function*(){})}}e.default=o,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/externalVersion.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
module.exports = {
|
|
11
|
-
"@nocobase/client": "1.2.13-alpha",
|
|
12
|
-
"@nocobase/database": "1.2.13-alpha",
|
|
13
|
-
"@nocobase/plugin-error-handler": "1.2.13-alpha",
|
|
14
|
-
"@nocobase/server": "1.2.13-alpha",
|
|
15
|
-
"async-mutex": "0.3.2",
|
|
16
|
-
"lodash": "4.17.21",
|
|
17
|
-
"@nocobase/test": "1.2.13-alpha",
|
|
18
|
-
"@nocobase/utils": "1.2.13-alpha",
|
|
19
|
-
"sequelize": "6.35.2",
|
|
20
|
-
"dayjs": "1.11.10"
|
|
21
|
-
};
|
package/dist/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
export * from './server';
|
|
10
|
-
export { default } from './server';
|
package/dist/index.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __create = Object.create;
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __export = (target, all) => {
|
|
17
|
-
for (var name in all)
|
|
18
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(from))
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
29
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
30
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
32
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
35
|
-
mod
|
|
36
|
-
));
|
|
37
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
|
-
var src_exports = {};
|
|
39
|
-
__export(src_exports, {
|
|
40
|
-
default: () => import_server.default
|
|
41
|
-
});
|
|
42
|
-
module.exports = __toCommonJS(src_exports);
|
|
43
|
-
__reExport(src_exports, require("./server"), module.exports);
|
|
44
|
-
var import_server = __toESM(require("./server"));
|
|
45
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
-
0 && (module.exports = {
|
|
47
|
-
...require("./server")
|
|
48
|
-
});
|
package/dist/locale/en-US.json
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"field-name-exists": "Field name \"{{name}}\" already exists in collection \"{{collectionName}}\"",
|
|
3
|
-
"field-is-depended-on-by-other": "Can not delete field \"{{fieldName}}\" in \"{{fieldCollectionName}}\", it is used by field \"{{dependedFieldName}}\" in \"{{dependedFieldCollectionName}}\" as \"{{dependedFieldAs}}\""
|
|
4
|
-
}
|
package/dist/locale/zh-CN.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { CollectionOptions } from '@nocobase/database';
|
|
10
|
-
declare const _default: CollectionOptions;
|
|
11
|
-
export default _default;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var collectionCategories_exports = {};
|
|
28
|
-
__export(collectionCategories_exports, {
|
|
29
|
-
default: () => collectionCategories_default
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(collectionCategories_exports);
|
|
32
|
-
var collectionCategories_default = {
|
|
33
|
-
dumpRules: {
|
|
34
|
-
group: "required"
|
|
35
|
-
},
|
|
36
|
-
shared: true,
|
|
37
|
-
name: "collectionCategories",
|
|
38
|
-
autoGenId: true,
|
|
39
|
-
sortable: true,
|
|
40
|
-
fields: [
|
|
41
|
-
{
|
|
42
|
-
type: "string",
|
|
43
|
-
name: "name",
|
|
44
|
-
translation: true
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
type: "string",
|
|
48
|
-
name: "color",
|
|
49
|
-
defaultValue: "default"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
type: "belongsToMany",
|
|
53
|
-
name: "collections",
|
|
54
|
-
target: "collections",
|
|
55
|
-
foreignKey: "categoryId",
|
|
56
|
-
otherKey: "collectionName",
|
|
57
|
-
targetKey: "name",
|
|
58
|
-
through: "collectionCategory"
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { CollectionOptions } from '@nocobase/database';
|
|
10
|
-
declare const _default: CollectionOptions;
|
|
11
|
-
export default _default;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var collections_exports = {};
|
|
28
|
-
__export(collections_exports, {
|
|
29
|
-
default: () => collections_default
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(collections_exports);
|
|
32
|
-
var collections_default = {
|
|
33
|
-
dumpRules: "required",
|
|
34
|
-
shared: true,
|
|
35
|
-
name: "collections",
|
|
36
|
-
sortable: "sort",
|
|
37
|
-
autoGenId: false,
|
|
38
|
-
model: "CollectionModel",
|
|
39
|
-
repository: "CollectionRepository",
|
|
40
|
-
timestamps: false,
|
|
41
|
-
filterTargetKey: "name",
|
|
42
|
-
fields: [
|
|
43
|
-
{
|
|
44
|
-
type: "uid",
|
|
45
|
-
name: "key",
|
|
46
|
-
primaryKey: true
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
type: "uid",
|
|
50
|
-
name: "name",
|
|
51
|
-
unique: true,
|
|
52
|
-
prefix: "t_"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
type: "string",
|
|
56
|
-
name: "title",
|
|
57
|
-
required: true,
|
|
58
|
-
translation: true
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
type: "boolean",
|
|
62
|
-
name: "inherit",
|
|
63
|
-
defaultValue: false
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
type: "boolean",
|
|
67
|
-
name: "hidden",
|
|
68
|
-
defaultValue: false
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
type: "json",
|
|
72
|
-
name: "options",
|
|
73
|
-
defaultValue: {}
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
type: "string",
|
|
77
|
-
name: "description",
|
|
78
|
-
allowNull: true
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
type: "hasMany",
|
|
82
|
-
name: "fields",
|
|
83
|
-
target: "fields",
|
|
84
|
-
sourceKey: "name",
|
|
85
|
-
targetKey: "name",
|
|
86
|
-
foreignKey: "collectionName",
|
|
87
|
-
sortBy: "sort"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
type: "belongsToMany",
|
|
91
|
-
name: "category",
|
|
92
|
-
target: "collectionCategories",
|
|
93
|
-
sourceKey: "name",
|
|
94
|
-
foreignKey: "collectionName",
|
|
95
|
-
otherKey: "categoryId",
|
|
96
|
-
targetKey: "id",
|
|
97
|
-
sortBy: "sort",
|
|
98
|
-
through: "collectionCategory"
|
|
99
|
-
}
|
|
100
|
-
]
|
|
101
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { CollectionOptions } from '@nocobase/database';
|
|
10
|
-
declare const _default: CollectionOptions;
|
|
11
|
-
export default _default;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var fields_exports = {};
|
|
28
|
-
__export(fields_exports, {
|
|
29
|
-
default: () => fields_default
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(fields_exports);
|
|
32
|
-
var fields_default = {
|
|
33
|
-
dumpRules: "required",
|
|
34
|
-
shared: true,
|
|
35
|
-
name: "fields",
|
|
36
|
-
autoGenId: false,
|
|
37
|
-
model: "FieldModel",
|
|
38
|
-
timestamps: false,
|
|
39
|
-
sortable: {
|
|
40
|
-
name: "sort",
|
|
41
|
-
scopeKey: "collectionName"
|
|
42
|
-
},
|
|
43
|
-
indexes: [
|
|
44
|
-
{
|
|
45
|
-
type: "UNIQUE",
|
|
46
|
-
fields: ["collectionName", "name"]
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
fields: [
|
|
50
|
-
{
|
|
51
|
-
type: "uid",
|
|
52
|
-
name: "key",
|
|
53
|
-
primaryKey: true
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
type: "uid",
|
|
57
|
-
name: "name",
|
|
58
|
-
prefix: "f_"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
type: "string",
|
|
62
|
-
name: "type"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
type: "string",
|
|
66
|
-
name: "interface",
|
|
67
|
-
allowNull: true
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
type: "string",
|
|
71
|
-
name: "description",
|
|
72
|
-
allowNull: true
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
type: "belongsTo",
|
|
76
|
-
name: "collection",
|
|
77
|
-
target: "collections",
|
|
78
|
-
foreignKey: "collectionName",
|
|
79
|
-
targetKey: "name",
|
|
80
|
-
onDelete: "CASCADE"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
type: "hasMany",
|
|
84
|
-
name: "children",
|
|
85
|
-
target: "fields",
|
|
86
|
-
sourceKey: "key",
|
|
87
|
-
foreignKey: "parentKey"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
type: "hasOne",
|
|
91
|
-
name: "reverseField",
|
|
92
|
-
target: "fields",
|
|
93
|
-
sourceKey: "key",
|
|
94
|
-
foreignKey: "reverseKey"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
type: "json",
|
|
98
|
-
name: "options",
|
|
99
|
-
defaultValue: {},
|
|
100
|
-
translation: true
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type FieldIsDependedOnByOtherErrorOptions = {
|
|
2
|
-
fieldName: string;
|
|
3
|
-
fieldCollectionName: string;
|
|
4
|
-
dependedFieldName: string;
|
|
5
|
-
dependedFieldCollectionName: string;
|
|
6
|
-
dependedFieldAs: string;
|
|
7
|
-
};
|
|
8
|
-
export declare class FieldIsDependedOnByOtherError extends Error {
|
|
9
|
-
options: FieldIsDependedOnByOtherErrorOptions;
|
|
10
|
-
constructor(options: FieldIsDependedOnByOtherErrorOptions);
|
|
11
|
-
}
|
|
12
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var field_is_depended_on_by_other_exports = {};
|
|
28
|
-
__export(field_is_depended_on_by_other_exports, {
|
|
29
|
-
FieldIsDependedOnByOtherError: () => FieldIsDependedOnByOtherError
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(field_is_depended_on_by_other_exports);
|
|
32
|
-
class FieldIsDependedOnByOtherError extends Error {
|
|
33
|
-
constructor(options) {
|
|
34
|
-
super(
|
|
35
|
-
`Can't delete field ${options.fieldName} of ${options.fieldCollectionName}, it is used by field ${options.dependedFieldName} in collection ${options.dependedFieldCollectionName} as ${options.dependedFieldAs}`
|
|
36
|
-
);
|
|
37
|
-
this.options = options;
|
|
38
|
-
this.name = "FieldIsDependedOnByOtherError";
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
-
0 && (module.exports = {
|
|
43
|
-
FieldIsDependedOnByOtherError
|
|
44
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
export declare class FieldNameExistsError extends Error {
|
|
10
|
-
value: string;
|
|
11
|
-
collectionName: string;
|
|
12
|
-
constructor(value: string, collectionName: string);
|
|
13
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var field_name_exists_error_exports = {};
|
|
28
|
-
__export(field_name_exists_error_exports, {
|
|
29
|
-
FieldNameExistsError: () => FieldNameExistsError
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(field_name_exists_error_exports);
|
|
32
|
-
class FieldNameExistsError extends Error {
|
|
33
|
-
value;
|
|
34
|
-
collectionName;
|
|
35
|
-
constructor(value, collectionName) {
|
|
36
|
-
super(`Field name "${value}" already exists in collection "${collectionName}"`);
|
|
37
|
-
this.value = value;
|
|
38
|
-
this.collectionName = collectionName;
|
|
39
|
-
this.name = "FieldNameExistsError";
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
-
0 && (module.exports = {
|
|
44
|
-
FieldNameExistsError
|
|
45
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import Database from '@nocobase/database';
|
|
10
|
-
export declare function afterCreateForForeignKeyField(db: Database): (model: any, options: any) => Promise<void>;
|