@pmate/cli 0.24.40 → 0.24.41

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16398,10 +16398,13 @@ async function archiveMessageImages(rootDir, sourceKey, threadKey, messages2) {
16398
16398
  );
16399
16399
  }
16400
16400
  async function archiveMessageImage(rootDir, attachmentRoot, threadKey, imagePath) {
16401
- if (!imagePath || isExternalImageRef(imagePath) || imagePath.startsWith("attachments/")) {
16401
+ if (!imagePath || isExternalImageRef(imagePath)) {
16402
16402
  return imagePath;
16403
16403
  }
16404
16404
  const normalized = import_node_path18.default.posix.normalize(imagePath.replace(/\\/g, "/"));
16405
+ if (normalized.startsWith("attachments/")) {
16406
+ return import_node_path18.default.join(rootDir, ...normalized.split("/"));
16407
+ }
16405
16408
  if (normalized.startsWith("../") || import_node_path18.default.posix.isAbsolute(normalized)) {
16406
16409
  return imagePath;
16407
16410
  }
@@ -16411,7 +16414,7 @@ async function archiveMessageImage(rootDir, attachmentRoot, threadKey, imagePath
16411
16414
  try {
16412
16415
  await import_node_fs13.promises.mkdir(import_node_path18.default.dirname(destinationPath), { recursive: true });
16413
16416
  await import_node_fs13.promises.copyFile(sourcePath, destinationPath);
16414
- return destinationRelativePath;
16417
+ return destinationPath;
16415
16418
  } catch {
16416
16419
  return imagePath;
16417
16420
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pmate/cli",
3
- "version": "0.24.40",
3
+ "version": "0.24.41",
4
4
  "description": "CLI utilities for the pMate project",
5
5
  "license": "MIT",
6
6
  "bin": {