@hasna/files 0.2.26 → 0.2.27

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
@@ -167924,8 +167924,9 @@ async function importGoogleDriveStream(source, storageType, item, config9, downl
167924
167924
  const importedName = basename5(downloaded.filename);
167925
167925
  const importedPath = buildImportedPath(config9, item, importedName);
167926
167926
  const contentType = downloaded.mimeType || ($lookup(downloaded.filename) || item.mime || "application/octet-stream");
167927
- const size = downloaded.size ?? item.size;
167928
- const storageKey = await writeStreamToDestination(source, storageType, importedPath, downloaded.body, contentType, size);
167927
+ const contentLength = downloaded.size && downloaded.size > 0 ? downloaded.size : item.size > 0 ? item.size : undefined;
167928
+ const size = contentLength ?? 0;
167929
+ const storageKey = await writeStreamToDestination(source, storageType, importedPath, downloaded.body, contentType, contentLength);
167929
167930
  return {
167930
167931
  importedName,
167931
167932
  importedPath,
@@ -168337,7 +168338,7 @@ sources.command("add-google-drive").description("Add a Google Drive source that
168337
168338
  process.exit(1);
168338
168339
  });
168339
168340
  });
168340
- 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").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) => {
168341
168342
  const machine = getCurrentMachine();
168342
168343
  const config9 = { profile: opts.awsProfile };
168343
168344
  const legacyProductionNames = new Set([opts.name, "prod-files"]);
package/dist/index.js CHANGED
@@ -164517,8 +164517,9 @@ async function importGoogleDriveStream(source, storageType, item, config9, downl
164517
164517
  const importedName = basename5(downloaded.filename);
164518
164518
  const importedPath = buildImportedPath(config9, item, importedName);
164519
164519
  const contentType = downloaded.mimeType || ($lookup(downloaded.filename) || item.mime || "application/octet-stream");
164520
- const size = downloaded.size ?? item.size;
164521
- const storageKey = await writeStreamToDestination(source, storageType, importedPath, downloaded.body, contentType, size);
164520
+ const contentLength = downloaded.size && downloaded.size > 0 ? downloaded.size : item.size > 0 ? item.size : undefined;
164521
+ const size = contentLength ?? 0;
164522
+ const storageKey = await writeStreamToDestination(source, storageType, importedPath, downloaded.body, contentType, contentLength);
164522
164523
  return {
164523
164524
  importedName,
164524
164525
  importedPath,
package/dist/mcp/index.js CHANGED
@@ -183448,8 +183448,9 @@ async function importGoogleDriveStream(source, storageType, item, config9, downl
183448
183448
  const importedName = basename5(downloaded.filename);
183449
183449
  const importedPath = buildImportedPath(config9, item, importedName);
183450
183450
  const contentType = downloaded.mimeType || ($lookup(downloaded.filename) || item.mime || "application/octet-stream");
183451
- const size = downloaded.size ?? item.size;
183452
- const storageKey = await writeStreamToDestination(source, storageType, importedPath, downloaded.body, contentType, size);
183451
+ const contentLength = downloaded.size && downloaded.size > 0 ? downloaded.size : item.size > 0 ? item.size : undefined;
183452
+ const size = contentLength ?? 0;
183453
+ const storageKey = await writeStreamToDestination(source, storageType, importedPath, downloaded.body, contentType, contentLength);
183453
183454
  return {
183454
183455
  importedName,
183455
183456
  importedPath,
@@ -164187,8 +164187,9 @@ async function importGoogleDriveStream(source, storageType, item, config9, downl
164187
164187
  const importedName = basename5(downloaded.filename);
164188
164188
  const importedPath = buildImportedPath(config9, item, importedName);
164189
164189
  const contentType = downloaded.mimeType || ($lookup(downloaded.filename) || item.mime || "application/octet-stream");
164190
- const size = downloaded.size ?? item.size;
164191
- const storageKey = await writeStreamToDestination(source, storageType, importedPath, downloaded.body, contentType, size);
164190
+ const contentLength = downloaded.size && downloaded.size > 0 ? downloaded.size : item.size > 0 ? item.size : undefined;
164191
+ const size = contentLength ?? 0;
164192
+ const storageKey = await writeStreamToDestination(source, storageType, importedPath, downloaded.body, contentType, contentLength);
164192
164193
  return {
164193
164194
  importedName,
164194
164195
  importedPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/files",
3
- "version": "0.2.26",
3
+ "version": "0.2.27",
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",