Commit 9364a45
committed
refactor(releases): extend downloadSocketBtmRelease API to support asset patterns
Update the `asset` parameter in `SocketBtmAssetConfig` to accept either an exact asset name (string) or a pattern (prefix/suffix object or RegExp). When a pattern is provided, the function automatically resolves it to the actual asset name by finding the latest matching asset in the release.
This eliminates the need for a separate `findReleaseAsset()` call in consuming code and provides a cleaner, more intuitive API.
Key changes:
- `asset` parameter now accepts `string | AssetPattern` type
- Pattern resolution integrated into `downloadSocketBtmRelease()`
- Automatic tag detection when using patterns
- Maintains backward compatibility with exact asset names1 parent b464ddb commit 9364a45
1 file changed
Lines changed: 40 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
60 | | - | |
61 | | - | |
62 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
152 | | - | |
153 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
154 | 187 | | |
155 | 188 | | |
156 | 189 | | |
| |||
163 | 196 | | |
164 | 197 | | |
165 | 198 | | |
166 | | - | |
| 199 | + | |
167 | 200 | | |
168 | | - | |
| 201 | + | |
169 | 202 | | |
170 | 203 | | |
171 | 204 | | |
| |||
0 commit comments