@camstack/system 1.2.20 → 1.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.
@@ -3130,13 +3130,20 @@ var SystemBackupService = class {
3130
3130
  try {
3131
3131
  const stagedInDataDir = node_path.join(this.dataDir, ARCHIVE_MANIFEST_NAME);
3132
3132
  node_fs.copyFileSync(manifestStagePath, stagedInDataDir);
3133
+ const stagingRel = node_path.relative(this.dataDir, node_path.dirname(opts.archivePath));
3134
+ const excludePrefix = stagingRel && !stagingRel.startsWith("..") && !node_path.isAbsolute(stagingRel) ? stagingRel : null;
3133
3135
  try {
3134
3136
  await Kn({
3135
3137
  file: opts.archivePath,
3136
3138
  gzip: true,
3137
3139
  cwd: this.dataDir,
3138
3140
  follow: true,
3139
- portable: true
3141
+ portable: true,
3142
+ filter: (entryPath) => {
3143
+ if (!excludePrefix) return true;
3144
+ const norm = entryPath.replace(/^\.\//, "").replace(/\/+$/, "");
3145
+ return norm !== excludePrefix && !norm.startsWith(`${excludePrefix}/`);
3146
+ }
3140
3147
  }, [ARCHIVE_MANIFEST_NAME, ...present]);
3141
3148
  } finally {
3142
3149
  try {
@@ -3115,13 +3115,20 @@ var SystemBackupService = class {
3115
3115
  try {
3116
3116
  const stagedInDataDir = path$1.join(this.dataDir, ARCHIVE_MANIFEST_NAME);
3117
3117
  fs.copyFileSync(manifestStagePath, stagedInDataDir);
3118
+ const stagingRel = path$1.relative(this.dataDir, path$1.dirname(opts.archivePath));
3119
+ const excludePrefix = stagingRel && !stagingRel.startsWith("..") && !path$1.isAbsolute(stagingRel) ? stagingRel : null;
3118
3120
  try {
3119
3121
  await Kn({
3120
3122
  file: opts.archivePath,
3121
3123
  gzip: true,
3122
3124
  cwd: this.dataDir,
3123
3125
  follow: true,
3124
- portable: true
3126
+ portable: true,
3127
+ filter: (entryPath) => {
3128
+ if (!excludePrefix) return true;
3129
+ const norm = entryPath.replace(/^\.\//, "").replace(/\/+$/, "");
3130
+ return norm !== excludePrefix && !norm.startsWith(`${excludePrefix}/`);
3131
+ }
3125
3132
  }, [ARCHIVE_MANIFEST_NAME, ...present]);
3126
3133
  } finally {
3127
3134
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.20",
3
+ "version": "1.2.21",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",