httpcat-cli 0.1.0 → 0.1.1-rc.2

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.
@@ -3,6 +3,7 @@ updates:
3
3
  # Enable version updates for npm
4
4
  - package-ecosystem: "npm"
5
5
  directory: "/"
6
+ target-branch: "develop"
6
7
  schedule:
7
8
  interval: "weekly"
8
9
  open-pull-requests-limit: 5
@@ -16,6 +17,7 @@ updates:
16
17
  # Enable version updates for GitHub Actions
17
18
  - package-ecosystem: "github-actions"
18
19
  directory: "/"
20
+ target-branch: "develop"
19
21
  schedule:
20
22
  interval: "weekly"
21
23
  labels:
@@ -84,12 +84,66 @@ jobs:
84
84
  }
85
85
  }
86
86
 
87
- // Get commits to analyze
87
+ // Get commits to analyze - only commits in this push/merge
88
88
  let compareData;
89
- if (lastTag) {
89
+
90
+ // For push events, get commits between the previous commit and current HEAD
91
+ // This ensures we only analyze commits in the current merge/push, not all commits since last release
92
+ if (context.eventName === 'push' && context.payload.before) {
93
+ console.log(`Analyzing commits in this push (${context.payload.before}..${context.sha})...`);
94
+ try {
95
+ const response = await github.rest.repos.compareCommits({
96
+ owner: context.repo.owner,
97
+ repo: context.repo.repo,
98
+ base: context.payload.before,
99
+ head: context.sha
100
+ });
101
+ compareData = response.data;
102
+ console.log(`Found ${compareData.commits.length} commits in this push`);
103
+ } catch (e) {
104
+ console.log(`Could not compare commits, falling back to last release: ${e.message}`);
105
+ // Fallback to comparing with last release tag
106
+ if (lastTag) {
107
+ let baseSha;
108
+ try {
109
+ const { data: tagData } = await github.rest.git.getRef({
110
+ owner: context.repo.owner,
111
+ repo: context.repo.repo,
112
+ ref: `tags/${lastTag}`
113
+ });
114
+ baseSha = tagData.object.sha;
115
+ } catch (e2) {
116
+ try {
117
+ const { data: commitData } = await github.rest.repos.getCommit({
118
+ owner: context.repo.owner,
119
+ repo: context.repo.repo,
120
+ ref: lastTag
121
+ });
122
+ baseSha = commitData.sha;
123
+ } catch (e3) {
124
+ baseSha = null;
125
+ }
126
+ }
127
+ const response = await github.rest.repos.compareCommits({
128
+ owner: context.repo.owner,
129
+ repo: context.repo.repo,
130
+ base: baseSha || 'main',
131
+ head: context.sha
132
+ });
133
+ compareData = response.data;
134
+ } else {
135
+ // Last resort: get recent commits
136
+ const response = await github.rest.repos.listCommits({
137
+ owner: context.repo.owner,
138
+ repo: context.repo.repo,
139
+ per_page: 50
140
+ });
141
+ compareData = { commits: response.data };
142
+ }
143
+ }
144
+ } else if (lastTag) {
145
+ // For other events (like workflow_dispatch), compare with last release
90
146
  console.log(`Last release tag: ${lastTag}`);
91
-
92
- // Get commits since last tag
93
147
  let baseSha;
94
148
  try {
95
149
  const { data: tagData } = await github.rest.git.getRef({
@@ -110,7 +164,6 @@ jobs:
110
164
  baseSha = null;
111
165
  }
112
166
  }
113
-
114
167
  const response = await github.rest.repos.compareCommits({
115
168
  owner: context.repo.owner,
116
169
  repo: context.repo.repo,
@@ -120,7 +173,6 @@ jobs:
120
173
  compareData = response.data;
121
174
  } else {
122
175
  console.log('⚠️ No previous tags found, analyzing recent commits...');
123
- // Get recent commits (last 50) to determine bump type
124
176
  const response = await github.rest.repos.listCommits({
125
177
  owner: context.repo.owner,
126
178
  repo: context.repo.repo,
@@ -454,10 +506,12 @@ jobs:
454
506
  runs-on: ubuntu-latest
455
507
  needs: [prepare, publish-npm]
456
508
  steps:
457
- - name: Checkout code
509
+ - name: Checkout homebrew tap
458
510
  uses: actions/checkout@v6
459
511
  with:
512
+ repository: hathbanger/homebrew-httpcat
460
513
  token: ${{ secrets.GITHUB_TOKEN }}
514
+ path: homebrew-tap
461
515
 
462
516
  - name: Wait for npm CDN propagation
463
517
  run: |
@@ -488,7 +542,7 @@ jobs:
488
542
  run: |
489
543
  VERSION="${{ needs.prepare.outputs.version }}"
490
544
  SHA256="${{ steps.npm-sha.outputs.sha256 }}"
491
- FORMULA_FILE="homebrew-httpcat/Formula/httpcat.rb"
545
+ FORMULA_FILE="homebrew-tap/Formula/httpcat.rb"
492
546
 
493
547
  # Update version
494
548
  sed -i.bak "s|url \".*httpcat-cli-.*\.tgz\"|url \"https://registry.npmjs.org/httpcat-cli/-/httpcat-cli-${VERSION}.tgz\"|" "$FORMULA_FILE"
@@ -506,10 +560,11 @@ jobs:
506
560
 
507
561
  - name: Commit and push Homebrew formula update
508
562
  run: |
563
+ cd homebrew-tap
509
564
  git config user.name "github-actions[bot]"
510
565
  git config user.email "github-actions[bot]@users.noreply.github.com"
511
- git add homebrew-httpcat/Formula/httpcat.rb
512
- git commit -m "chore: update Homebrew formula to v${{ needs.prepare.outputs.version }}" || exit 0
566
+ git add Formula/httpcat.rb
567
+ git commit -m "Update httpcat to ${{ needs.prepare.outputs.version }}" || exit 0
513
568
  git push
514
569
 
515
570
  # Job 5: Create GitHub Release
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "httpcat-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1-rc.2",
4
4
  "description": "CLI tool for interacting with httpcat agent - create, buy, and sell tokens with x402 payments",
5
5
  "main": "dist/index.js",
6
6
  "bin": {