@hasna/files 0.2.28 → 0.2.30

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
@@ -168144,7 +168144,7 @@ function shouldArchiveGoogleDriveDownloadError(item, error) {
168144
168144
  if (!item.mime.startsWith("application/vnd.google-apps."))
168145
168145
  return false;
168146
168146
  const message = error.message ?? String(error);
168147
- return /cannot be exported/i.test(message);
168147
+ return /(?:cannot|too large to) be exported/i.test(message);
168148
168148
  }
168149
168149
  function createGoogleDriveMetadataArchive(item, reason = "Google Drive item is not exportable as file content through Drive export.") {
168150
168150
  const metadata = {
@@ -168338,11 +168338,11 @@ sources.command("add-google-drive").description("Add a Google Drive source that
168338
168338
  process.exit(1);
168339
168339
  });
168340
168340
  });
168341
- sources.command("bootstrap-prod-files").description("Create or update the production S3 source for Google Drive archive sync").option("--bucket <bucket>", "Production archive bucket", "hasna-xyz-prod-files").option("--region <region>", "AWS region", "us-east-1").option("--aws-profile <profile>", "AWS shared config profile", "hasna-xyz-infra").option("--prefix <prefix>", "S3 key prefix for Drive objects", "google-drive").option("-n, --name <name>", "Source name", "prod-files").option("--no-google-drive-default", "Do not set this source as the default Google Drive destination").option("--json", "Output as JSON").action((opts) => {
168341
+ sources.command("bootstrap-prod-files").alias("bootstrap-prod-emails").description("Create or update the production S3 source for Google Drive archive sync").option("--bucket <bucket>", "Production archive bucket", "hasna-xyz-prod-emails").option("--region <region>", "AWS region", "us-west-2").option("--aws-profile <profile>", "AWS shared config profile", "hasna-xyz-infra").option("--prefix <prefix>", "S3 key prefix for Drive objects", "drive").option("-n, --name <name>", "Source name", "prod-emails-drive").option("--no-google-drive-default", "Do not set this source as the default Google Drive destination").option("--json", "Output as JSON").action((opts) => {
168342
168342
  const machine = getCurrentMachine();
168343
168343
  const config9 = { profile: opts.awsProfile };
168344
- const legacyProductionNames = new Set([opts.name, "prod-files"]);
168345
- const legacyProductionBuckets = new Set([opts.bucket, "hasna-xyz-prod-files", "hasna-prod-files"]);
168344
+ const legacyProductionNames = new Set([opts.name, "prod-emails-drive", "prod-files"]);
168345
+ const legacyProductionBuckets = new Set([opts.bucket, "hasna-xyz-prod-emails", "hasna-xyz-prod-files", "hasna-prod-files"]);
168346
168346
  const allSources = listSources();
168347
168347
  const activeDriveDestinationIds = new Set(allSources.filter((source2) => source2.enabled && source2.type === "google_drive").map((source2) => source2.config.destination_source_id).filter((id) => Boolean(id)));
168348
168348
  const configuredDefaultId = loadConfig().google_drive_default_destination_source_id;
package/dist/index.js CHANGED
@@ -164737,7 +164737,7 @@ function shouldArchiveGoogleDriveDownloadError(item, error) {
164737
164737
  if (!item.mime.startsWith("application/vnd.google-apps."))
164738
164738
  return false;
164739
164739
  const message = error.message ?? String(error);
164740
- return /cannot be exported/i.test(message);
164740
+ return /(?:cannot|too large to) be exported/i.test(message);
164741
164741
  }
164742
164742
  function createGoogleDriveMetadataArchive(item, reason = "Google Drive item is not exportable as file content through Drive export.") {
164743
164743
  const metadata = {
package/dist/mcp/index.js CHANGED
@@ -183668,7 +183668,7 @@ function shouldArchiveGoogleDriveDownloadError(item, error) {
183668
183668
  if (!item.mime.startsWith("application/vnd.google-apps."))
183669
183669
  return false;
183670
183670
  const message = error.message ?? String(error);
183671
- return /cannot be exported/i.test(message);
183671
+ return /(?:cannot|too large to) be exported/i.test(message);
183672
183672
  }
183673
183673
  function createGoogleDriveMetadataArchive(item, reason = "Google Drive item is not exportable as file content through Drive export.") {
183674
183674
  const metadata = {
@@ -164407,7 +164407,7 @@ function shouldArchiveGoogleDriveDownloadError(item, error) {
164407
164407
  if (!item.mime.startsWith("application/vnd.google-apps."))
164408
164408
  return false;
164409
164409
  const message = error.message ?? String(error);
164410
- return /cannot be exported/i.test(message);
164410
+ return /(?:cannot|too large to) be exported/i.test(message);
164411
164411
  }
164412
164412
  function createGoogleDriveMetadataArchive(item, reason = "Google Drive item is not exportable as file content through Drive export.") {
164413
164413
  const metadata = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/files",
3
- "version": "0.2.28",
3
+ "version": "0.2.30",
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",