-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1739: Separate token specific code into its own export r=flevi29 a=flevi29 # Pull Request ## Related issue Fixes #1690 ## What does this PR do? - generalizes the `MeiliSearch` client into a single universal export by stripping Node.js crypto specific token code into its own separate exported module - `apiKey` option is now mandatory in `generateTenantToken` function ### Migration Old: ```typescript import { MeiliSearch } from "meilisearch"; const client = new MeiliSearch({ host: "http://127.0.0.1:7700", apiKey: "masterKey" }); const token = await client.generateTenantToken("e489fe16-3381-431b-bee3-00430192915d"); // ... ``` New: ```typescript import { generateTenantToken } from "meilisearch/token"; const token = await generateTenantToken("e489fe16-3381-431b-bee3-00430192915d", [], { apiKey: "masterKey" }); // ... ``` ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! Co-authored-by: F. Levi <[email protected]>
- Loading branch information
Showing
19 changed files
with
152 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.