@vellumai/credential-executor 0.6.1 → 0.6.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.
@@ -146,14 +146,12 @@ export function parseHandle(raw: string): ParseHandleResult {
146
146
  }
147
147
 
148
148
  case HandleType.LocalOAuth: {
149
- // providerKey is typically a bare name (e.g. "google"), but legacy handles
150
- // may contain a colon (e.g. "integration:google"), so we split on the
151
- // *last* "/" to separate providerKey from connectionId.
152
- const lastSlashIdx = rest.lastIndexOf("/");
149
+ // Split providerKey from connectionId.
150
+ const slashIdx = rest.indexOf("/");
153
151
  if (
154
- lastSlashIdx === -1 ||
155
- lastSlashIdx === 0 ||
156
- lastSlashIdx === rest.length - 1
152
+ slashIdx === -1 ||
153
+ slashIdx === 0 ||
154
+ slashIdx === rest.length - 1
157
155
  ) {
158
156
  return {
159
157
  ok: false,
@@ -164,8 +162,8 @@ export function parseHandle(raw: string): ParseHandleResult {
164
162
  ok: true,
165
163
  handle: {
166
164
  type: HandleType.LocalOAuth,
167
- providerKey: rest.slice(0, lastSlashIdx),
168
- connectionId: rest.slice(lastSlashIdx + 1),
165
+ providerKey: rest.slice(0, slashIdx),
166
+ connectionId: rest.slice(slashIdx + 1),
169
167
  raw,
170
168
  },
171
169
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/credential-executor",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {