otomato-sdk 1.5.69 → 1.5.70

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 +1,19 @@
1
- export const SDK_VERSION = '1.5.69';
1
+ export const SDK_VERSION = '1.5.70';
2
+ export function compareVersions(v1, v2) {
3
+ // Split the version strings into parts
4
+ const v1Parts = v1.split('.').map(Number);
5
+ const v2Parts = v2.split('.').map(Number);
6
+ // Determine the maximum length to compare all parts
7
+ const len = Math.max(v1Parts.length, v2Parts.length);
8
+ // Compare each part
9
+ for (let i = 0; i < len; i++) {
10
+ const v1Part = v1Parts[i] || 0; // Default to 0 if undefined
11
+ const v2Part = v2Parts[i] || 0;
12
+ if (v1Part > v2Part)
13
+ return 1; // v1 is greater
14
+ if (v1Part < v2Part)
15
+ return -1; // v2 is greater
16
+ // If equal, continue to the next part
17
+ }
18
+ return 0; // Versions are equal
19
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
- export declare const SDK_VERSION = "1.5.69";
1
+ export declare const SDK_VERSION = "1.5.70";
2
+ export declare function compareVersions(v1: string, v2: string): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "otomato-sdk",
3
- "version": "1.5.69",
3
+ "version": "1.5.70",
4
4
  "description": "An SDK for building and managing automations on Otomato",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/types/src/index.d.ts",