episoda 0.2.63 → 0.2.64
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/dist/daemon/daemon-process.js +51 -43
- package/dist/daemon/daemon-process.js.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3729,11 +3729,12 @@ async function findProjectRoot(startPath) {
|
|
|
3729
3729
|
|
|
3730
3730
|
// src/api/machine-settings.ts
|
|
3731
3731
|
async function fetchProjectPath(config, projectId) {
|
|
3732
|
-
|
|
3732
|
+
const machineUuid = config.machine_uuid || config.device_id;
|
|
3733
|
+
if (!machineUuid || !config.access_token) {
|
|
3733
3734
|
return null;
|
|
3734
3735
|
}
|
|
3735
3736
|
const serverUrl = config.api_url || "https://episoda.dev";
|
|
3736
|
-
const url = `${serverUrl}/api/dev/machines/${
|
|
3737
|
+
const url = `${serverUrl}/api/dev/machines/${machineUuid}/project-path/${projectId}`;
|
|
3737
3738
|
try {
|
|
3738
3739
|
const response = await fetch(url, {
|
|
3739
3740
|
method: "GET",
|
|
@@ -3757,11 +3758,12 @@ async function fetchProjectPath(config, projectId) {
|
|
|
3757
3758
|
}
|
|
3758
3759
|
}
|
|
3759
3760
|
async function syncProjectPath(config, projectId, path16) {
|
|
3760
|
-
|
|
3761
|
+
const machineUuid = config.machine_uuid || config.device_id;
|
|
3762
|
+
if (!machineUuid || !config.access_token) {
|
|
3761
3763
|
return false;
|
|
3762
3764
|
}
|
|
3763
3765
|
const serverUrl = config.api_url || "https://episoda.dev";
|
|
3764
|
-
const url = `${serverUrl}/api/dev/machines/${
|
|
3766
|
+
const url = `${serverUrl}/api/dev/machines/${machineUuid}/project-path/${projectId}`;
|
|
3765
3767
|
try {
|
|
3766
3768
|
const response = await fetch(url, {
|
|
3767
3769
|
method: "PUT",
|