@foxden-app/foxclaw 0.3.3 → 0.3.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 +1 -1
- package/skills/npm-publish/SKILL.md +26 -14
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ description: Publish npm packages safely, especially packages that require npm 2
|
|
|
5
5
|
|
|
6
6
|
# NPM Publish
|
|
7
7
|
|
|
8
|
-
Use this skill to publish an npm package from a repo
|
|
8
|
+
Use this skill to publish an npm package from a repo. Prefer the normal no-2FA publish path first. Fall back to npm web-auth only when npm explicitly prompts for it.
|
|
9
9
|
|
|
10
10
|
## Release Checklist
|
|
11
11
|
|
|
@@ -41,32 +41,44 @@ Use this skill to publish an npm package from a repo while preserving the exact
|
|
|
41
41
|
git push
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
##
|
|
44
|
+
## Publish Flow
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
1. Start publish in a TTY and disable local browser opening:
|
|
46
|
+
1. Start publish in a TTY and disable local browser opening. This works both when npm publishes directly and when it asks for web auth:
|
|
49
47
|
```bash
|
|
50
48
|
BROWSER=true npm publish
|
|
51
49
|
```
|
|
52
50
|
|
|
53
|
-
2.
|
|
51
|
+
2. If npm publishes directly, it should finish with:
|
|
54
52
|
```text
|
|
55
|
-
|
|
56
|
-
https://www.npmjs.com/auth/cli/<auth-id>
|
|
57
|
-
Press ENTER to open in the browser...
|
|
53
|
+
+ <package-name>@<version>
|
|
58
54
|
```
|
|
55
|
+
Then verify:
|
|
56
|
+
```bash
|
|
57
|
+
npm view <package-name> version
|
|
58
|
+
git status --short --branch
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
3. If npm instead prints a web-auth prompt, use the fallback flow below.
|
|
62
|
+
|
|
63
|
+
## Web Auth Fallback
|
|
64
|
+
|
|
65
|
+
Use this only when npm prints:
|
|
66
|
+
```text
|
|
67
|
+
Authenticate your account at:
|
|
68
|
+
https://www.npmjs.com/auth/cli/<auth-id>
|
|
69
|
+
Press ENTER to open in the browser...
|
|
70
|
+
```
|
|
59
71
|
|
|
60
|
-
|
|
72
|
+
1. Send the URL to the user as a bare URL, not inside backticks or a code block. Bare URLs are easier to tap.
|
|
61
73
|
|
|
62
|
-
|
|
74
|
+
2. Do not press Enter immediately. Wait until the user says they clicked/confirmed the npm page.
|
|
63
75
|
|
|
64
|
-
|
|
76
|
+
3. After the user confirms, send Enter to the still-running TTY process. npm should retrieve the temporary token and finish:
|
|
65
77
|
```text
|
|
66
78
|
+ <package-name>@<version>
|
|
67
79
|
```
|
|
68
80
|
|
|
69
|
-
|
|
81
|
+
4. Verify the published version:
|
|
70
82
|
```bash
|
|
71
83
|
npm view <package-name> version
|
|
72
84
|
git status --short --branch
|
|
@@ -74,7 +86,7 @@ Use this exact flow when npm returns `EOTP` or when the account uses web auth fo
|
|
|
74
86
|
|
|
75
87
|
## Failure Modes
|
|
76
88
|
|
|
77
|
-
- If `npm publish` is run without a TTY, npm may print an `EOTP` error with the auth URL redacted as `***`. Stop that attempt and rerun with a TTY.
|
|
89
|
+
- If `npm publish` is run without a TTY, npm may print an `EOTP` error with the auth URL redacted as `***`. Stop that attempt and rerun with `BROWSER=true npm publish` in a TTY.
|
|
78
90
|
- If `xdg-open` fails because the environment has no browser, rerun with `BROWSER=true npm publish`.
|
|
79
91
|
- If the auth link expires or the publish process exits, rerun `BROWSER=true npm publish` to generate a new link.
|
|
80
92
|
- If the user provides a classic authenticator OTP instead of using the web link, publish can be retried with `npm publish --otp <code>`, but prefer web auth when the user asks for a clickable confirmation link.
|