@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.
@@ -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
- for a in costcrew-linux-x86_64.tar.gz costcrew-macos-aarch64.tar.gz \
57
- costcrew-macos-x86_64.tar.gz costcrew-windows-x86_64.zip; do
58
- curl -fsSL "https://github.com/${GITHUB_REPOSITORY}/releases/download/${{ steps.ver.outputs.tag }}/${a}" -o "dist/${a}"
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
@@ -41,7 +41,7 @@ dependencies = [
41
41
 
42
42
  [[package]]
43
43
  name = "costcrew"
44
- version = "0.4.0"
44
+ version = "0.4.1"
45
45
  dependencies = [
46
46
  "crossterm",
47
47
  "rusqlite",
package/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "costcrew"
3
- version = "0.4.0"
3
+ version = "0.4.1"
4
4
  edition = "2021"
5
5
  description = "The AI coding price database + your spend — interactive terminal app."
6
6
  license = "MIT"
package/bin.js CHANGED
@@ -22,12 +22,15 @@ if (!rel) {
22
22
  }
23
23
 
24
24
  function resolveBinary() {
25
- const direct = path.join(__dirname, "..", rel);
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: [__dirname] }));
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.0",
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.0",
10
- "@archeagle087/costcrew-linux-x64": "0.4.0",
11
- "@archeagle087/costcrew-darwin-arm64": "0.4.0",
12
- "@archeagle087/costcrew-darwin-x64": "0.4.0"
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"],
@@ -22,12 +22,15 @@ if (!rel) {
22
22
  }
23
23
 
24
24
  function resolveBinary() {
25
- const direct = path.join(__dirname, "..", rel);
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: [__dirname] }));
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archeagle087/costcrew-darwin-arm64",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "costcrew native binary (costcrew-darwin-arm64) — do not install directly",
5
5
  "os": ["darwin"],
6
6
  "cpu": ["arm64"],
Binary file
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archeagle087/costcrew-darwin-x64",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "costcrew native binary (costcrew-darwin-x64) — do not install directly",
5
5
  "os": ["darwin"],
6
6
  "cpu": ["x64"],
Binary file
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archeagle087/costcrew-linux-x64",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "costcrew native binary (costcrew-linux-x64) — do not install directly",
5
5
  "os": ["linux"],
6
6
  "cpu": ["x64"],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archeagle087/costcrew-win32-x64",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "costcrew native binary (costcrew-win32-x64) — do not install directly",
5
5
  "os": ["win32"],
6
6
  "cpu": ["x64"],