@tinacms/app 1.2.29 → 1.2.30
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/CHANGELOG.md +17 -0
- package/package.json +4 -4
- package/src/App.tsx +2 -4
- package/src/Playground.tsx +11 -7
- package/src/vite-env.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @tinacms/app
|
|
2
2
|
|
|
3
|
+
## 1.2.30
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a937aabf0: Add support for build.basePath to be an environment variable
|
|
8
|
+
- 661239b2a: update final form to fix peer deps issues
|
|
9
|
+
- Updated dependencies [131b4dc55]
|
|
10
|
+
- Updated dependencies [93bfc804a]
|
|
11
|
+
- Updated dependencies [1fc2c4a99]
|
|
12
|
+
- Updated dependencies [693cf5bd6]
|
|
13
|
+
- Updated dependencies [afd1c7c97]
|
|
14
|
+
- Updated dependencies [a937aabf0]
|
|
15
|
+
- Updated dependencies [661239b2a]
|
|
16
|
+
- Updated dependencies [630ab9436]
|
|
17
|
+
- tinacms@1.5.23
|
|
18
|
+
- @tinacms/mdx@1.3.21
|
|
19
|
+
|
|
3
20
|
## 1.2.29
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/app",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.30",
|
|
4
4
|
"main": "src/main.tsx",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"devDependencies": {
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"@headlessui/react": "1.6.6",
|
|
15
15
|
"@heroicons/react": "1.0.6",
|
|
16
16
|
"@monaco-editor/react": "4.4.5",
|
|
17
|
-
"@tinacms/mdx": "1.3.
|
|
17
|
+
"@tinacms/mdx": "1.3.21",
|
|
18
18
|
"@xstate/react": "3.0.0",
|
|
19
|
-
"final-form": "4.20.
|
|
19
|
+
"final-form": "4.20.10",
|
|
20
20
|
"graphiql": "3.0.0-alpha.1",
|
|
21
21
|
"graphql": "15.8.0",
|
|
22
22
|
"monaco-editor": "0.31.0",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"react-dom": "17.0.2",
|
|
26
26
|
"react-router-dom": "6.3.0",
|
|
27
27
|
"tailwindcss": "^3.2.7",
|
|
28
|
-
"tinacms": "1.5.
|
|
28
|
+
"tinacms": "1.5.23",
|
|
29
29
|
"typescript": "^4.6.4",
|
|
30
30
|
"zod": "^3.14.3"
|
|
31
31
|
}
|
package/src/App.tsx
CHANGED
|
@@ -38,10 +38,8 @@ const SetPreview = () => {
|
|
|
38
38
|
...MdxFieldPluginExtendible,
|
|
39
39
|
Component: Editor,
|
|
40
40
|
})
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
basePath = config.build.basePath.replace(/^\/|\/$/g, '')
|
|
44
|
-
}
|
|
41
|
+
const basePath = __BASE_PATH__.replace(/^\/|\/$/g, '')
|
|
42
|
+
cms.flags.set('tina-basepath', basePath)
|
|
45
43
|
cms.flags.set(
|
|
46
44
|
'tina-preview',
|
|
47
45
|
`${basePath ? `${basePath}/` : ''}${config.build.outputFolder.replace(
|
package/src/Playground.tsx
CHANGED
|
@@ -8,11 +8,6 @@ import { queries } from 'CLIENT_IMPORT'
|
|
|
8
8
|
|
|
9
9
|
import 'graphiql/graphiql.min.css'
|
|
10
10
|
|
|
11
|
-
const fetcher = createGraphiQLFetcher({
|
|
12
|
-
url: __API_URL__,
|
|
13
|
-
headers: { 'X-API-KEY': __TOKEN__ },
|
|
14
|
-
})
|
|
15
|
-
|
|
16
11
|
const Playground = () => {
|
|
17
12
|
const cms = useCMS()
|
|
18
13
|
const [query, setQuery] = React.useState('')
|
|
@@ -61,6 +56,10 @@ const Playground = () => {
|
|
|
61
56
|
|
|
62
57
|
const ref = React.useRef()
|
|
63
58
|
|
|
59
|
+
const getToken = () => {
|
|
60
|
+
return JSON.parse(localStorage.getItem('tinacms-auth') || '{}')?.id_token
|
|
61
|
+
}
|
|
62
|
+
|
|
64
63
|
if (!autoQueries) {
|
|
65
64
|
return null
|
|
66
65
|
}
|
|
@@ -130,11 +129,16 @@ const Playground = () => {
|
|
|
130
129
|
</div>
|
|
131
130
|
)
|
|
132
131
|
}
|
|
133
|
-
|
|
134
132
|
return (
|
|
135
133
|
<div style={{ height: '100vh' }}>
|
|
136
134
|
<GraphiQL
|
|
137
|
-
fetcher={
|
|
135
|
+
fetcher={async (params, options) => {
|
|
136
|
+
const fetcher = createGraphiQLFetcher({
|
|
137
|
+
url: __API_URL__,
|
|
138
|
+
headers: { Authorization: `Bearer ${getToken()}` },
|
|
139
|
+
})
|
|
140
|
+
return fetcher(params, options)
|
|
141
|
+
}}
|
|
138
142
|
query={query}
|
|
139
143
|
defaultEditorToolsVisibility="variables"
|
|
140
144
|
isHeadersEditorEnabled={false}
|