🚀 v0.6.4

This commit is contained in:
目棃
2024-12-03 20:02:21 +08:00
parent 2f8f77940d
commit 1e47b4fd29
10 changed files with 134 additions and 60 deletions

View File

@@ -1815,7 +1815,7 @@
"allow-read-text-file-lines": {
"identifier": "allow-read-text-file-lines",
"description": "Enables the read_text_file_lines command without any pre-configured scope.",
"commands": { "allow": ["read_text_file_lines"], "deny": [] }
"commands": { "allow": ["read_text_file_lines", "read_text_file_lines_next"], "deny": [] }
},
"allow-read-text-file-lines-next": {
"identifier": "allow-read-text-file-lines-next",
@@ -1837,6 +1837,11 @@
"description": "Enables the seek command without any pre-configured scope.",
"commands": { "allow": ["seek"], "deny": [] }
},
"allow-size": {
"identifier": "allow-size",
"description": "Enables the size command without any pre-configured scope.",
"commands": { "allow": ["size"], "deny": [] }
},
"allow-stat": {
"identifier": "allow-stat",
"description": "Enables the stat command without any pre-configured scope.",
@@ -1865,7 +1870,7 @@
"allow-write-file": {
"identifier": "allow-write-file",
"description": "Enables the write_file command without any pre-configured scope.",
"commands": { "allow": ["write_file"], "deny": [] }
"commands": { "allow": ["write_file", "open", "write"], "deny": [] }
},
"allow-write-text-file": {
"identifier": "allow-write-text-file",
@@ -1962,6 +1967,11 @@
"description": "Denies the seek command without any pre-configured scope.",
"commands": { "allow": [], "deny": ["seek"] }
},
"deny-size": {
"identifier": "deny-size",
"description": "Denies the size command without any pre-configured scope.",
"commands": { "allow": [], "deny": ["size"] }
},
"deny-stat": {
"identifier": "deny-stat",
"description": "Denies the stat command without any pre-configured scope.",
@@ -2074,7 +2084,10 @@
"read-meta": {
"identifier": "read-meta",
"description": "This enables all index or metadata related commands without any pre-configured accessible paths.",
"commands": { "allow": ["read_dir", "stat", "lstat", "fstat", "exists"], "deny": [] }
"commands": {
"allow": ["read_dir", "stat", "lstat", "fstat", "exists", "size"],
"deny": []
}
},
"scope": {
"identifier": "scope",
@@ -3363,9 +3376,17 @@
"global_scope_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"anyOf": [
{ "description": "FS scope path.", "type": "string" },
{
"properties": { "path": { "description": "FS scope path.", "type": "string" } },
"description": "A path that can be accessed by the webview when using the fs APIs. FS scope path pattern.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
"type": "string"
},
{
"properties": {
"path": {
"description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
"type": "string"
}
},
"required": ["path"],
"type": "object"
}

View File

@@ -974,6 +974,11 @@
"type": "string",
"const": "fs:allow-seek"
},
{
"description": "Enables the size command without any pre-configured scope.",
"type": "string",
"const": "fs:allow-size"
},
{
"description": "Enables the stat command without any pre-configured scope.",
"type": "string",
@@ -1099,6 +1104,11 @@
"type": "string",
"const": "fs:deny-seek"
},
{
"description": "Denies the size command without any pre-configured scope.",
"type": "string",
"const": "fs:deny-size"
},
{
"description": "Denies the stat command without any pre-configured scope.",
"type": "string",
@@ -1571,7 +1581,7 @@
"description": "FS scope entry.",
"anyOf": [
{
"description": "FS scope path.",
"description": "A path that can be accessed by the webview when using the fs APIs. FS scope path pattern.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
"type": "string"
},
{
@@ -1579,7 +1589,7 @@
"required": ["path"],
"properties": {
"path": {
"description": "FS scope path.",
"description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
"type": "string"
}
}
@@ -1593,7 +1603,7 @@
"description": "FS scope entry.",
"anyOf": [
{
"description": "FS scope path.",
"description": "A path that can be accessed by the webview when using the fs APIs. FS scope path pattern.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
"type": "string"
},
{
@@ -1601,7 +1611,7 @@
"required": ["path"],
"properties": {
"path": {
"description": "FS scope path.",
"description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
"type": "string"
}
}
@@ -4381,6 +4391,11 @@
"type": "string",
"const": "fs:allow-seek"
},
{
"description": "Enables the size command without any pre-configured scope.",
"type": "string",
"const": "fs:allow-size"
},
{
"description": "Enables the stat command without any pre-configured scope.",
"type": "string",
@@ -4506,6 +4521,11 @@
"type": "string",
"const": "fs:deny-seek"
},
{
"description": "Denies the size command without any pre-configured scope.",
"type": "string",
"const": "fs:deny-size"
},
{
"description": "Denies the stat command without any pre-configured scope.",
"type": "string",

View File

@@ -974,6 +974,11 @@
"type": "string",
"const": "fs:allow-seek"
},
{
"description": "Enables the size command without any pre-configured scope.",
"type": "string",
"const": "fs:allow-size"
},
{
"description": "Enables the stat command without any pre-configured scope.",
"type": "string",
@@ -1099,6 +1104,11 @@
"type": "string",
"const": "fs:deny-seek"
},
{
"description": "Denies the size command without any pre-configured scope.",
"type": "string",
"const": "fs:deny-size"
},
{
"description": "Denies the stat command without any pre-configured scope.",
"type": "string",
@@ -1571,7 +1581,7 @@
"description": "FS scope entry.",
"anyOf": [
{
"description": "FS scope path.",
"description": "A path that can be accessed by the webview when using the fs APIs. FS scope path pattern.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
"type": "string"
},
{
@@ -1579,7 +1589,7 @@
"required": ["path"],
"properties": {
"path": {
"description": "FS scope path.",
"description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
"type": "string"
}
}
@@ -1593,7 +1603,7 @@
"description": "FS scope entry.",
"anyOf": [
{
"description": "FS scope path.",
"description": "A path that can be accessed by the webview when using the fs APIs. FS scope path pattern.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
"type": "string"
},
{
@@ -1601,7 +1611,7 @@
"required": ["path"],
"properties": {
"path": {
"description": "FS scope path.",
"description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
"type": "string"
}
}
@@ -4381,6 +4391,11 @@
"type": "string",
"const": "fs:allow-seek"
},
{
"description": "Enables the size command without any pre-configured scope.",
"type": "string",
"const": "fs:allow-size"
},
{
"description": "Enables the stat command without any pre-configured scope.",
"type": "string",
@@ -4506,6 +4521,11 @@
"type": "string",
"const": "fs:deny-seek"
},
{
"description": "Denies the size command without any pre-configured scope.",
"type": "string",
"const": "fs:deny-size"
},
{
"description": "Denies the stat command without any pre-configured scope.",
"type": "string",