md4ai 0.16.0 → 0.16.1

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.
@@ -122,7 +122,7 @@ var CURRENT_VERSION;
122
122
  var init_check_update = __esm({
123
123
  "dist/check-update.js"() {
124
124
  "use strict";
125
- CURRENT_VERSION = true ? "0.16.0" : "0.0.0-dev";
125
+ CURRENT_VERSION = true ? "0.16.1" : "0.0.0-dev";
126
126
  }
127
127
  });
128
128
 
@@ -304,6 +304,13 @@ var init_login = __esm({
304
304
  });
305
305
 
306
306
  // dist/device-utils.js
307
+ var device_utils_exports = {};
308
+ __export(device_utils_exports, {
309
+ detectDeviceName: () => detectDeviceName,
310
+ detectOs: () => detectOs,
311
+ resolveDeviceId: () => resolveDeviceId,
312
+ updateDeviceCliVersion: () => updateDeviceCliVersion
313
+ });
307
314
  import { hostname, platform } from "node:os";
308
315
  function detectOs() {
309
316
  const p = platform();
@@ -2821,7 +2828,8 @@ function isValidProjectPath(p) {
2821
2828
  async function syncCommand(options) {
2822
2829
  const { supabase, userId } = await getAuthenticatedClient();
2823
2830
  if (options.all) {
2824
- const { data: devices, error } = await supabase.from("device_paths").select("folder_id, device_name, path");
2831
+ const currentDeviceName = detectDeviceName();
2832
+ const { data: devices, error } = await supabase.from("device_paths").select("folder_id, device_name, path").eq("device_name", currentDeviceName);
2825
2833
  if (error || !devices?.length) {
2826
2834
  console.error(chalk15.red("No devices found."));
2827
2835
  process.exit(1);
@@ -2952,6 +2960,7 @@ var init_sync = __esm({
2952
2960
  init_scanner();
2953
2961
  init_push_toolings();
2954
2962
  init_check_update();
2963
+ init_device_utils();
2955
2964
  }
2956
2965
  });
2957
2966
 
@@ -4756,7 +4765,9 @@ async function postUpdateFlow() {
4756
4765
  }
4757
4766
  }
4758
4767
  const { supabase } = await getAuthenticatedClient();
4759
- const { data: linkedPaths } = await supabase.from("device_paths").select("path, folder_id").order("path");
4768
+ const { detectDeviceName: detectDeviceName2 } = await Promise.resolve().then(() => (init_device_utils(), device_utils_exports));
4769
+ const currentDeviceName = detectDeviceName2();
4770
+ const { data: linkedPaths } = await supabase.from("device_paths").select("path, folder_id").eq("device_name", currentDeviceName).order("path");
4760
4771
  let linkedDisplay = "";
4761
4772
  if (linkedPaths?.length) {
4762
4773
  const folderIds = [...new Set(linkedPaths.map((p) => p.folder_id))];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md4ai",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "CLI for MD4AI — scan Claude projects and sync to your dashboard",
5
5
  "type": "module",
6
6
  "bin": {