md4ai 0.16.0 → 0.16.2
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/index.bundled.js +18 -6
- package/package.json +1 -1
package/dist/index.bundled.js
CHANGED
|
@@ -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.
|
|
125
|
+
CURRENT_VERSION = true ? "0.16.2" : "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();
|
|
@@ -1954,7 +1961,8 @@ async function scanDoppler(projectRoot, folderId) {
|
|
|
1954
1961
|
}
|
|
1955
1962
|
if (!projectSlug) {
|
|
1956
1963
|
if (!folderId || !process.stdin.isTTY) {
|
|
1957
|
-
|
|
1964
|
+
const suggestedSlug = basename(projectRoot).toLowerCase().replace(/[^a-z0-9-]/g, "-");
|
|
1965
|
+
console.log(chalk10.dim(` Doppler: token configured but no project linked. Run: md4ai doppler set-project ${suggestedSlug}`));
|
|
1958
1966
|
return null;
|
|
1959
1967
|
}
|
|
1960
1968
|
const projects = await fetchDopplerProjects(tokenResult.token);
|
|
@@ -2821,7 +2829,8 @@ function isValidProjectPath(p) {
|
|
|
2821
2829
|
async function syncCommand(options) {
|
|
2822
2830
|
const { supabase, userId } = await getAuthenticatedClient();
|
|
2823
2831
|
if (options.all) {
|
|
2824
|
-
const
|
|
2832
|
+
const currentDeviceName = detectDeviceName();
|
|
2833
|
+
const { data: devices, error } = await supabase.from("device_paths").select("folder_id, device_name, path").eq("device_name", currentDeviceName);
|
|
2825
2834
|
if (error || !devices?.length) {
|
|
2826
2835
|
console.error(chalk15.red("No devices found."));
|
|
2827
2836
|
process.exit(1);
|
|
@@ -2837,7 +2846,7 @@ async function syncCommand(options) {
|
|
|
2837
2846
|
console.log(chalk15.yellow(` ${proposedAll.length} file(s) proposed for deletion \u2014 run \`md4ai scan\` to review.`));
|
|
2838
2847
|
}
|
|
2839
2848
|
try {
|
|
2840
|
-
const result = await scanProject(device.path);
|
|
2849
|
+
const result = await scanProject(device.path, device.folder_id);
|
|
2841
2850
|
const { data: allDeviceRow } = await supabase.from("devices").select("id").eq("user_id", userId).eq("device_name", device.device_name).single();
|
|
2842
2851
|
const allDeviceId = allDeviceRow?.id;
|
|
2843
2852
|
try {
|
|
@@ -2903,7 +2912,7 @@ async function syncCommand(options) {
|
|
|
2903
2912
|
if (proposedSingle?.length) {
|
|
2904
2913
|
console.log(chalk15.yellow(` ${proposedSingle.length} file(s) proposed for deletion \u2014 run \`md4ai scan\` to review.`));
|
|
2905
2914
|
}
|
|
2906
|
-
const result = await scanProject(device.path);
|
|
2915
|
+
const result = await scanProject(device.path, device.folder_id);
|
|
2907
2916
|
const { data: singleDeviceRow } = await supabase.from("devices").select("id").eq("user_id", userId).eq("device_name", device.device_name).single();
|
|
2908
2917
|
const singleDeviceId = singleDeviceRow?.id;
|
|
2909
2918
|
try {
|
|
@@ -2952,6 +2961,7 @@ var init_sync = __esm({
|
|
|
2952
2961
|
init_scanner();
|
|
2953
2962
|
init_push_toolings();
|
|
2954
2963
|
init_check_update();
|
|
2964
|
+
init_device_utils();
|
|
2955
2965
|
}
|
|
2956
2966
|
});
|
|
2957
2967
|
|
|
@@ -4756,7 +4766,9 @@ async function postUpdateFlow() {
|
|
|
4756
4766
|
}
|
|
4757
4767
|
}
|
|
4758
4768
|
const { supabase } = await getAuthenticatedClient();
|
|
4759
|
-
const {
|
|
4769
|
+
const { detectDeviceName: detectDeviceName2 } = await Promise.resolve().then(() => (init_device_utils(), device_utils_exports));
|
|
4770
|
+
const currentDeviceName = detectDeviceName2();
|
|
4771
|
+
const { data: linkedPaths } = await supabase.from("device_paths").select("path, folder_id").eq("device_name", currentDeviceName).order("path");
|
|
4760
4772
|
let linkedDisplay = "";
|
|
4761
4773
|
if (linkedPaths?.length) {
|
|
4762
4774
|
const folderIds = [...new Set(linkedPaths.map((p) => p.folder_id))];
|