Skip to content

Commit 545aca7

Browse files
committed
Add info on granular access tokens
1 parent 93de3ba commit 545aca7

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed
128 KB
Loading

fern/products/sdks/overview/typescript/publishing-to-npm.mdx

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Publish your public-facing Fern Typescript SDK to the [npm registry](https://www
99

1010
## Set up your GitHub integration
1111

12-
1. Create a new GitHub repository for your SDK, if you haven't done so already.
12+
1. Create a new GitHub repository called `company-typescript` (or something similar) for your SDK, if you haven't done so already.
1313
1. Install the [Fern GitHub App](https://github.com/apps/fern-api): Select **Configure**, then scroll down to **Repository Access**. Select **Only select repositories** and in the dropdown select the repository for your SDK. Click **Save**.
1414
1. Add your SDK files to your repository.
1515

@@ -96,7 +96,7 @@ ts-sdk:
9696
location: npm
9797
package-name: name-of-your-package
9898
github:
99-
repository: your-org/your-repository
99+
repository: your-org/company-typescript
100100
```
101101
102102
</Step>
@@ -122,17 +122,38 @@ ts-sdk:
122122

123123
<Step title="Generate Token">
124124

125-
1. Click on **Generate New Token**.
126-
1. Select **Classic Token**.
127-
1. Name your token and select **Automation** as the token type.
128-
1. Once finished, click **Generate Token**.
125+
Click on **Generate New Token**, then choose the appropriate token type. For more information on access tokens and which type to choose, see npm's [About access tokens](https://docs.npmjs.com/about-access-tokens) documentation.
126+
127+
<AccordionGroup>
128+
<Accordion title="Option 1: Classic Token">
129+
130+
1. Select **Classic Token**
131+
1. Name your token and select **Automation** as the token type.
129132

130133
<Frame>
131134
<img src="assets/npm-automation-token.png" alt="Creating NPM Automation Token" />
132135
</Frame>
133136

137+
Once finished, click **Generate Token**.
138+
134139
<Warning>When you click **Generate Token**, you’ll be returned to the **Access Tokens** dashboard. A box on the top of the dashboard will confirm that you successfully created a new token and prompt you to copy your token id. Make sure you save this id, as you'll need to add it to your GitHub repository and `generators.yml` later on.</Warning>
135140

141+
</Accordion>
142+
<Accordion title="Option 2: Granular Access Token">
143+
1. Select **Granular Access Token**.
144+
1. Name your token.
145+
1. Set an expiration.
146+
1. Configure your token's access to packages and scopes.
147+
1. Configure your token's access to organizations. In order to fill this out, you must have at least one organization already configured. See [Creating an organization](https://docs.npmjs.com/creating-an-organization) for more information.
148+
1. Optionally fill out additional permissions according to your organization's requirements.
149+
150+
<Frame>
151+
<img src="assets/granular-access-token.png" alt="Creating Granular Access Token" />
152+
</Frame>
153+
154+
</Accordion>
155+
</AccordionGroup>
156+
136157
</Step>
137158

138159
<Step title="Add npm Token to your GitHub Repository">

0 commit comments

Comments
 (0)