@rljson/io 0.0.4 → 0.0.5

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,5 +1,9 @@
1
1
  <!--
2
-
2
+ // @license
3
+ // Copyright (c) 2025 Rljson
4
+ //
5
+ // Use of this source code is governed by terms that can be
6
+ // found in the LICENSE file in the root of this package.
3
7
  -->
4
8
 
5
9
  # Contributors Guide
@@ -118,7 +122,7 @@ Please replace `Commit Message` in the next command by your commit message.
118
122
  It will also used for branch name and pull request
119
123
 
120
124
  ```bash
121
- export MESSAGE="Fix small things in README" && \
125
+ export MESSAGE="Take over code from old rljson-js lib" && \
122
126
  export BRANCH=`echo "$MESSAGE" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9_]/_/g'` &&\
123
127
  git checkout -b $BRANCH
124
128
  ```
@@ -1,5 +1,9 @@
1
1
  <!--
2
-
2
+ // @license
3
+ // Copyright (c) 2025 Rljson
4
+ //
5
+ // Use of this source code is governed by terms that can be
6
+ // found in the LICENSE file in the root of this package.
3
7
  -->
4
8
 
5
9
  # Contributors Guide
@@ -118,7 +122,7 @@ Please replace `Commit Message` in the next command by your commit message.
118
122
  It will also used for branch name and pull request
119
123
 
120
124
  ```bash
121
- export MESSAGE="Fix small things in README" && \
125
+ export MESSAGE="Take over code from old rljson-js lib" && \
122
126
  export BRANCH=`echo "$MESSAGE" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9_]/_/g'` &&\
123
127
  git checkout -b $BRANCH
124
128
  ```
package/dist/io.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { JsonValue } from '@rljson/json';
1
2
  import { ContentType, Rljson } from '@rljson/rljson';
2
3
  export interface Io {
3
4
  /** A promise resolving once the Io interface is ready */
@@ -9,6 +10,8 @@ export interface Io {
9
10
  name: string;
10
11
  type: ContentType;
11
12
  }): Promise<void>;
13
+ /** Returns the available table names */
14
+ tables(): Promise<string[]>;
12
15
  /** Writes Rljson data in to the database */
13
16
  write(request: {
14
17
  data: Rljson;
@@ -18,5 +21,12 @@ export interface Io {
18
21
  table: string;
19
22
  rowHash: string;
20
23
  }): Promise<Rljson>;
24
+ /** Queries a list of rows */
25
+ readRows(request: {
26
+ table: string;
27
+ where: {
28
+ [column: string]: JsonValue;
29
+ };
30
+ }): Promise<Rljson>;
21
31
  }
22
32
  export declare const exampleIo = "Checkout @rljson/io-mem for an example implementation";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rljson/io",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "packageManager": "pnpm@10.6.2",
5
5
  "description": "Low level interface for reading and writing RLJSON data",
6
6
  "homepage": "https://github.com/rljson/io",
@@ -14,7 +14,7 @@
14
14
  "type": "git",
15
15
  "url": "git+https://github.com/rljson/io.git"
16
16
  },
17
- "main": "dist/index.js",
17
+ "main": "dist/io.js",
18
18
  "types": "dist/index.d.ts",
19
19
  "files": [
20
20
  "dist"
@@ -39,6 +39,7 @@
39
39
  "eslint-plugin-tsdoc": "^0.4.0",
40
40
  "globals": "^16.0.0",
41
41
  "jsdoc": "^4.0.4",
42
+ "read-pkg": "^9.0.1",
42
43
  "typescript": "~5.8.2",
43
44
  "typescript-eslint": "^8.26.1",
44
45
  "vite": "^6.2.1",
@@ -55,9 +56,9 @@
55
56
  "overrides": {}
56
57
  },
57
58
  "dependencies": {
58
- "@rljson/hash": "^0.0.9",
59
- "@rljson/json": "^0.0.7",
59
+ "@rljson/hash": "^0.0.10",
60
+ "@rljson/json": "^0.0.8",
60
61
  "@rljson/rljson": "^0.0.7",
61
- "@rljson/validate": "^0.0.4"
62
+ "@rljson/validate": "^0.0.5"
62
63
  }
63
64
  }