@tachybase/plugin-field-snapshot 1.3.20 → 1.3.22

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.
@@ -1,11 +1,10 @@
1
1
  module.exports = {
2
2
  "react": "18.3.1",
3
- "@tachybase/client": "1.3.20",
4
- "@tachybase/schema": "1.3.20",
3
+ "@tachybase/client": "1.3.22",
4
+ "@tachybase/schema": "1.3.39",
5
5
  "lodash": "4.17.21",
6
- "@tachybase/database": "1.3.20",
7
- "@tachybase/server": "1.3.20",
6
+ "@tego/server": "1.3.39",
8
7
  "antd": "5.22.5",
9
8
  "react-i18next": "15.2.0",
10
- "@ant-design/icons": "5.3.7"
9
+ "@ant-design/icons": "5.6.1"
11
10
  };
@@ -1,2 +1,2 @@
1
- declare const _default: import("@tachybase/database").CollectionOptions;
1
+ declare const _default: import("@tego/server").CollectionOptions;
2
2
  export default _default;
@@ -20,8 +20,8 @@ __export(collectionsHistory_exports, {
20
20
  default: () => collectionsHistory_default
21
21
  });
22
22
  module.exports = __toCommonJS(collectionsHistory_exports);
23
- var import_database = require("@tachybase/database");
24
- var collectionsHistory_default = (0, import_database.defineCollection)({
23
+ var import_server = require("@tego/server");
24
+ var collectionsHistory_default = (0, import_server.defineCollection)({
25
25
  dumpRules: "required",
26
26
  name: "collectionsHistory",
27
27
  sortable: "sort",
@@ -1,2 +1,2 @@
1
- declare const _default: import("@tachybase/database").CollectionOptions;
1
+ declare const _default: import("@tego/server").CollectionOptions;
2
2
  export default _default;
@@ -20,8 +20,8 @@ __export(fieldsHistory_exports, {
20
20
  default: () => fieldsHistory_default
21
21
  });
22
22
  module.exports = __toCommonJS(fieldsHistory_exports);
23
- var import_database = require("@tachybase/database");
24
- var fieldsHistory_default = (0, import_database.defineCollection)({
23
+ var import_server = require("@tego/server");
24
+ var fieldsHistory_default = (0, import_server.defineCollection)({
25
25
  dumpRules: "required",
26
26
  name: "fieldsHistory",
27
27
  autoGenId: false,
@@ -1,4 +1,4 @@
1
- import { BaseColumnFieldOptions, CreateOptions, DataTypes, Field, Model } from '@tachybase/database';
1
+ import { BaseColumnFieldOptions, CreateOptions, DataTypes, Field, Model } from '@tego/server';
2
2
  export declare class SnapshotField extends Field {
3
3
  get dataType(): DataTypes.AbstractDataTypeConstructor;
4
4
  createSnapshot: (model: Model, { transaction, values }: CreateOptions) => Promise<void>;
@@ -20,8 +20,8 @@ __export(field_snapshot_exports, {
20
20
  SnapshotField: () => SnapshotField
21
21
  });
22
22
  module.exports = __toCommonJS(field_snapshot_exports);
23
- var import_database = require("@tachybase/database");
24
- class SnapshotField extends import_database.Field {
23
+ var import_server = require("@tego/server");
24
+ class SnapshotField extends import_server.Field {
25
25
  constructor() {
26
26
  super(...arguments);
27
27
  this.createSnapshot = async (model, { transaction, values }) => {
@@ -56,7 +56,7 @@ class SnapshotField extends import_database.Field {
56
56
  };
57
57
  }
58
58
  get dataType() {
59
- return import_database.DataTypes.JSON;
59
+ return import_server.DataTypes.JSON;
60
60
  }
61
61
  bind() {
62
62
  super.bind();
@@ -1,5 +1,4 @@
1
- import { Model } from '@tachybase/database';
2
- import { InstallOptions, Plugin } from '@tachybase/server';
1
+ import { InstallOptions, Model, Plugin } from '@tego/server';
3
2
  export declare class SnapshotFieldPlugin extends Plugin {
4
3
  afterAdd(): void;
5
4
  beforeLoad(): Promise<void>;
@@ -21,8 +21,8 @@ __export(plugin_exports, {
21
21
  default: () => plugin_default
22
22
  });
23
23
  module.exports = __toCommonJS(plugin_exports);
24
- var import_path = require("path");
25
- var import_server = require("@tachybase/server");
24
+ var import_node_path = require("node:path");
25
+ var import_server = require("@tego/server");
26
26
  var import_field_snapshot = require("./fields/field-snapshot");
27
27
  class SnapshotFieldPlugin extends import_server.Plugin {
28
28
  constructor() {
@@ -88,7 +88,7 @@ class SnapshotFieldPlugin extends import_server.Plugin {
88
88
  this.app.db.on("fields.beforeCreate", this.autoFillTargetCollection);
89
89
  }
90
90
  async load() {
91
- await this.importCollections((0, import_path.resolve)(__dirname, "collections"));
91
+ await this.importCollections((0, import_node_path.resolve)(__dirname, "collections"));
92
92
  this.app.db.registerFieldTypes({
93
93
  snapshot: import_field_snapshot.SnapshotField
94
94
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tachybase/plugin-field-snapshot",
3
3
  "displayName": "Collection field: Snapshot",
4
- "version": "1.3.20",
4
+ "version": "1.3.22",
5
5
  "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.",
6
6
  "keywords": [
7
7
  "Collection fields"
@@ -10,24 +10,19 @@
10
10
  "main": "./dist/server/index.js",
11
11
  "dependencies": {},
12
12
  "devDependencies": {
13
- "@ant-design/icons": "~5.3.7",
13
+ "@ant-design/icons": "^5.6.1",
14
+ "@tachybase/schema": "^1.3.39",
15
+ "@tachybase/test": "^1.3.39",
16
+ "@tego/client": "^1.3.39",
17
+ "@tego/server": "^1.3.39",
14
18
  "antd": "5.22.5",
15
19
  "lodash": "4.17.21",
16
- "rc-tree-select": "5.25.0",
17
- "react": "~18.3.1",
18
- "react-i18next": "^15.2.0",
19
- "@tachybase/schema": "1.3.20"
20
- },
21
- "peerDependencies": {
22
- "@tachybase/client": "1.3.20",
23
- "@tachybase/database": "1.3.20",
24
- "@tachybase/server": "1.3.20",
25
- "@tachybase/test": "1.3.20",
26
- "@tachybase/utils": "1.3.20"
20
+ "rc-tree-select": "^5.25.0",
21
+ "react": "18.3.1",
22
+ "react-i18next": "15.2.0",
23
+ "@tachybase/client": "1.3.22"
27
24
  },
28
25
  "description.zh-CN": "在添加数据时,为它的关系数据创建快照,并保存在当前的数据中。关系数据更新时,快照不会更新。",
29
26
  "displayName.zh-CN": "数据表字段:关系快照",
30
- "scripts": {
31
- "build": "tachybase-build --no-dts @tachybase/plugin-field-snapshot"
32
- }
27
+ "scripts": {}
33
28
  }