engine7 7.1.16 → 7.1.18

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/cli.mjs +5 -14
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -38,6 +38,7 @@ function sanitizeContent(content, dirs) {
38
38
  if (original) {
39
39
  result = result.split(original).join(placeholder);
40
40
  result = result.split(original.replace(/\//g, "\\")).join(placeholder);
41
+ result = result.split(original.replace(/\//g, "\\\\")).join(placeholder);
41
42
  }
42
43
  }
43
44
  return result;
@@ -232,13 +233,8 @@ async function doExport(opts) {
232
233
  const relPath = path.relative(stateDir, srcFile);
233
234
  const destFile = path.join(stagingDir, relPath);
234
235
  fs.mkdirSync(path.dirname(destFile), { recursive: true });
235
- const baseName = path.basename(srcFile);
236
- if (baseName === "session-index.json" || baseName === "platform-map.json") {
237
- const content = fs.readFileSync(srcFile, "utf-8");
238
- fs.writeFileSync(destFile, sanitizeContent(content, dirs));
239
- } else {
240
- fs.copyFileSync(srcFile, destFile);
241
- }
236
+ const content = fs.readFileSync(srcFile, "utf-8");
237
+ fs.writeFileSync(destFile, sanitizeContent(content, dirs));
242
238
  fileCount++;
243
239
  totalSize += fs.statSync(srcFile).size;
244
240
  }
@@ -347,13 +343,8 @@ async function doImport(opts) {
347
343
  const relPath = path.relative(stagingDir, srcFile);
348
344
  const destFile = path.join(stateDir, relPath);
349
345
  fs.mkdirSync(path.dirname(destFile), { recursive: true });
350
- const baseName = path.basename(srcFile);
351
- if (baseName === "session-index.json" || baseName === "platform-map.json") {
352
- const content = fs.readFileSync(srcFile, "utf-8");
353
- fs.writeFileSync(destFile, restoreContent(content, dirs));
354
- } else {
355
- fs.copyFileSync(srcFile, destFile);
356
- }
346
+ const content = fs.readFileSync(srcFile, "utf-8");
347
+ fs.writeFileSync(destFile, restoreContent(content, dirs));
357
348
  restoredCount++;
358
349
  }
359
350
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "engine7",
3
- "version": "7.1.16",
3
+ "version": "7.1.18",
4
4
  "type": "module",
5
5
  "description": "Engine 7 — Self-hosted AI agent engine",
6
6
  "main": "dist/main.mjs",