exclude directory no_auto_execute from automaticaly execute javascript in extension

js files in directory  no_auto_execute will not be automaticaly executed like all other js files inside extension inside WEB_DIRECTORY
This commit is contained in:
grzegorzewskiflyingdog 2024-04-25 16:20:18 +02:00 committed by GitHub
parent 8dc19e40d1
commit 3eec3a70f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -135,6 +135,7 @@ class PromptServer():
for name, dir in nodes.EXTENSION_WEB_DIRS.items():
files = glob.glob(os.path.join(glob.escape(dir), '**/*.js'), recursive=True)
files = [file for file in files if 'no_auto_execute' not in file]
extensions.extend(list(map(lambda f: "/extensions/" + urllib.parse.quote(
name) + "/" + os.path.relpath(f, dir).replace("\\", "/"), files)))