refactor(packages): 0.R5 - a question no longer starts its state - 64 lazy starts ('if st.x == null { st.x = ... }' inside a getter) are the state's defaults, gear__ensure is gone, and ludic migrate state --tighten took mut off 208 package parameters: things_all, thing_find, gear_charge, gear_level, jobs_state and the rest read
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
54f5efb23f
commit
9862ec82e3
102 changed files with 320 additions and 351 deletions
|
|
@ -10,7 +10,7 @@ property UpdateAsset {
|
|||
}
|
||||
|
||||
# this app's packages in the feed ({"Assets": [{PackageId, Version, Type, FileName, SHA256, Size}]})
|
||||
function update__assets(update_st: mut UpdateState, feed: Val) -> []UpdateAsset {
|
||||
function update__assets(update_st: UpdateState, feed: Val) -> []UpdateAsset {
|
||||
let out = new []UpdateAsset
|
||||
if feed == null or Value.kind(feed) != 6 or Value.has(feed, "Assets") == 0 { return out }
|
||||
let all = Value.get(feed, "Assets")
|
||||
|
|
@ -31,7 +31,7 @@ function update__assets(update_st: mut UpdateState, feed: Val) -> []UpdateAsset
|
|||
# What the feed calls the FULL package of version v. Never built here: Velopack puts the channel in
|
||||
# a macOS name (App-0.3.4-osx-full.nupkg) and not a Windows one, and it is both the name a patch
|
||||
# writes and the name the next update looks for as its base.
|
||||
function update__full_name(update_st: mut UpdateState, as: []UpdateAsset, v: string) -> string {
|
||||
function update__full_name(update_st: UpdateState, as: []UpdateAsset, v: string) -> string {
|
||||
for i in 0 .. len(as) { if not as[i].delta and as[i].ver == v { return as[i].file } }
|
||||
return update__conf(update_st).app_id + "-" + v + "-full.nupkg"
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ function update__newest_full(as: []UpdateAsset) -> int {
|
|||
}
|
||||
|
||||
# the deltas above this version up to the newest, oldest first
|
||||
function update__chain(update_st: mut UpdateState, as: []UpdateAsset, newest: string) -> []UpdateAsset {
|
||||
function update__chain(update_st: UpdateState, as: []UpdateAsset, newest: string) -> []UpdateAsset {
|
||||
let out = new []UpdateAsset
|
||||
let mine = update__conf(update_st).version
|
||||
for i in 0 .. len(as) {
|
||||
|
|
@ -65,7 +65,7 @@ function update__chain(update_st: mut UpdateState, as: []UpdateAsset, newest: st
|
|||
return out
|
||||
}
|
||||
|
||||
function update__fulls_after(update_st: mut UpdateState, as: []UpdateAsset) -> int {
|
||||
function update__fulls_after(update_st: UpdateState, as: []UpdateAsset) -> int {
|
||||
var n = 0
|
||||
for i in 0 .. len(as) { if not as[i].delta and update_newer(as[i].ver, update__conf(update_st).version) { n += 1 } }
|
||||
return n
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue