@recallai/desktop-sdk 2025.6.3-781c2eb8eac035fd576f44c6593d34a7d9b043fa → 2025.6.7-223210e6830189fe8fb8be1448967f8e1a197238

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.
Binary file
Binary file
package/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "@recallai/desktop-sdk",
3
- "version": "2025.06.03-781c2eb8eac035fd576f44c6593d34a7d9b043fa",
3
+ "version": "2025.06.07-223210e6830189fe8fb8be1448967f8e1a197238",
4
4
  "description": "Recall Desktop SDK (Alpha)",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
7
7
  "dependencies": {
8
+ "tar": "^7.4.3",
8
9
  "uuid": "^11.1.0"
9
10
  },
10
11
  "scripts": {
11
- "install": "./unpack-frameworks.sh",
12
+ "install": "node ./setup.js",
12
13
  "validate-types": "tsc --noEmit index.d.ts"
13
14
  },
14
15
  "devDependencies": {
15
16
  "typescript": "^5.3.3"
16
17
  }
17
- }
18
+ }
package/setup.js ADDED
@@ -0,0 +1,49 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+ const tar = require("tar");
4
+
5
+ async function setupMacOS() {
6
+ const frameworksDir = path.join(__dirname, "Frameworks");
7
+ const tarPath = path.join(__dirname, "desktop_sdk_macos_frameworks.tar");
8
+
9
+ const frameworksExists = fs.existsSync(frameworksDir);
10
+
11
+ if (!fs.existsSync(tarPath)) {
12
+ // Framework was already installed properly, no updated tar package exists.
13
+ // Some users are reporting this command running twice, so use this as a gate.
14
+ if (frameworksExists) {
15
+ return;
16
+ } else {
17
+ console.error("Missing framework tar file");
18
+ process.exit(1);
19
+ }
20
+ }
21
+
22
+ if (!frameworksExists) {
23
+ fs.mkdirSync(frameworksDir);
24
+ }
25
+
26
+ try {
27
+ await tar.extract({ file: tarPath, cwd: frameworksDir });
28
+ } catch (e) {
29
+ console.error("Error extracting tar file:", e);
30
+ process.exit(1);
31
+ }
32
+
33
+ fs.unlinkSync(tarPath);
34
+ }
35
+
36
+ async function setup() {
37
+ if (process.platform === "darwin") {
38
+ await setupMacOS();
39
+ } else {
40
+ console.error("Unsupported platform.");
41
+ process.exit(1);
42
+ }
43
+ }
44
+
45
+ if (process.env.RECALL_LOCAL_BUILD) {
46
+ console.log("Doing local build, skipping framework unpacking");
47
+ } else {
48
+ setup();
49
+ }
@@ -1,16 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -x
4
-
5
- if [[ ! -z "$RECALL_LOCAL_BUILD" ]]; then
6
- echo "Doing local build, skipping framework unpacking"
7
- exit 0
8
- fi
9
-
10
- mkdir -p Frameworks
11
-
12
- pushd Frameworks
13
- tar xvf ../desktop_sdk_macos_frameworks.tar
14
- popd
15
-
16
- rm -f desktop_sdk_macos_frameworks.tar