@leiyi-works/dsh-session-tmpdir 0.10.1 → 0.10.2
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/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -143,7 +143,7 @@ const COMMAND_SEGMENT_SPLIT = /(?:\r?\n|;|&&|\|\||\|)+/
|
|
|
143
143
|
* file write. Such a segment is judged by the code static scan (write signals paired with
|
|
144
144
|
* nearby path literals) instead of blaming every absolute path in the command text.
|
|
145
145
|
*/
|
|
146
|
-
const INTERPRETER_SEGMENT_PATTERN = /(?:^|[\\/\s"'
|
|
146
|
+
const INTERPRETER_SEGMENT_PATTERN = /(?:^|[\\/\s"'=$&])(?:node(?:\.exe)?|python3?(?:\.exe)?|perl|ruby)\b/i
|
|
147
147
|
/** Create verbs excluding the interpreters above (other real write commands in the same segment). */
|
|
148
148
|
const OTHER_CREATE_VERB_PATTERN =
|
|
149
149
|
/\b(?:New-Item|mkdir|md(?=\s)|Copy-Item|Move-Item|Set-Content|Add-Content|Out-File|Expand-Archive|git\s+clone|robocopy|tar|unzip|7z|touch|tee|New-ItemProperty|cp|mv|ln|install|dd|rsync|scp|truncate|sed)\b/i
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leiyi-works/dsh-session-tmpdir",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Per-session task temp folder with a long-term write guard. v0.9 (方案3): creating a new file outside _tmp requires the user's approval (per file by default, per directory with mode=dir), overwriting an existing file is allowed without asking, every write channel is guarded (write/edit, shell including ffmpeg/pandoc/Export-*/IO APIs, publish copies, code runtimes, unknown tools), and the persisted whitelist is shown in a left-sidebar panel「临时目录」 where entries can be removed. Every session also gets _tmp/<session title>/ in its working directory, cleaned 7 days after the session is deleted; the same tick reclaims the attachment store.",
|
|
6
6
|
"exports": {
|