Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
submodules: true
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
with:
shared-key: autofix
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/hyperfine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
submodules: true
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
- run: curl https://mise.run | MISE_INSTALL_PATH="$HOME/bin/mise-release" sh
- run: echo "$HOME/bin" >> "$GITHUB_PATH"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ppa-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
submodules: true

- name: Set up environment variables
run: |
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
submodules: true
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
with:
shared-key: build
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release-fig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.MISE_GH_TOKEN }}
submodules: true
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
with:
shared-key: build
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.MISE_GH_TOKEN }}
submodules: true
- uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6
with:
gpg_private_key: ${{ secrets.MISE_GPG_KEY }}
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ jobs:
target: armv7-unknown-linux-musleabi
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
submodules: true
- name: Install cross
uses: taiki-e/install-action@0aa4f22591557b744fe31e55dbfcdfea74a073f7 # v2
with:
Expand Down Expand Up @@ -98,8 +96,6 @@ jobs:
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTS_P12 }}
p12-password: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTS_P12_PASS }}
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
submodules: true
- name: cache crates
id: cache-crates
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
Expand Down Expand Up @@ -142,8 +138,6 @@ jobs:
target: x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
submodules: true
- run: rustup target add ${{matrix.target}}
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test-vfox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
submodules: true
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
- run: |
cargo build --all-features
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
submodules: true
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
with:
shared-key: build
Expand Down Expand Up @@ -60,8 +58,6 @@ jobs:
MISE_CACHE_DIR: ~/.cache/mise
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
submodules: true
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
with:
shared-key: build
Expand Down Expand Up @@ -95,7 +91,6 @@ jobs:
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
submodules: true
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
with:
shared-key: build
Expand All @@ -121,7 +116,6 @@ jobs:
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
submodules: true
- run: rustup default nightly
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
with:
Expand All @@ -148,7 +142,6 @@ jobs:
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
submodules: true
- uses: rui314/setup-mold@v1
- uses: taiki-e/install-action@0aa4f22591557b744fe31e55dbfcdfea74a073f7 # v2
with:
Expand Down Expand Up @@ -192,7 +185,6 @@ jobs:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
submodules: true
- name: Install build and test dependencies
run: |
sudo apt-get update
Expand Down Expand Up @@ -242,8 +234,6 @@ jobs:
MISE_CACHE_DIR: ~/.cache/mise
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
submodules: true
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
with:
shared-key: unit
Expand All @@ -263,8 +253,6 @@ jobs:
MISE_CACHE_DIR: ~/.cache/mise
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
submodules: true
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: mise-windows-latest
Expand Down
54 changes: 0 additions & 54 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion crates/vfox/embedded-plugins/mise-semver
Submodule mise-semver deleted from d20d84
1 change: 0 additions & 1 deletion crates/vfox/embedded-plugins/vfox-1password
Submodule vfox-1password deleted from ac7650
122 changes: 122 additions & 0 deletions crates/vfox/embedded-plugins/vfox-1password/hooks/available.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
local http = require("http")

--- Get the available version list.
--- @param ctx table Empty table, no data provided. Always {}.
--- @return table Version list
function PLUGIN:Available(ctx)
local result = {}

-- Fetch CLI v2 versions (current)
local resp2 = http.get({
url = "https://app-updates.agilebits.com/product_history/CLI2"
})
if resp2.status_code == 200 then
-- Versions appear on lines after <h3> tags
-- Pattern: <h3>\n\t\t\t\tVERSION
for version in resp2.body:gmatch("<h3>[^<]*</h3>%s*([%d%.%-beta]+)") do
local clean_version = version:match("^%s*(.-)%s*$")
if clean_version and clean_version ~= "" then
table.insert(result, {
version = clean_version,
note = "CLI v2"
})
end
end
-- Alternative pattern if the above doesn't work
if #result == 0 then
for version in resp2.body:gmatch("<h3>%s*</h3>%s*([%d%.%-beta]+)") do
local clean_version = version:match("^%s*(.-)%s*$")
if clean_version and clean_version ~= "" then
table.insert(result, {
version = clean_version,
note = "CLI v2"
})
end
end
end
-- Try line-by-line parsing
if #result == 0 then
local in_h3 = false
for line in resp2.body:gmatch("[^\r\n]+") do
if line:match("<h3>") then
in_h3 = true
elseif in_h3 then
local version = line:match("^%s*([%d%.%-beta]+)%s*$")
if version then
table.insert(result, {
version = version,
note = "CLI v2"
})
end
in_h3 = false
end
end
end
end

-- Fetch CLI v1 versions (legacy)
local resp1 = http.get({
url = "https://app-updates.agilebits.com/product_history/CLI"
})
if resp1.status_code == 200 then
local in_h3 = false
for line in resp1.body:gmatch("[^\r\n]+") do
if line:match("<h3>") then
in_h3 = true
elseif in_h3 then
local version = line:match("^%s*([%d%.%-beta]+)%s*$")
if version then
table.insert(result, {
version = version,
note = "CLI v1"
})
end
in_h3 = false
end
end
end

-- Sort versions (newest first)
table.sort(result, function(a, b)
return compare_versions(a.version, b.version)
end)

return result
end

--- Compare two version strings
--- @param v1 string
--- @param v2 string
--- @return boolean true if v1 > v2
function compare_versions(v1, v2)
local function parse(v)
local parts = {}
-- Handle beta versions: 2.31.0-beta.01 -> {2, 31, 0, -1, 1}
local main, beta = v:match("^([%d%.]+)%-beta%.?(%d*)$")
if main then
for num in main:gmatch("(%d+)") do
table.insert(parts, tonumber(num))
end
table.insert(parts, -1) -- beta marker
if beta and beta ~= "" then
table.insert(parts, tonumber(beta))
else
table.insert(parts, 0)
end
else
for num in v:gmatch("(%d+)") do
table.insert(parts, tonumber(num))
end
end
return parts
end

local p1, p2 = parse(v1), parse(v2)
for i = 1, math.max(#p1, #p2) do
local n1, n2 = p1[i] or 0, p2[i] or 0
if n1 ~= n2 then
return n1 > n2
end
end
return false
end
12 changes: 12 additions & 0 deletions crates/vfox/embedded-plugins/vfox-1password/hooks/env_keys.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- Returns the environment variables that need to be set.
--- @param ctx table
--- @field ctx.path string Installation directory
--- @return table Environment variables
function PLUGIN:EnvKeys(ctx)
return {
{
key = "PATH",
value = ctx.path
}
}
end
Loading
Loading