diff --git a/back/config/index.ts b/back/config/index.ts index de4f6cebf30..9b4d703748d 100644 --- a/back/config/index.ts +++ b/back/config/index.ts @@ -31,6 +31,7 @@ const tmpPath = path.join(rootPath, '.tmp/'); const samplePath = path.join(rootPath, 'sample/'); const configPath = path.join(dataPath, 'config/'); const scriptPath = path.join(dataPath, 'scripts/'); +const repoPath = path.join(dataPath, 'repo/'); const bakPath = path.join(dataPath, 'bak/'); const logPath = path.join(dataPath, 'log/'); const dbPath = path.join(dataPath, 'db/'); @@ -101,6 +102,7 @@ export default { uploadPath, configPath, scriptPath, + repoPath, samplePath, blackFileList: [ 'auth.json', diff --git a/back/services/subscription.ts b/back/services/subscription.ts index 69cc5fc23a8..039b08192d8 100644 --- a/back/services/subscription.ts +++ b/back/services/subscription.ts @@ -277,7 +277,9 @@ export default class SubscriptionService { } for (const doc of docs) { const filePath = join(config.scriptPath, doc.alias); + const repoPath = join(config.repoPath, doc.alias); await rmPath(filePath); + await rmPath(repoPath); } } } diff --git a/src/pages/script/index.tsx b/src/pages/script/index.tsx index 02bfb187f21..c420b69c85c 100644 --- a/src/pages/script/index.tsx +++ b/src/pages/script/index.tsx @@ -108,6 +108,7 @@ const Script = () => { }; const item = findNode(_data, (c) => c.key === obj.node.key); if (item) { + obj.node = item; setExpandedKeys([p as string]); onTreeSelect([vkey], obj); } @@ -643,7 +644,7 @@ const Script = () => { fontSize: 12, lineNumbersMinChars: 3, glyphMargin: false, - accessibilitySupport: 'off' + accessibilitySupport: 'off', }} onMount={(editor) => { editorRef.current = editor;