@fencyai/js 0.1.37 → 0.1.38
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/lib/utils/version.d.ts +10 -1
- package/lib/utils/version.js +21 -24
- package/package.json +2 -2
package/lib/utils/version.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Get the current package version
|
|
2
|
+
* Get the current package version
|
|
3
3
|
* @returns The package version as a string
|
|
4
4
|
*/
|
|
5
5
|
export declare function getPackageVersion(): string;
|
|
6
|
+
/**
|
|
7
|
+
* Override the SDK version (useful for testing or custom builds)
|
|
8
|
+
* @param version - The version to use
|
|
9
|
+
*/
|
|
10
|
+
export declare function setPackageVersion(version: string): void;
|
|
11
|
+
/**
|
|
12
|
+
* Reset the version to the default build-time version
|
|
13
|
+
*/
|
|
14
|
+
export declare function resetPackageVersion(): void;
|
package/lib/utils/version.js
CHANGED
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
// Browser-compatible version utility
|
|
2
|
+
// The version is set at build time and can be overridden if needed
|
|
3
|
+
// Build-time version constant - this should be updated during the build process
|
|
4
|
+
const SDK_VERSION = '0.1.37';
|
|
5
|
+
// Allow runtime override if needed
|
|
6
|
+
let versionOverride = null;
|
|
6
7
|
/**
|
|
7
|
-
* Get the current package version
|
|
8
|
+
* Get the current package version
|
|
8
9
|
* @returns The package version as a string
|
|
9
10
|
*/
|
|
10
11
|
export function getPackageVersion() {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
console.warn('Could not read package version, using fallback:', error);
|
|
26
|
-
cachedVersion = '0.1.35';
|
|
27
|
-
return cachedVersion;
|
|
28
|
-
}
|
|
12
|
+
return versionOverride || SDK_VERSION;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Override the SDK version (useful for testing or custom builds)
|
|
16
|
+
* @param version - The version to use
|
|
17
|
+
*/
|
|
18
|
+
export function setPackageVersion(version) {
|
|
19
|
+
versionOverride = version;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Reset the version to the default build-time version
|
|
23
|
+
*/
|
|
24
|
+
export function resetPackageVersion() {
|
|
25
|
+
versionOverride = null;
|
|
29
26
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fencyai/js",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.38",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "staklau <steinaageklaussen@gmail.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"ts-jest": "^29.1.1",
|
|
40
40
|
"typescript": "^5.3.3"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "13bb1e815dadeb5800be355190ce8486121db136"
|
|
43
43
|
}
|