botinabox 2.16.19 → 2.16.20
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/index.js +2 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2688,10 +2688,8 @@ var DataStore = class {
|
|
|
2688
2688
|
slug: (row) => {
|
|
2689
2689
|
const val = row[def.slugColumn];
|
|
2690
2690
|
const raw = val == null ? String(row.id ?? row.name ?? "unknown") : String(val);
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
}
|
|
2694
|
-
return raw;
|
|
2691
|
+
const safe = raw.replace(/[/\\]/g, "-").replace(/\.{2,}/g, "-").replace(/^\.+/, "").trim();
|
|
2692
|
+
return safe.length > 0 ? safe : String(row.id ?? "unknown");
|
|
2695
2693
|
},
|
|
2696
2694
|
directoryRoot: def.directory,
|
|
2697
2695
|
files: def.files,
|