@nuxtus/nuxtus 1.2.0 → 1.3.0
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 +7 -0
- package/TODO +3 -2
- package/client/nuxt.config.ts +4 -1
- package/client/package.json +3 -5
- package/package.json +1 -1
- package/client/plugins/directusLogin.client.ts +0 -12
- package/client/server/api/directus/collection.post.ts +0 -18
- package/client/server/api/directus/field.post.ts +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
|
|
3
|
+
# [1.3.0](https://github.com/nuxtus/nuxtus/compare/v1.2.0...v1.3.0) (2022-07-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* :sparkles: use @nuxtus/nuxt-module instead of hard-coded plugins and api endpoints ([c34a601](https://github.com/nuxtus/nuxtus/commit/c34a601e107be87649ead02ab99072c40b1a9922))
|
|
9
|
+
|
|
3
10
|
# [1.2.0](https://github.com/nuxtus/nuxtus/compare/v1.1.1...v1.2.0) (2022-07-21)
|
|
4
11
|
|
|
5
12
|
|
package/TODO
CHANGED
|
@@ -18,8 +18,8 @@ Todo:
|
|
|
18
18
|
✔ Allow use of different ports/URLs for Directus and Nuxt (currently hard-coded) @done(22-07-13 20:42)
|
|
19
19
|
✔ Add "types" to cli to update types from Directus when not using hook - use @directus/sdk for /oas now on all apps @done(22-07-18 17:01)
|
|
20
20
|
☐ Make opening browser window on start optional using npm run start (not possible)
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
✔ Look at moving login and server/api stuff to a Nuxt module @done(22-07-28 19:37)
|
|
22
|
+
✔ Make sure separate packages can be used without Nuxt Boilerplate if required @done(22-07-28 19:37)
|
|
23
23
|
✔ Console.log messages from directus extension should be formatted like other directus messages @done(22-07-19 20:46)
|
|
24
24
|
✔ Add default Directus login to end of create-nuxtus script @done(22-07-19 17:30)
|
|
25
25
|
☐ When adding a new collection the new page triggers a nuxt restart then directus tries to send a field.create which fails. We get around this by getting the create field first but Directus still returns a 404 for the second request.
|
|
@@ -29,3 +29,4 @@ Todo:
|
|
|
29
29
|
☐ Websockets (https://github.com/br41nslug/directus-websocket-subscribe)
|
|
30
30
|
✔ Upgrade nuxt-directus @done(22-07-17 11:32)
|
|
31
31
|
☐ Add ability to use Directus static token instead of login (once https://github.com/Intevel/nuxt-directus/pull/54#pullrequestreview-1045062132 completed)
|
|
32
|
+
☐ Get added to some nuxt/directus lists etc.
|
package/client/nuxt.config.ts
CHANGED
|
@@ -11,7 +11,7 @@ export default defineNuxtConfig({
|
|
|
11
11
|
],
|
|
12
12
|
"@nuxtjs/tailwindcss",
|
|
13
13
|
],
|
|
14
|
-
modules: ["nuxt-directus"],
|
|
14
|
+
modules: ["nuxt-directus", "@nuxtus/nuxt-module"],
|
|
15
15
|
googleFonts: {
|
|
16
16
|
families: {
|
|
17
17
|
Inter: true,
|
|
@@ -22,6 +22,9 @@ export default defineNuxtConfig({
|
|
|
22
22
|
jit: true,
|
|
23
23
|
},
|
|
24
24
|
directus: {},
|
|
25
|
+
nuxtus: {
|
|
26
|
+
authDirectus: true,
|
|
27
|
+
},
|
|
25
28
|
publicRuntimeConfig: {
|
|
26
29
|
directusEmail: "",
|
|
27
30
|
directusPassword: "",
|
package/client/package.json
CHANGED
|
@@ -9,13 +9,11 @@
|
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"@nuxtjs/google-fonts": "^1.3.0",
|
|
11
11
|
"@nuxtjs/tailwindcss": "^5.0.4",
|
|
12
|
-
"@nuxtus/cli": "^1.1.
|
|
13
|
-
"@nuxtus/
|
|
14
|
-
"nuxt": "^3.0.0-rc.6"
|
|
15
|
-
"openapi-typescript": "^5.4.1"
|
|
12
|
+
"@nuxtus/cli": "^1.1.1",
|
|
13
|
+
"@nuxtus/nuxt-module": "^1.0.3",
|
|
14
|
+
"nuxt": "^3.0.0-rc.6"
|
|
16
15
|
},
|
|
17
16
|
"dependencies": {
|
|
18
|
-
"@directus/sdk": "^10.1.1",
|
|
19
17
|
"@headlessui/vue": "^1.6.1",
|
|
20
18
|
"@heroicons/vue": "^1.0.6",
|
|
21
19
|
"nuxt-directus": "^2.2.0"
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export default defineNuxtPlugin(async (nuxtApp) => {
|
|
2
|
-
try {
|
|
3
|
-
const config = useRuntimeConfig()
|
|
4
|
-
const { login } = useDirectusAuth()
|
|
5
|
-
await login({
|
|
6
|
-
email: config.public.directusEmail,
|
|
7
|
-
password: config.public.directusPassword,
|
|
8
|
-
})
|
|
9
|
-
} catch (error) {
|
|
10
|
-
console.error(error)
|
|
11
|
-
}
|
|
12
|
-
})
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import Generator from "@nuxtus/generator"
|
|
2
|
-
|
|
3
|
-
export default defineEventHandler(async (event) => {
|
|
4
|
-
if (process.env.NODE_ENV !== "production") {
|
|
5
|
-
const body = await useBody(event)
|
|
6
|
-
const nuxtus = new Generator()
|
|
7
|
-
try {
|
|
8
|
-
const collection = body.collection
|
|
9
|
-
nuxtus.createPage(collection, body.singleton)
|
|
10
|
-
} catch (err) {
|
|
11
|
-
console.error(err.message)
|
|
12
|
-
throw new Error("Unable to create page: " + err.message)
|
|
13
|
-
}
|
|
14
|
-
return {
|
|
15
|
-
api: "ok",
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
})
|