Problem: the hexagonal refactor churns the backend tree for nine more phases; the UI delivery stack (web/ SPA, cmd/desktop Wails wrapper, compose/web image) must move to its own repo first so doc/layout rewrites land once on a backend-only tree. Change: - New repo git.hubris.network/dtoro/oikos-web (v0.33.0): web/, desktop/ (updateURL repointed to oikos-web releases), compose/, own CI (web + desktop jobs), own deploy script (CI-green gate, TOCTOU guard, version-tagged images, prune-to-3), own webhook receiver on :9798 + launchd unit, own compose project publishing the same 8091:80. - Cutover executed on mac-mini in order: oikos stack's web service stopped+removed, oikos-web project brought up on 8091; outer Caddy untouched (targets the published port) — serving + Authentik flow + /wails 404 quirk verified post-cutover. - Stripped from oikos: web/, cmd/desktop/, compose/web/, desktop CI workflow, ci.yml web job, Makefile ui/desktop/desktop-package/install targets, the compose web service, oikos-web from deploy.sh's fallback prune list; wails + go-keyring dropped from go.mod, vendor synced. - README / CONTRIBUTING / AGENTS.md / .agents dev+operations docs now point at the new repo; mbse + mascot design docs carry a path note. Risk: production SPA serving depends on the new pipeline now; rollback is versioned-image re-up of the old web service from a pre-split checkout (port 8091). Desktop builds installed before the split still check dtoro/oikos releases — one manual reinstall, noted in the oikos-web release notes. Verification: go vet, make test (race), make generate-check, golangci (no new findings; baseline down 400→365); post-cutover curls — localhost:8091 200, /wails/runtime.js 404, outer Caddy 302 Authentik.
96 lines
2.6 KiB
AppleScript
96 lines
2.6 KiB
AppleScript
(*
|
|
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
|
|
property theProgram: "Google Chrome"
|
|
|
|
on run argv
|
|
set theURL to item 1 of argv
|
|
|
|
-- Allow requested program to be optional,
|
|
-- default to Google Chrome
|
|
if (count of argv) > 1 then
|
|
set theProgram to item 2 of argv
|
|
end if
|
|
|
|
using terms from application "Google Chrome"
|
|
tell application theProgram
|
|
|
|
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 using terms from
|
|
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)
|
|
using terms from application "Google Chrome"
|
|
tell application theProgram
|
|
-- 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
|
|
end using terms from
|
|
return found
|
|
end lookupTabWithUrl
|