@bpmsoftwaresolutions/ai-engine-client 1.1.60 → 1.1.61
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/package.json +2 -1
- package/src/index.js +16 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmsoftwaresolutions/ai-engine-client",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.61",
|
|
4
4
|
"description": "Thin npm client for the AI Engine operator and retrieval APIs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
".": "./src/index.js"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
|
+
"package.json",
|
|
14
15
|
"src",
|
|
15
16
|
"README.md",
|
|
16
17
|
"examples"
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
1
5
|
const DEFAULT_TIMEOUT_MS = 30000;
|
|
2
|
-
|
|
6
|
+
const PACKAGE_JSON_PATH = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'package.json');
|
|
7
|
+
|
|
8
|
+
function readPackageVersion() {
|
|
9
|
+
const packageJson = JSON.parse(fs.readFileSync(PACKAGE_JSON_PATH, 'utf8'));
|
|
10
|
+
const version = String(packageJson.version || '').trim();
|
|
11
|
+
if (!version) {
|
|
12
|
+
throw new Error(`Missing package version in ${PACKAGE_JSON_PATH}.`);
|
|
13
|
+
}
|
|
14
|
+
return version;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const AI_ENGINE_CLIENT_VERSION = readPackageVersion();
|
|
3
18
|
export const GOVERNED_MUTATION_REQUIRED_CAPABILITIES = [
|
|
4
19
|
'executeVerifiedMutation',
|
|
5
20
|
'post_mutation_verification',
|