@leeguoo/wrangler-accounts 1.5.0 → 1.5.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/.claude-plugin/marketplace.json +2 -2
- package/README.md +11 -0
- package/bin/wrangler-accounts.js +6 -6
- package/package.json +1 -1
- package/plugins/wrangler-accounts/.claude-plugin/plugin.json +1 -1
- package/plugins/wrangler-accounts/skills/wrangler-accounts/SKILL.md +11 -2
- package/skills/wrangler-accounts/SKILL.md +11 -2
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
},
|
|
6
6
|
"metadata": {
|
|
7
7
|
"description": "Claude Code plugins for practical developer workflows from the wrangler-accounts author.",
|
|
8
|
-
"version": "1.5.
|
|
8
|
+
"version": "1.5.1"
|
|
9
9
|
},
|
|
10
10
|
"plugins": [
|
|
11
11
|
{
|
|
12
12
|
"name": "wrangler-accounts",
|
|
13
13
|
"source": "./plugins/wrangler-accounts",
|
|
14
14
|
"description": "Cloudflare Wrangler multi-account skill plus a Bash hook that blocks raw wrangler calls when local profiles are configured.",
|
|
15
|
-
"version": "1.5.
|
|
15
|
+
"version": "1.5.1",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "Lee Guo"
|
|
18
18
|
},
|
package/README.md
CHANGED
|
@@ -49,6 +49,17 @@ If you explicitly want raw `wrangler`, bypass the hook for that command:
|
|
|
49
49
|
NOWRANGLER_ACCOUNTS_GUARD=1 wrangler deploy
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
+
### Upgrading from the `skills.sh` install
|
|
53
|
+
|
|
54
|
+
If you previously installed this skill via `npx skills add leeguooooo/wrangler-accounts`, remove that standalone copy after installing the plugin — otherwise Claude Code's slash command picker shows two identical `/wrangler-accounts` entries (one from the skills.sh directory, one from the plugin):
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npx skills remove wrangler-accounts
|
|
58
|
+
# or, if the CLI is missing: rm -rf ~/.agents/skills/wrangler-accounts
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Then run `/reload-plugins` and confirm only one entry remains.
|
|
62
|
+
|
|
52
63
|
## What it does
|
|
53
64
|
|
|
54
65
|
Every execution runs `wrangler` inside a per-invocation **shadow HOME** — a temporary directory that mirrors most of your real home, except `.wrangler/config/default.toml` is a symlink pointing at the saved profile's config. Token refreshes flow back to the profile automatically. Nothing touches your real `~/.wrangler`. Two parallel invocations get two independent shadow HOMEs.
|
package/bin/wrangler-accounts.js
CHANGED
|
@@ -293,9 +293,9 @@ function useProfile(name, configPath, profilesDir, backup) {
|
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
const session = readSessionState(profileConfig);
|
|
296
|
-
if (session.expired) {
|
|
296
|
+
if (session.effective === 'expired') {
|
|
297
297
|
die(
|
|
298
|
-
`Profile '${name}' has expired Wrangler OAuth credentials (expiration_time: ${session.expirationTime}). Run 'wrangler-accounts login ${name}' to
|
|
298
|
+
`Profile '${name}' has expired Wrangler OAuth credentials and no refresh_token to renew them (expiration_time: ${session.expirationTime}). Run 'wrangler-accounts login ${name}' to re-authenticate.`
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
301
|
|
|
@@ -409,9 +409,9 @@ function main() {
|
|
|
409
409
|
|
|
410
410
|
const profileCfg = path.join(profilesDir, resolved.name, "config.toml");
|
|
411
411
|
const session = readSessionState(profileCfg);
|
|
412
|
-
if (session.expired) {
|
|
412
|
+
if (session.effective === 'expired') {
|
|
413
413
|
die(
|
|
414
|
-
`Profile '${resolved.name}' has expired Wrangler OAuth credentials (expiration_time: ${session.expirationTime}). Run 'wrangler-accounts login ${resolved.name}' to
|
|
414
|
+
`Profile '${resolved.name}' has expired Wrangler OAuth credentials and no refresh_token to renew them (expiration_time: ${session.expirationTime}). Run 'wrangler-accounts login ${resolved.name}' to re-authenticate.`,
|
|
415
415
|
3
|
|
416
416
|
);
|
|
417
417
|
}
|
|
@@ -1075,9 +1075,9 @@ function main() {
|
|
|
1075
1075
|
|
|
1076
1076
|
const profileCfg = path.join(profilesDir, resolved.name, "config.toml");
|
|
1077
1077
|
const session = readSessionState(profileCfg);
|
|
1078
|
-
if (session.expired) {
|
|
1078
|
+
if (session.effective === 'expired') {
|
|
1079
1079
|
die(
|
|
1080
|
-
`Profile '${resolved.name}' has expired Wrangler OAuth credentials. Run 'wrangler-accounts login ${resolved.name}' to
|
|
1080
|
+
`Profile '${resolved.name}' has expired Wrangler OAuth credentials and no refresh_token to renew them. Run 'wrangler-accounts login ${resolved.name}' to re-authenticate.`,
|
|
1081
1081
|
3
|
|
1082
1082
|
);
|
|
1083
1083
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leeguoo/wrangler-accounts",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Cloudflare Wrangler multi-account manager — save, switch, and run wrangler against multiple Cloudflare Workers accounts with AWS-style --profile and per-invocation shadow HOME isolation.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -30,6 +30,13 @@ Non-Claude-Code users can keep using the `skills.sh` distribution path for this
|
|
|
30
30
|
npx skills add leeguooooo/wrangler-accounts -g -y
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
If a Claude Code user previously installed via `skills.sh`, removing the standalone copy avoids a duplicate `/wrangler-accounts` entry in the command picker:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx skills remove wrangler-accounts
|
|
37
|
+
# or: rm -rf ~/.agents/skills/wrangler-accounts
|
|
38
|
+
```
|
|
39
|
+
|
|
33
40
|
## Prerequisites (check before running any recipe below)
|
|
34
41
|
|
|
35
42
|
This skill is only documentation — the actual `wrangler-accounts` binary must also be installed on the user's `PATH`. Before running any command below, verify:
|
|
@@ -303,9 +310,9 @@ wrangler deploy
|
|
|
303
310
|
|
|
304
311
|
## Troubleshooting
|
|
305
312
|
|
|
306
|
-
### "Profile 'X' has expired Wrangler OAuth credentials"
|
|
313
|
+
### "Profile 'X' has expired Wrangler OAuth credentials and no refresh_token to renew them"
|
|
307
314
|
|
|
308
|
-
The saved OAuth
|
|
315
|
+
The saved OAuth access_token is past its `expiration_time` AND there is no `refresh_token` in the profile config (no `offline_access` scope at login time, or the token was revoked). The profile is genuinely broken; only re-authenticating fixes it:
|
|
309
316
|
|
|
310
317
|
```bash
|
|
311
318
|
wrangler-accounts login <name>
|
|
@@ -313,6 +320,8 @@ wrangler-accounts login <name>
|
|
|
313
320
|
|
|
314
321
|
This overwrites the existing profile with a fresh OAuth session. Any saved metadata (identity, etc.) is re-verified.
|
|
315
322
|
|
|
323
|
+
**Note:** If you see this error in 1.5.0 or earlier, you may be hitting a known regression: any profile whose access_token had passed expiration was blocked even when a refresh_token was present. Upgrade to 1.5.1+ — `wrangler` itself silently refreshes those tokens on the next call, so wrangler-accounts no longer pre-flights against `expiration_time` alone.
|
|
324
|
+
|
|
316
325
|
### "No profile specified. Options: ..."
|
|
317
326
|
|
|
318
327
|
The user ran `wrangler-accounts <wrangler-args>` without a resolvable profile. Fix one of:
|
|
@@ -30,6 +30,13 @@ Non-Claude-Code users can keep using the `skills.sh` distribution path for this
|
|
|
30
30
|
npx skills add leeguooooo/wrangler-accounts -g -y
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
If a Claude Code user previously installed via `skills.sh`, removing the standalone copy avoids a duplicate `/wrangler-accounts` entry in the command picker:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx skills remove wrangler-accounts
|
|
37
|
+
# or: rm -rf ~/.agents/skills/wrangler-accounts
|
|
38
|
+
```
|
|
39
|
+
|
|
33
40
|
## Prerequisites (check before running any recipe below)
|
|
34
41
|
|
|
35
42
|
This skill is only documentation — the actual `wrangler-accounts` binary must also be installed on the user's `PATH`. Before running any command below, verify:
|
|
@@ -303,9 +310,9 @@ wrangler deploy
|
|
|
303
310
|
|
|
304
311
|
## Troubleshooting
|
|
305
312
|
|
|
306
|
-
### "Profile 'X' has expired Wrangler OAuth credentials"
|
|
313
|
+
### "Profile 'X' has expired Wrangler OAuth credentials and no refresh_token to renew them"
|
|
307
314
|
|
|
308
|
-
The saved OAuth
|
|
315
|
+
The saved OAuth access_token is past its `expiration_time` AND there is no `refresh_token` in the profile config (no `offline_access` scope at login time, or the token was revoked). The profile is genuinely broken; only re-authenticating fixes it:
|
|
309
316
|
|
|
310
317
|
```bash
|
|
311
318
|
wrangler-accounts login <name>
|
|
@@ -313,6 +320,8 @@ wrangler-accounts login <name>
|
|
|
313
320
|
|
|
314
321
|
This overwrites the existing profile with a fresh OAuth session. Any saved metadata (identity, etc.) is re-verified.
|
|
315
322
|
|
|
323
|
+
**Note:** If you see this error in 1.5.0 or earlier, you may be hitting a known regression: any profile whose access_token had passed expiration was blocked even when a refresh_token was present. Upgrade to 1.5.1+ — `wrangler` itself silently refreshes those tokens on the next call, so wrangler-accounts no longer pre-flights against `expiration_time` alone.
|
|
324
|
+
|
|
316
325
|
### "No profile specified. Options: ..."
|
|
317
326
|
|
|
318
327
|
The user ran `wrangler-accounts <wrangler-args>` without a resolvable profile. Fix one of:
|