@tachybase/data-source 0.23.8 → 0.23.14

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.
@@ -21,5 +21,6 @@ export declare class CollectionManager implements ICollectionManager {
21
21
  getCollections(): Array<ICollection>;
22
22
  getRepository(name: string, sourceId?: string | number): IRepository;
23
23
  sync(): Promise<void>;
24
+ removeCollection(name: string): void;
24
25
  protected newCollection(options: any): Collection;
25
26
  }
@@ -81,6 +81,9 @@ const _CollectionManager = class _CollectionManager {
81
81
  }
82
82
  async sync() {
83
83
  }
84
+ removeCollection(name) {
85
+ this.collections.delete(name);
86
+ }
84
87
  newCollection(options) {
85
88
  return new import_collection.Collection(options, this);
86
89
  }
@@ -16,6 +16,7 @@ export declare class SequelizeCollectionManager implements ICollectionManager {
16
16
  extendCollection(collectionOptions: CollectionOptions, mergeOptions?: MergeOptions): ICollection;
17
17
  hasCollection(name: string): boolean;
18
18
  getCollection(name: string): import("@tachybase/database").Collection<any, any>;
19
+ removeCollection(name: string): void;
19
20
  getCollections(): import("@tachybase/database").Collection<any, any>[];
20
21
  getRepository<R = IRepository>(name: string, sourceId?: string | number): R;
21
22
  sync(): Promise<void>;
@@ -87,6 +87,8 @@ const _SequelizeCollectionManager = class _SequelizeCollectionManager {
87
87
  getCollection(name) {
88
88
  return this.db.getCollection(name);
89
89
  }
90
+ removeCollection(name) {
91
+ }
90
92
  getCollections() {
91
93
  const collectionsFilter = this.collectionsFilter();
92
94
  return [...this.db.collections.values()].filter((collection) => collectionsFilter(collection));
package/lib/types.d.ts CHANGED
@@ -60,6 +60,7 @@ export interface ICollectionManager {
60
60
  hasCollection(name: string): boolean;
61
61
  getCollection(name: string): ICollection;
62
62
  getCollections(): Array<ICollection>;
63
+ removeCollection(name: string): void;
63
64
  getRepository(name: string, sourceId?: string | number): IRepository;
64
65
  sync(): Promise<void>;
65
66
  dataSource?: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tachybase/data-source",
3
- "version": "0.23.8",
3
+ "version": "0.23.14",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./lib/index.js",
@@ -11,12 +11,12 @@
11
11
  "jsonwebtoken": "^8.5.1",
12
12
  "koa-compose": "^4.1.0",
13
13
  "lodash": "4.17.21",
14
- "@tachybase/actions": "0.23.8",
15
- "@tachybase/database": "0.23.8",
16
- "@tachybase/resourcer": "0.23.8",
17
- "@tachybase/utils": "0.23.8",
18
- "@tachybase/cache": "0.23.8",
19
- "@tachybase/acl": "0.23.8"
14
+ "@tachybase/acl": "0.23.14",
15
+ "@tachybase/actions": "0.23.14",
16
+ "@tachybase/cache": "0.23.14",
17
+ "@tachybase/database": "0.23.14",
18
+ "@tachybase/utils": "0.23.14",
19
+ "@tachybase/resourcer": "0.23.14"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/koa": "^2.15.0",
@@ -1,9 +0,0 @@
1
-
2
- 
3
- > @tachybase/data-source@0.22.38 build /Users/seal/Documents/projects/tachybase/packages/data-source-manager
4
- > tachybase-build --no-dts @tachybase/data-source
5
-
6
- The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
7
- @tachybase/data-source: data-source-manager build start
8
- @tachybase/data-source: build cjs
9
-