mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-06 04:42:36 +02:00
Add decaf webui
This commit is contained in:
parent
6b4c9bb531
commit
69c0388954
742 changed files with 608981 additions and 6 deletions
86
webui/node_modules/vite/bin/openChrome.applescript
generated
vendored
Normal file
86
webui/node_modules/vite/bin/openChrome.applescript
generated
vendored
Normal file
|
@ -0,0 +1,86 @@
|
|||
(*
|
||||
Copyright (c) 2015-present, Facebook, Inc.
|
||||
|
||||
This source code is licensed under the MIT license found in the
|
||||
LICENSE file at
|
||||
https://github.com/facebookincubator/create-react-app/blob/master/LICENSE
|
||||
*)
|
||||
|
||||
property targetTab: null
|
||||
property targetTabIndex: -1
|
||||
property targetWindow: null
|
||||
|
||||
on run argv
|
||||
set theURL to item 1 of argv
|
||||
|
||||
with timeout of 2 seconds
|
||||
tell application "Chrome"
|
||||
|
||||
if (count every window) = 0 then
|
||||
make new window
|
||||
end if
|
||||
|
||||
-- 1: Looking for tab running debugger
|
||||
-- then, Reload debugging tab if found
|
||||
-- then return
|
||||
set found to my lookupTabWithUrl(theURL)
|
||||
if found then
|
||||
set targetWindow's active tab index to targetTabIndex
|
||||
tell targetTab to reload
|
||||
tell targetWindow to activate
|
||||
set index of targetWindow to 1
|
||||
return
|
||||
end if
|
||||
|
||||
-- 2: Looking for Empty tab
|
||||
-- In case debugging tab was not found
|
||||
-- We try to find an empty tab instead
|
||||
set found to my lookupTabWithUrl("chrome://newtab/")
|
||||
if found then
|
||||
set targetWindow's active tab index to targetTabIndex
|
||||
set URL of targetTab to theURL
|
||||
tell targetWindow to activate
|
||||
return
|
||||
end if
|
||||
|
||||
-- 3: Create new tab
|
||||
-- both debugging and empty tab were not found
|
||||
-- make a new tab with url
|
||||
tell window 1
|
||||
activate
|
||||
make new tab with properties {URL:theURL}
|
||||
end tell
|
||||
end tell
|
||||
end timeout
|
||||
end run
|
||||
|
||||
-- Function:
|
||||
-- Lookup tab with given url
|
||||
-- if found, store tab, index, and window in properties
|
||||
-- (properties were declared on top of file)
|
||||
on lookupTabWithUrl(lookupUrl)
|
||||
tell application "Chrome"
|
||||
-- Find a tab with the given url
|
||||
set found to false
|
||||
set theTabIndex to -1
|
||||
repeat with theWindow in every window
|
||||
set theTabIndex to 0
|
||||
repeat with theTab in every tab of theWindow
|
||||
set theTabIndex to theTabIndex + 1
|
||||
if (theTab's URL as string) contains lookupUrl then
|
||||
-- assign tab, tab index, and window to properties
|
||||
set targetTab to theTab
|
||||
set targetTabIndex to theTabIndex
|
||||
set targetWindow to theWindow
|
||||
set found to true
|
||||
exit repeat
|
||||
end if
|
||||
end repeat
|
||||
|
||||
if found then
|
||||
exit repeat
|
||||
end if
|
||||
end repeat
|
||||
end tell
|
||||
return found
|
||||
end lookupTabWithUrl
|
61
webui/node_modules/vite/bin/vite.js
generated
vendored
Executable file
61
webui/node_modules/vite/bin/vite.js
generated
vendored
Executable file
|
@ -0,0 +1,61 @@
|
|||
#!/usr/bin/env node
|
||||
import { performance } from 'node:perf_hooks'
|
||||
|
||||
if (!import.meta.url.includes('node_modules')) {
|
||||
try {
|
||||
// only available as dev dependency
|
||||
await import('source-map-support').then((r) => r.default.install())
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
global.__vite_start_time = performance.now()
|
||||
|
||||
// check debug mode first before requiring the CLI.
|
||||
const debugIndex = process.argv.findIndex((arg) => /^(?:-d|--debug)$/.test(arg))
|
||||
const filterIndex = process.argv.findIndex((arg) =>
|
||||
/^(?:-f|--filter)$/.test(arg)
|
||||
)
|
||||
const profileIndex = process.argv.indexOf('--profile')
|
||||
|
||||
if (debugIndex > 0) {
|
||||
let value = process.argv[debugIndex + 1]
|
||||
if (!value || value.startsWith('-')) {
|
||||
value = 'vite:*'
|
||||
} else {
|
||||
// support debugging multiple flags with comma-separated list
|
||||
value = value
|
||||
.split(',')
|
||||
.map((v) => `vite:${v}`)
|
||||
.join(',')
|
||||
}
|
||||
process.env.DEBUG = `${
|
||||
process.env.DEBUG ? process.env.DEBUG + ',' : ''
|
||||
}${value}`
|
||||
|
||||
if (filterIndex > 0) {
|
||||
const filter = process.argv[filterIndex + 1]
|
||||
if (filter && !filter.startsWith('-')) {
|
||||
process.env.VITE_DEBUG_FILTER = filter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function start() {
|
||||
return import('../dist/node/cli.js')
|
||||
}
|
||||
|
||||
if (profileIndex > 0) {
|
||||
process.argv.splice(profileIndex, 1)
|
||||
const next = process.argv[profileIndex]
|
||||
if (next && !next.startsWith('-')) {
|
||||
process.argv.splice(profileIndex, 1)
|
||||
}
|
||||
const inspector = await import('node:inspector').then((r) => r.default)
|
||||
const session = (global.__vite_profile_session = new inspector.Session())
|
||||
session.connect()
|
||||
session.post('Profiler.enable', () => {
|
||||
session.post('Profiler.start', start)
|
||||
})
|
||||
} else {
|
||||
start()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue