draftify-cli 1.0.73 → 1.0.74
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/repl.js +3 -3
- package/package.json +1 -1
package/dist/repl.js
CHANGED
|
@@ -600,7 +600,7 @@ async function startRepl(initialUsername) {
|
|
|
600
600
|
const relative = path_1.default.relative(process.cwd(), targetPath);
|
|
601
601
|
return !relative.startsWith('..') && !path_1.default.isAbsolute(relative);
|
|
602
602
|
};
|
|
603
|
-
const deleteRegex = /<FILE_DELETE\s+path="([^"]+)"\s
|
|
603
|
+
const deleteRegex = /<FILE_DELETE\s+path="([^"]+)"\s*(?:\/>|>[\s\S]*?<\/FILE_DELETE>)/gi;
|
|
604
604
|
let match;
|
|
605
605
|
while ((match = deleteRegex.exec(result)) !== null) {
|
|
606
606
|
const filePath = match[1];
|
|
@@ -824,13 +824,13 @@ async function startRepl(initialUsername) {
|
|
|
824
824
|
displayResult = displayResult.replace(match[0], '');
|
|
825
825
|
}
|
|
826
826
|
const filesToReadAuto = [];
|
|
827
|
-
const readRegex = /<READ_FILE\s+path="([^"]+)"\s
|
|
827
|
+
const readRegex = /<READ_FILE\s+path="([^"]+)"\s*(?:\/>|>[\s\S]*?<\/READ_FILE>)/gi;
|
|
828
828
|
while ((match = readRegex.exec(result)) !== null) {
|
|
829
829
|
filesToReadAuto.push(match[1]);
|
|
830
830
|
displayResult = displayResult.replace(match[0], '');
|
|
831
831
|
}
|
|
832
832
|
const dirsToListAuto = [];
|
|
833
|
-
const listRegex = /<LIST_DIR\s+path="([^"]+)"\s
|
|
833
|
+
const listRegex = /<LIST_DIR\s+path="([^"]+)"\s*(?:\/>|>[\s\S]*?<\/LIST_DIR>)/gi;
|
|
834
834
|
while ((match = listRegex.exec(result)) !== null) {
|
|
835
835
|
dirsToListAuto.push(match[1]);
|
|
836
836
|
displayResult = displayResult.replace(match[0], '');
|