@hasna/files 0.2.20 → 0.2.21

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/cli/index.js CHANGED
@@ -168340,7 +168340,11 @@ sources.command("bootstrap-prod-files").description("Create or update the produc
168340
168340
  const config9 = { profile: opts.awsProfile };
168341
168341
  const legacyProductionNames = new Set([opts.name, "prod-files"]);
168342
168342
  const legacyProductionBuckets = new Set([opts.bucket, "hasna-xyz-prod-files", "hasna-prod-files"]);
168343
- const existing = listSources().find((source2) => source2.type === "s3" && (legacyProductionNames.has(source2.name) || legacyProductionBuckets.has(source2.bucket ?? "")));
168343
+ const allSources = listSources();
168344
+ const activeDriveDestinationIds = new Set(allSources.filter((source2) => source2.enabled && source2.type === "google_drive").map((source2) => source2.config.destination_source_id).filter((id) => Boolean(id)));
168345
+ const configuredDefaultId = loadConfig().google_drive_default_destination_source_id;
168346
+ const candidates = allSources.filter((source2) => source2.type === "s3" && (legacyProductionNames.has(source2.name) || legacyProductionBuckets.has(source2.bucket ?? "")));
168347
+ const existing = candidates.find((source2) => activeDriveDestinationIds.has(source2.id)) ?? candidates.find((source2) => configuredDefaultId === source2.id) ?? candidates.find((source2) => source2.enabled) ?? candidates[0];
168344
168348
  const source = existing ? updateSource(existing.id, {
168345
168349
  name: opts.name,
168346
168350
  bucket: opts.bucket,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/files",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "description": "Agent-first file management — index local folders and S3 buckets, sync Google Drive, tag, search, and retrieve files via CLI + MCP",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",