@vypdev/copilot 3.10.2 → 3.10.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vypdev/copilot",
3
- "version": "3.10.2",
3
+ "version": "3.10.4",
4
4
  "packageManager": "pnpm@10.12.4",
5
5
  "pnpm": {
6
6
  "overrides": {
@@ -59,10 +59,12 @@ jobs:
59
59
  env:
60
60
  PAT: ${{ secrets.PAT }}
61
61
  run: |
62
+ set +x
62
63
  set -euo pipefail
63
64
  [[ -n "${PAT:-}" ]] || { echo 'Required credential is missing.' >&2; exit 1; }
64
- curl --fail --silent --show-error --location --max-time 20 -H "Authorization: Bearer $PAT" -H 'Accept: application/vnd.github+json' https://api.github.com/user >/dev/null
65
- curl --fail --silent --show-error --location --max-time 20 -H "Authorization: Bearer $PAT" -H 'Accept: application/vnd.github+json' "https://api.github.com/repos/${GITHUB_REPOSITORY}" >/dev/null
65
+ [[ "$PAT" != *$'\r'* && "$PAT" != *$'\n'* ]] || { echo 'Credential contains invalid line breaks.' >&2; exit 1; }
66
+ printf 'Authorization: Bearer %s\n' "$PAT" | curl -q --fail --silent --show-error --location --max-redirs 0 --proto '=https' --proto-redir '=https' --max-time 20 --header @- --header 'Accept: application/vnd.github+json' https://api.github.com/user >/dev/null
67
+ printf 'Authorization: Bearer %s\n' "$PAT" | curl -q --fail --silent --show-error --location --max-redirs 0 --proto '=https' --proto-redir '=https' --max-time 20 --header @- --header 'Accept: application/vnd.github+json' "https://api.github.com/repos/${GITHUB_REPOSITORY}" >/dev/null
66
68
 
67
69
  verify-openai:
68
70
  if: ${{ inputs.check_openai }}
@@ -75,9 +77,11 @@ jobs:
75
77
  env:
76
78
  OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
77
79
  run: |
80
+ set +x
78
81
  set -euo pipefail
79
82
  [[ -n "${OPENAI_API_KEY:-}" ]] || { echo 'Required credential is missing.' >&2; exit 1; }
80
- curl --fail --silent --show-error --location --max-time 20 -H "Authorization: Bearer $OPENAI_API_KEY" https://api.openai.com/v1/models >/dev/null
83
+ [[ "$OPENAI_API_KEY" != *$'\r'* && "$OPENAI_API_KEY" != *$'\n'* ]] || { echo 'Credential contains invalid line breaks.' >&2; exit 1; }
84
+ printf 'Authorization: Bearer %s\n' "$OPENAI_API_KEY" | curl -q --fail --silent --show-error --location --max-redirs 0 --proto '=https' --proto-redir '=https' --max-time 20 --header @- https://api.openai.com/v1/models >/dev/null
81
85
 
82
86
  verify-anthropic:
83
87
  if: ${{ inputs.check_anthropic }}
@@ -90,9 +94,11 @@ jobs:
90
94
  env:
91
95
  ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
92
96
  run: |
97
+ set +x
93
98
  set -euo pipefail
94
99
  [[ -n "${ANTHROPIC_API_KEY:-}" ]] || { echo 'Required credential is missing.' >&2; exit 1; }
95
- curl --fail --silent --show-error --location --max-time 20 -H "x-api-key: $ANTHROPIC_API_KEY" -H 'anthropic-version: 2023-06-01' https://api.anthropic.com/v1/models >/dev/null
100
+ [[ "$ANTHROPIC_API_KEY" != *$'\r'* && "$ANTHROPIC_API_KEY" != *$'\n'* ]] || { echo 'Credential contains invalid line breaks.' >&2; exit 1; }
101
+ printf 'x-api-key: %s\n' "$ANTHROPIC_API_KEY" | curl -q --fail --silent --show-error --location --max-redirs 0 --proto '=https' --proto-redir '=https' --max-time 20 --header @- --header 'anthropic-version: 2023-06-01' https://api.anthropic.com/v1/models >/dev/null
96
102
 
97
103
  verify-google:
98
104
  if: ${{ inputs.check_google }}
@@ -105,9 +111,11 @@ jobs:
105
111
  env:
106
112
  GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
107
113
  run: |
114
+ set +x
108
115
  set -euo pipefail
109
116
  [[ -n "${GOOGLE_API_KEY:-}" ]] || { echo 'Required credential is missing.' >&2; exit 1; }
110
- curl --fail --silent --show-error --location --max-time 20 "https://generativelanguage.googleapis.com/v1beta/models?key=$GOOGLE_API_KEY" >/dev/null
117
+ [[ "$GOOGLE_API_KEY" != *$'\r'* && "$GOOGLE_API_KEY" != *$'\n'* ]] || { echo 'Credential contains invalid line breaks.' >&2; exit 1; }
118
+ printf 'x-goog-api-key: %s\n' "$GOOGLE_API_KEY" | curl -q --fail --silent --show-error --location --max-redirs 0 --proto '=https' --proto-redir '=https' --max-time 20 --header @- https://generativelanguage.googleapis.com/v1beta/models >/dev/null
111
119
 
112
120
  verify-openrouter:
113
121
  if: ${{ inputs.check_openrouter }}
@@ -120,9 +128,11 @@ jobs:
120
128
  env:
121
129
  OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
122
130
  run: |
131
+ set +x
123
132
  set -euo pipefail
124
133
  [[ -n "${OPENROUTER_API_KEY:-}" ]] || { echo 'Required credential is missing.' >&2; exit 1; }
125
- curl --fail --silent --show-error --location --max-time 20 -H "Authorization: Bearer $OPENROUTER_API_KEY" https://openrouter.ai/api/v1/models >/dev/null
134
+ [[ "$OPENROUTER_API_KEY" != *$'\r'* && "$OPENROUTER_API_KEY" != *$'\n'* ]] || { echo 'Credential contains invalid line breaks.' >&2; exit 1; }
135
+ printf 'Authorization: Bearer %s\n' "$OPENROUTER_API_KEY" | curl -q --fail --silent --show-error --location --max-redirs 0 --proto '=https' --proto-redir '=https' --max-time 20 --header @- https://openrouter.ai/api/v1/models >/dev/null
126
136
 
127
137
  verify-cursor:
128
138
  if: ${{ inputs.check_cursor }}
@@ -135,9 +145,13 @@ jobs:
135
145
  env:
136
146
  CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
137
147
  run: |
148
+ set +x
138
149
  set -euo pipefail
139
150
  [[ -n "${CURSOR_API_KEY:-}" ]] || { echo 'Required credential is missing.' >&2; exit 1; }
140
- curl --fail --silent --show-error --location --max-time 20 -u "$CURSOR_API_KEY:" 'https://api.cursor.com/analytics/ai-code/changes?startDate=30d&page=1&pageSize=1' >/dev/null
151
+ [[ "$CURSOR_API_KEY" != *$'\r'* && "$CURSOR_API_KEY" != *$'\n'* ]] || { echo 'Credential contains invalid line breaks.' >&2; exit 1; }
152
+ basic_auth="$(printf '%s:' "$CURSOR_API_KEY" | base64 | tr -d '\r\n')"
153
+ printf 'Authorization: Basic %s\n' "$basic_auth" | curl -q --fail --silent --show-error --location --max-redirs 0 --proto '=https' --proto-redir '=https' --max-time 20 --header @- 'https://api.cursor.com/analytics/ai-code/changes?startDate=30d&page=1&pageSize=1' >/dev/null
154
+ unset basic_auth
141
155
 
142
156
  verify-opencode:
143
157
  if: ${{ inputs.check_opencode }}
@@ -150,9 +164,11 @@ jobs:
150
164
  env:
151
165
  OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
152
166
  run: |
167
+ set +x
153
168
  set -euo pipefail
154
169
  [[ -n "${OPENCODE_API_KEY:-}" ]] || { echo 'Required credential is missing.' >&2; exit 1; }
155
- curl --fail --silent --show-error --location --max-time 20 -H "Authorization: Bearer $OPENCODE_API_KEY" https://opencode.ai/zen/v1/models >/dev/null
170
+ [[ "$OPENCODE_API_KEY" != *$'\r'* && "$OPENCODE_API_KEY" != *$'\n'* ]] || { echo 'Credential contains invalid line breaks.' >&2; exit 1; }
171
+ printf 'Authorization: Bearer %s\n' "$OPENCODE_API_KEY" | curl -q --fail --silent --show-error --location --max-redirs 0 --proto '=https' --proto-redir '=https' --max-time 20 --header @- https://opencode.ai/zen/v1/models >/dev/null
156
172
 
157
173
  verify-codex-api-key:
158
174
  if: ${{ inputs.check_codex_api_key }}
@@ -165,6 +181,8 @@ jobs:
165
181
  env:
166
182
  CODEX_API_KEY: ${{ secrets.CODEX_API_KEY }}
167
183
  run: |
184
+ set +x
168
185
  set -euo pipefail
169
186
  [[ -n "${CODEX_API_KEY:-}" ]] || { echo 'Required credential is missing.' >&2; exit 1; }
170
- curl --fail --silent --show-error --location --max-time 20 -H "Authorization: Bearer $CODEX_API_KEY" https://api.openai.com/v1/models >/dev/null
187
+ [[ "$CODEX_API_KEY" != *$'\r'* && "$CODEX_API_KEY" != *$'\n'* ]] || { echo 'Credential contains invalid line breaks.' >&2; exit 1; }
188
+ printf 'Authorization: Bearer %s\n' "$CODEX_API_KEY" | curl -q --fail --silent --show-error --location --max-redirs 0 --proto '=https' --proto-redir '=https' --max-time 20 --header @- https://api.openai.com/v1/models >/dev/null
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
  timeout-minutes: 120
14
14
  concurrency:
15
- group: copilot-pr-${{ github.repository }}-${{ github.event.pull_request.head.ref || github.ref_name }}-analysis
15
+ group: copilot-pr-${{ github.repository }}-${{ github.event.pull_request.number }}-analysis
16
16
  cancel-in-progress: true
17
17
  permissions:
18
18
  checks: write
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
  timeout-minutes: 120
14
14
  concurrency:
15
- group: copilot-pr-${{ github.repository }}-${{ github.event.pull_request.head.ref || github.ref_name }}-review-state
15
+ group: copilot-pr-${{ github.repository }}-${{ github.event.pull_request.number }}-review-state
16
16
  cancel-in-progress: true
17
17
  permissions:
18
18
  checks: write