chain-db-ts 1.0.0-rc.2 → 1.0.0-rc.3

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.0.0-rc.3] - 2025-03-11
6
+
7
+ ### Changed
8
+
9
+ - Added support to older version while using the `getCurrentDocId()` method.
10
+
5
11
  ## [1.0.0-rc.2] - 2025-03-05
6
12
 
7
13
  ### Added
@@ -1,6 +1,9 @@
1
1
  import { ChainDB } from './chain-db';
2
2
  import { Criteria, CriteriaAdvanced, DocId, TableDoc } from './types';
3
3
  declare class Table<Model> {
4
+ /**
5
+ * The current document data
6
+ */
4
7
  currentDoc: Model;
5
8
  private name;
6
9
  private db;
@@ -268,7 +268,9 @@ var Table = /** @class */ (function () {
268
268
  * Get the current document ID
269
269
  */
270
270
  Table.prototype.getCurrentDocId = function () {
271
- return this.currentDoc.doc_id;
271
+ var _doc = this.currentDoc;
272
+ // Support to applications using older versions
273
+ return _doc.doc_id ? _doc.doc_id : '';
272
274
  };
273
275
  /**
274
276
  * Get a specific document by its ID
@@ -1,6 +1,9 @@
1
1
  import { ChainDB } from './chain-db';
2
2
  import { Criteria, CriteriaAdvanced, DocId, TableDoc } from './types';
3
3
  declare class Table<Model> {
4
+ /**
5
+ * The current document data
6
+ */
4
7
  currentDoc: Model;
5
8
  private name;
6
9
  private db;
package/features/table.js CHANGED
@@ -263,7 +263,9 @@ var Table = /** @class */ (function () {
263
263
  * Get the current document ID
264
264
  */
265
265
  Table.prototype.getCurrentDocId = function () {
266
- return this.currentDoc.doc_id;
266
+ var _doc = this.currentDoc;
267
+ // Support to applications using older versions
268
+ return _doc.doc_id ? _doc.doc_id : '';
267
269
  };
268
270
  /**
269
271
  * Get a specific document by its ID
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chain-db-ts",
3
- "version": "1.0.0-rc.2",
3
+ "version": "1.0.0-rc.3",
4
4
  "description": "Chain DB Client for Javascript/Typescript Node apps.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./index.js",
package/readme.md CHANGED
@@ -1,6 +1,6 @@
1
- # Chain DB TypeScript Client
1
+ # Chain DB TS / JS Client (Node)
2
2
 
3
- A TypeScript client for [Chain DB](https://github.com/wpdas/chain-db), a simple database that maintains a history of changes, allowing you to track how your data evolves over time.
3
+ A TypeScript / JavaScript client for [Chain DB](https://github.com/wpdas/chain-db), a secure database system with built-in history tracking, offering AES-256-GCM encryption, atomic operations with rollback capability, and automatic backups.
4
4
 
5
5
  ## Installation
6
6