@tinacms/app 0.0.0-20231011163721 → 0.0.0-20231012132018
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 +13 -78
- package/LICENSE +1 -9
- package/package.json +4 -4
- package/src/Playground.tsx +2 -1
- package/src/lib/graphql-reducer.ts +6 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,90 +1,25 @@
|
|
|
1
1
|
# @tinacms/app
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20231012132018
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- Updated dependencies [aec44a7dc]
|
|
8
|
+
- tinacms@0.0.0-20231012132018
|
|
9
|
+
- @tinacms/mdx@0.0.0-20231012132018
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
- adds AbstractAuthProvider class that can be extended to make new auth provider
|
|
11
|
-
- Adds a Clerk auth provider
|
|
12
|
-
- renames admin.auth to admin.authHooks
|
|
13
|
-
- deprecates admin.auth
|
|
11
|
+
## 1.2.28
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Instead of passing an object that contains the auth functions you can now use an authProvider class. This makes the DX more clear and allows us to use classes for the AuthProvide, GitProvider and Database Adapter. This also means it will be easier to publish new auth providers as packages.
|
|
18
|
-
|
|
19
|
-
## Previously
|
|
20
|
-
|
|
21
|
-
```js
|
|
22
|
-
defineConfig({
|
|
23
|
-
admin: {
|
|
24
|
-
auth: {
|
|
25
|
-
login() {},
|
|
26
|
-
logout() {},
|
|
27
|
-
//...
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
//...
|
|
31
|
-
})
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## New API
|
|
35
|
-
|
|
36
|
-
```js
|
|
37
|
-
import { customAuthProvider } from 'tinacms-CUSTOM'
|
|
38
|
-
defineConfig({
|
|
39
|
-
authProvider: new CustomAuthProvider(),
|
|
40
|
-
})
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Migration
|
|
44
|
-
|
|
45
|
-
If you are using admin.auth.onLogin or admin.auth.onLogout you can move those functions to admin.authHooks.
|
|
46
|
-
|
|
47
|
-
If you are using other function from admin.auth you can move them into a custom auth provider.
|
|
48
|
-
|
|
49
|
-
## Previously
|
|
50
|
-
|
|
51
|
-
```js
|
|
52
|
-
defineConfig({
|
|
53
|
-
admin: {
|
|
54
|
-
auth: {
|
|
55
|
-
login() {},
|
|
56
|
-
logout() {},
|
|
57
|
-
//...
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
//...
|
|
61
|
-
})
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Update to be
|
|
65
|
-
|
|
66
|
-
## New API
|
|
67
|
-
|
|
68
|
-
```js
|
|
69
|
-
import { AbstractAuthProvider } from 'tinacms'
|
|
70
|
-
class CustomAuthProvider extends AbstractAuthProvider {
|
|
71
|
-
login() {}
|
|
72
|
-
logout() {}
|
|
73
|
-
//...
|
|
74
|
-
}
|
|
75
|
-
defineConfig({
|
|
76
|
-
authProvider: new CustomAuthProvider(),
|
|
77
|
-
//...
|
|
78
|
-
})
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Now everything should work as it previously did.
|
|
13
|
+
### Patch Changes
|
|
82
14
|
|
|
83
|
-
-
|
|
84
|
-
- Updated dependencies [
|
|
15
|
+
- 841456237: Fix issue where an error would occur if the folder button was clicked in the playground
|
|
16
|
+
- Updated dependencies [5040fc7cb]
|
|
17
|
+
- Updated dependencies [177002715]
|
|
85
18
|
- Updated dependencies [e69a3ef81]
|
|
86
|
-
|
|
87
|
-
|
|
19
|
+
- Updated dependencies [c925786ef]
|
|
20
|
+
- Updated dependencies [9f01550dd]
|
|
21
|
+
- @tinacms/mdx@1.3.19
|
|
22
|
+
- tinacms@1.5.21
|
|
88
23
|
|
|
89
24
|
## 1.2.27
|
|
90
25
|
|
package/LICENSE
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Portions of the TinaCMS software are licensed as follows:
|
|
4
|
-
|
|
5
|
-
* All software that resides under the "packages/@tinacms/datalayer/" and the "packages/@tinacms/graphql/" directories (the "Tina Data Layer"), is licensed under the license defined in "packages/@tinacms/datalayer/LICENSE".
|
|
6
|
-
|
|
7
|
-
* All software outside of the above-mentioned directories is available under the "Apache 2.0" license as set forth below.
|
|
8
|
-
|
|
9
|
-
Apache License
|
|
1
|
+
Apache License
|
|
10
2
|
Version 2.0, January 2004
|
|
11
3
|
http://www.apache.org/licenses/
|
|
12
4
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/app",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-20231012132018",
|
|
4
4
|
"main": "src/main.tsx",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"devDependencies": {
|
|
@@ -14,7 +14,6 @@
|
|
|
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": "0.0.0-20231011163721",
|
|
18
17
|
"@xstate/react": "3.0.0",
|
|
19
18
|
"final-form": "4.20.7",
|
|
20
19
|
"graphiql": "3.0.0-alpha.1",
|
|
@@ -25,8 +24,9 @@
|
|
|
25
24
|
"react-dom": "17.0.2",
|
|
26
25
|
"react-router-dom": "6.3.0",
|
|
27
26
|
"tailwindcss": "^3.2.7",
|
|
28
|
-
"tinacms": "0.0.0-20231011163721",
|
|
29
27
|
"typescript": "^4.6.4",
|
|
30
|
-
"zod": "^3.14.3"
|
|
28
|
+
"zod": "^3.14.3",
|
|
29
|
+
"@tinacms/mdx": "0.0.0-20231012132018",
|
|
30
|
+
"tinacms": "0.0.0-20231012132018"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/src/Playground.tsx
CHANGED
|
@@ -89,7 +89,8 @@ const Playground = () => {
|
|
|
89
89
|
let relativePath = ''
|
|
90
90
|
if (collection) {
|
|
91
91
|
relativePath =
|
|
92
|
-
collection
|
|
92
|
+
collection?.documents?.edges[0]?.node?._sys.relativePath ||
|
|
93
|
+
''
|
|
93
94
|
variables = JSON.stringify({ relativePath }, null, 2)
|
|
94
95
|
}
|
|
95
96
|
return (
|
|
@@ -271,14 +271,12 @@ export const useGraphQLReducer = (
|
|
|
271
271
|
}
|
|
272
272
|
})
|
|
273
273
|
let value = source[fieldName] as unknown
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
})
|
|
281
|
-
}
|
|
274
|
+
aliases.forEach((alias) => {
|
|
275
|
+
const aliasValue = source[alias]
|
|
276
|
+
if (aliasValue) {
|
|
277
|
+
value = aliasValue
|
|
278
|
+
}
|
|
279
|
+
})
|
|
282
280
|
if (fieldName === '_sys') {
|
|
283
281
|
return source._internalSys
|
|
284
282
|
}
|