@archeagle087/costcrew 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/npm-release.yml +20 -4
- package/Cargo.lock +1 -1
- package/Cargo.toml +1 -1
- package/bin.js +5 -2
- package/dist/costcrew-linux-x86_64.tar.gz +0 -0
- package/dist/costcrew-macos-aarch64.tar.gz +0 -0
- package/dist/costcrew-macos-x86_64.tar.gz +0 -0
- package/dist/costcrew-windows-x86_64.zip +0 -0
- package/package.json +5 -5
- package/packaging/npm/bin.js +5 -2
- package/work/costcrew-darwin-arm64/costcrew +0 -0
- package/work/costcrew-darwin-arm64/package.json +1 -1
- package/work/costcrew-darwin-x64/costcrew +0 -0
- package/work/costcrew-darwin-x64/package.json +1 -1
- package/work/costcrew-linux-x64/costcrew +0 -0
- package/work/costcrew-linux-x64/package.json +1 -1
- package/work/costcrew-win32-x64/costcrew.exe +0 -0
- package/work/costcrew-win32-x64/package.json +1 -1
|
@@ -49,14 +49,30 @@ jobs:
|
|
|
49
49
|
env:
|
|
50
50
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
51
51
|
|
|
52
|
-
- name: download release assets
|
|
52
|
+
- name: download release assets (waits for Release to finish)
|
|
53
53
|
if: steps.tok.outputs.have_token == 'true'
|
|
54
54
|
run: |
|
|
55
55
|
mkdir -p dist
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
assets="costcrew-linux-x86_64.tar.gz costcrew-macos-aarch64.tar.gz costcrew-macos-x86_64.tar.gz costcrew-windows-x86_64.zip"
|
|
57
|
+
TAG="${{ steps.ver.outputs.tag }}"
|
|
58
|
+
fetch() {
|
|
59
|
+
for a in $assets; do
|
|
60
|
+
if [ ! -s "dist/$a" ]; then
|
|
61
|
+
# 404 if Release hasn't uploaded yet — retry later, never
|
|
62
|
+
# leave a partial file behind
|
|
63
|
+
curl -fsSL "https://github.com/${GITHUB_REPOSITORY}/releases/download/${TAG}/${a}" -o "dist/$a.part" \
|
|
64
|
+
&& mv "dist/$a.part" "dist/$a" || rm -f "dist/$a.part"
|
|
65
|
+
fi
|
|
66
|
+
done
|
|
67
|
+
for a in $assets; do [ -s "dist/$a" ] || return 1; done
|
|
68
|
+
}
|
|
69
|
+
fetch && exit 0
|
|
70
|
+
for i in $(seq 1 120); do # Release builds take a few minutes
|
|
71
|
+
sleep 10
|
|
72
|
+
fetch && exit 0
|
|
59
73
|
done
|
|
74
|
+
echo "::error::release assets for ${TAG} not found after 20 minutes"
|
|
75
|
+
exit 1
|
|
60
76
|
|
|
61
77
|
- name: assemble + publish platform packages
|
|
62
78
|
if: steps.tok.outputs.have_token == 'true'
|
package/Cargo.lock
CHANGED
package/Cargo.toml
CHANGED
package/bin.js
CHANGED
|
@@ -22,12 +22,15 @@ if (!rel) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
function resolveBinary() {
|
|
25
|
-
|
|
25
|
+
// __dirname is node_modules/@archeagle087/costcrew — two levels up is
|
|
26
|
+
// node_modules, where the platform packages live
|
|
27
|
+
const nm = path.join(__dirname, "..", "..");
|
|
28
|
+
const direct = path.join(nm, rel);
|
|
26
29
|
if (fs.existsSync(direct)) return direct;
|
|
27
30
|
// npm can hoist/reshape optionalDependencies — fall back to resolution
|
|
28
31
|
const [pkg, file] = rel.split("/");
|
|
29
32
|
try {
|
|
30
|
-
const dir = path.dirname(require.resolve(`${pkg}/package.json`, { paths: [
|
|
33
|
+
const dir = path.dirname(require.resolve(`${pkg}/package.json`, { paths: [nm] }));
|
|
31
34
|
return path.join(dir, file);
|
|
32
35
|
} catch {
|
|
33
36
|
return direct; // let spawn fail with a clear ENOENT
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@archeagle087/costcrew",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "The AI coding price database, plus what you spend on it — interactive terminal app. Bundled 465+ model prices, your spend ledger, arena leaderboard priced elo-per-dollar.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"costcrew": "bin.js"
|
|
7
7
|
},
|
|
8
8
|
"optionalDependencies": {
|
|
9
|
-
"@archeagle087/costcrew-win32-x64": "0.4.
|
|
10
|
-
"@archeagle087/costcrew-linux-x64": "0.4.
|
|
11
|
-
"@archeagle087/costcrew-darwin-arm64": "0.4.
|
|
12
|
-
"@archeagle087/costcrew-darwin-x64": "0.4.
|
|
9
|
+
"@archeagle087/costcrew-win32-x64": "0.4.1",
|
|
10
|
+
"@archeagle087/costcrew-linux-x64": "0.4.1",
|
|
11
|
+
"@archeagle087/costcrew-darwin-arm64": "0.4.1",
|
|
12
|
+
"@archeagle087/costcrew-darwin-x64": "0.4.1"
|
|
13
13
|
},
|
|
14
14
|
"os": ["win32", "linux", "darwin"],
|
|
15
15
|
"cpu": ["x64", "arm64"],
|
package/packaging/npm/bin.js
CHANGED
|
@@ -22,12 +22,15 @@ if (!rel) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
function resolveBinary() {
|
|
25
|
-
|
|
25
|
+
// __dirname is node_modules/@archeagle087/costcrew — two levels up is
|
|
26
|
+
// node_modules, where the platform packages live
|
|
27
|
+
const nm = path.join(__dirname, "..", "..");
|
|
28
|
+
const direct = path.join(nm, rel);
|
|
26
29
|
if (fs.existsSync(direct)) return direct;
|
|
27
30
|
// npm can hoist/reshape optionalDependencies — fall back to resolution
|
|
28
31
|
const [pkg, file] = rel.split("/");
|
|
29
32
|
try {
|
|
30
|
-
const dir = path.dirname(require.resolve(`${pkg}/package.json`, { paths: [
|
|
33
|
+
const dir = path.dirname(require.resolve(`${pkg}/package.json`, { paths: [nm] }));
|
|
31
34
|
return path.join(dir, file);
|
|
32
35
|
} catch {
|
|
33
36
|
return direct; // let spawn fail with a clear ENOENT
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|