montycat 1.0.3 → 1.0.36
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/README.md +1 -1
- package/dist/core/persistent.js +2 -2
- package/dist/functions/storeGenericFunctions.js +19 -1
- package/package.json +1 -1
- package/.github/workflows/publish.yml +0 -39
- package/tsconfig.json +0 -20
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Montycat Node.js Client
|
|
2
2
|
|
|
3
|
-
Montycat Node.js Client is the official JavaScript/TypeScript client for **Montycat**, a high-performance,
|
|
3
|
+
Montycat Node.js Client is the official JavaScript/TypeScript client for **Montycat**, a high-performance, NoSQL store built on cutting-edge Data Mesh architecture. This package enables Node.js developers to easily connect, query, and manage data within Montycat’s decentralized, scalable environment.
|
|
4
4
|
|
|
5
5
|
## Key Features
|
|
6
6
|
- ⚡ **High Performance**: Leverages Montycat’s architecture for extremely fast reads and writes.
|
package/dist/core/persistent.js
CHANGED
|
@@ -103,7 +103,7 @@ class Persistent extends GenericKV {
|
|
|
103
103
|
const query = {
|
|
104
104
|
raw: [
|
|
105
105
|
"update-cache-compression", "store", this.store, "keyspace", this.keyspace, "persistent", "y",
|
|
106
|
-
"cache", this.cache ? this.cache :
|
|
106
|
+
"cache", this.cache ? this.cache : "0", "compression", this.compression ? "y" : "n"
|
|
107
107
|
],
|
|
108
108
|
credentials: [this.username, this.password],
|
|
109
109
|
};
|
|
@@ -117,7 +117,7 @@ class Persistent extends GenericKV {
|
|
|
117
117
|
const query = {
|
|
118
118
|
raw: [
|
|
119
119
|
"create-keyspace", "store", this.store, "keyspace", this.keyspace, "persistent", this.persistent ? "y" : "n",
|
|
120
|
-
"cache", this.cache ? this.cache :
|
|
120
|
+
"cache", this.cache ? this.cache : "0", "compression", this.compression ? "y" : "n"
|
|
121
121
|
],
|
|
122
122
|
credentials: [this.username, this.password],
|
|
123
123
|
};
|
|
@@ -62,6 +62,7 @@ function convertToBinaryQuery(cls, options = {}) {
|
|
|
62
62
|
const { processedValue, foundSchema } = processValue(value);
|
|
63
63
|
const { processedBulkValues, uniqueSchema } = processBulkValues(bulkValues);
|
|
64
64
|
const bulkKeysValuesProcessed = processBulkKeysValues(bulkKeysValues);
|
|
65
|
+
const processedSearchCriteria = processSearchCriteria(searchCriteria);
|
|
65
66
|
return JSON.stringify({
|
|
66
67
|
username: cls.username,
|
|
67
68
|
password: cls.password,
|
|
@@ -78,11 +79,28 @@ function convertToBinaryQuery(cls, options = {}) {
|
|
|
78
79
|
bulk_values: processedBulkValues.map(v => JSON.stringify(v)),
|
|
79
80
|
bulk_keys: bulkKeys,
|
|
80
81
|
bulk_keys_values: bulkKeysValuesProcessed,
|
|
81
|
-
search_criteria: JSON.stringify(
|
|
82
|
+
search_criteria: JSON.stringify(processedSearchCriteria),
|
|
82
83
|
with_pointers: withPointers,
|
|
83
84
|
schema: foundSchema ? foundSchema : uniqueSchema ? uniqueSchema : schema,
|
|
84
85
|
});
|
|
85
86
|
}
|
|
87
|
+
function processSearchCriteria(searchCriteria) {
|
|
88
|
+
const processedCriteria = {};
|
|
89
|
+
for (const key in searchCriteria) {
|
|
90
|
+
if (searchCriteria[key] instanceof Pointer) {
|
|
91
|
+
if (processedCriteria['pointers'] === undefined) {
|
|
92
|
+
processedCriteria['pointers'] = { [key]: searchCriteria[key].setupPointer() };
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
processedCriteria['pointers'][key] = searchCriteria[key].setupPointer();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
processedCriteria[key] = searchCriteria[key];
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return processedCriteria;
|
|
103
|
+
}
|
|
86
104
|
/**
|
|
87
105
|
* Processes a single value, converting any Timestamp or Pointer instances
|
|
88
106
|
* to their appropriate string representations.
|
package/package.json
CHANGED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
name: Publish to npm
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- 'v*' # Trigger only when a tag like v1.0.0 is pushed
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
build-and-publish:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout code
|
|
14
|
-
uses: actions/checkout@v4
|
|
15
|
-
|
|
16
|
-
- name: Setup Node.js
|
|
17
|
-
uses: actions/setup-node@v4
|
|
18
|
-
with:
|
|
19
|
-
node-version: '24'
|
|
20
|
-
registry-url: 'https://registry.npmjs.org/'
|
|
21
|
-
|
|
22
|
-
# - name: Install dependencies
|
|
23
|
-
# run: npm ci
|
|
24
|
-
|
|
25
|
-
- name: Install dependencies
|
|
26
|
-
run: npm install
|
|
27
|
-
|
|
28
|
-
- name: Build package
|
|
29
|
-
run: npm run build
|
|
30
|
-
|
|
31
|
-
- name: Debug auth
|
|
32
|
-
run: npm whoami
|
|
33
|
-
env:
|
|
34
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
35
|
-
|
|
36
|
-
- name: Publish to npm
|
|
37
|
-
run: npm publish --access public
|
|
38
|
-
env:
|
|
39
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/tsconfig.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ESNext",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"moduleResolution": "node",
|
|
6
|
-
"outDir": "./dist",
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"declarationDir": "./dist",
|
|
9
|
-
"emitDeclarationOnly": false,
|
|
10
|
-
"rootDir": "./src",
|
|
11
|
-
"strict": true,
|
|
12
|
-
"esModuleInterop": true,
|
|
13
|
-
"skipLibCheck": true,
|
|
14
|
-
"forceConsistentCasingInFileNames": true,
|
|
15
|
-
"experimentalDecorators": true,
|
|
16
|
-
"emitDecoratorMetadata": true
|
|
17
|
-
},
|
|
18
|
-
"include": ["src/**/*"],
|
|
19
|
-
"exclude": ["node_modules", "dist"]
|
|
20
|
-
}
|