Skip to content

Commit 92673f4

Browse files
authored
Update strapi-raycast-extension extension (#16724)
- Update CHANGELOG.md - 1.0.1 - Remove Preferences type references - Add Compatibility info - Initial commit
1 parent a3a4cb0 commit 92673f4

File tree

7 files changed

+22
-12
lines changed

7 files changed

+22
-12
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
# Strapi Changelog
22

3+
## [Clean up] - 2025-01-30
4+
5+
- Remove remaining preferences type references
6+
- Add 'Compatibility' section to README
7+
38
## [Initial Version] - 2025-01-30

extensions/strapi-raycast-extension/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
Strapi extension for Raycast. Explore your Strapi content & media all from within Raycast.
44

5+
## Compatibility
6+
This extension currently only supports Strapi v5 instances.
7+
58
## Required settings
69
|Setting|Description|
710
|-------|-----------|

extensions/strapi-raycast-extension/package-lock.json

+4-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/strapi-raycast-extension/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "Strapi extension for Raycast",
66
"icon": "extension-icon.png",
77
"author": "douwepausma",
8-
"version": "1.0.0",
8+
"version": "1.0.1",
99
"categories": [
1010
"Developer Tools"
1111
],

extensions/strapi-raycast-extension/src/explore-content.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { kindName, entryTtile, entrySubtitle, capitalize } from "./lib/utils";
55

66
export default function ExploreContent() {
77
const { isLoading, data } = getContentTypes();
8-
const { host } = getPreferenceValues<Preferences>();
8+
const { host } = getPreferenceValues();
99

1010
return (
1111
<List isLoading={isLoading}>
@@ -42,7 +42,7 @@ export default function ExploreContent() {
4242
}
4343

4444
function Entries({ contentType }: { contentType: ContentType }) {
45-
const { host } = getPreferenceValues<Preferences>();
45+
const { host } = getPreferenceValues();
4646
const { data, isLoading } = getEntries(contentType.route);
4747

4848
return (

extensions/strapi-raycast-extension/src/lib/services.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import fetch from "node-fetch";
1515
* @returns An object containing the fetched content types and the state of the fetch request.
1616
*/
1717
export const getContentTypes = () => {
18-
const { host, apiKey } = getPreferenceValues<Preferences>();
18+
const { host, apiKey } = getPreferenceValues();
1919

2020
const res = useFetch<ContentTypesResponse>(`${host}/api/content-type-builder/content-types`, {
2121
headers: {
@@ -44,7 +44,7 @@ export const getContentTypes = () => {
4444
* @returns The fetched content type.
4545
*/
4646
export const getContentType = (uid: string) => {
47-
const { host, apiKey } = getPreferenceValues<Preferences>();
47+
const { host, apiKey } = getPreferenceValues();
4848

4949
const res = useFetch<ContentTypeResponse>(`${host}/api/content-type-builder/content-types/${uid}`, {
5050
headers: {
@@ -74,7 +74,7 @@ export const getContentType = (uid: string) => {
7474
* @returns An object containing the fetched entries and the state of the fetch request.
7575
*/
7676
export const getEntries = (route: string) => {
77-
const { host, apiKey } = getPreferenceValues<Preferences>();
77+
const { host, apiKey } = getPreferenceValues();
7878

7979
const res = useFetch<EntryResponse>(`${host}/api${route}?status=draft&pagination[limit]=10000`, {
8080
headers: {
@@ -100,7 +100,7 @@ export const getEntries = (route: string) => {
100100
* @param data - The data to submit.
101101
*/
102102
export const createEntry = async (route: string, data: object) => {
103-
const { host, apiKey } = getPreferenceValues<Preferences>();
103+
const { host, apiKey } = getPreferenceValues();
104104

105105
const res = await fetch(`${host}/api${route}`, {
106106
method: "POST",
@@ -121,7 +121,7 @@ export const createEntry = async (route: string, data: object) => {
121121
* @param uid - The UID of the component to fetch.
122122
*/
123123
export const getComponent = (uid: string) => {
124-
const { host, apiKey } = getPreferenceValues<Preferences>();
124+
const { host, apiKey } = getPreferenceValues();
125125

126126
const res = useFetch<ComponentResponse>(`${host}/api/content-type-builder/components/${uid}`, {
127127
headers: {
@@ -141,7 +141,7 @@ export const getComponent = (uid: string) => {
141141
* @returns An array containing the fetched files and the state of the fetch request.
142142
*/
143143
export const getFiles = () => {
144-
const { host, apiKey } = getPreferenceValues<Preferences>();
144+
const { host, apiKey } = getPreferenceValues();
145145

146146
const res = useFetch<StrapiFile[]>(`${host}/api/upload/files`, {
147147
headers: {

extensions/strapi-raycast-extension/src/search-media-library.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { StrapiFile } from "./types";
44

55
export default function SearchMediaLibrary() {
66
const files = getFiles();
7-
const { host } = getPreferenceValues<Preferences>();
7+
const { host } = getPreferenceValues();
88

99
return (
1010
<List isShowingDetail isLoading={files.isLoading}>

0 commit comments

Comments
 (0)