nuxt-directus-sdk 5.0.0-beta.8 → 5.0.0-beta.9
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/dist/module.d.mts +4 -3
- package/dist/module.d.ts +4 -3
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/directus-visual-editor.d.vue.ts +1 -1
- package/dist/runtime/components/directus-visual-editor.vue.d.ts +1 -1
- package/dist/runtime/composables/auth.d.ts +6 -6
- package/dist/types.d.mts +1 -1
- package/package.json +10 -5
package/dist/module.d.mts
CHANGED
|
@@ -6,6 +6,7 @@ type DirectusUrl = string | {
|
|
|
6
6
|
client: string;
|
|
7
7
|
server: string;
|
|
8
8
|
};
|
|
9
|
+
type ReadMeFields = Query<DirectusSchema, DirectusSchema['directus_users']>['fields'];
|
|
9
10
|
interface ModuleOptions {
|
|
10
11
|
/**
|
|
11
12
|
* Directus API URL
|
|
@@ -118,9 +119,9 @@ interface ModuleOptions {
|
|
|
118
119
|
/**
|
|
119
120
|
* ReadMe fields to fetch
|
|
120
121
|
* @default []
|
|
121
|
-
* @type
|
|
122
|
+
* @type ReadMeFields
|
|
122
123
|
*/
|
|
123
|
-
readMeFields?:
|
|
124
|
+
readMeFields?: ReadMeFields;
|
|
124
125
|
redirect?: {
|
|
125
126
|
/**
|
|
126
127
|
* Redirect to home page after login
|
|
@@ -171,4 +172,4 @@ declare module '@nuxt/schema' {
|
|
|
171
172
|
}
|
|
172
173
|
|
|
173
174
|
export { _default as default };
|
|
174
|
-
export type { DirectusUrl, ModuleOptions };
|
|
175
|
+
export type { DirectusUrl, ModuleOptions, ReadMeFields };
|
package/dist/module.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ type DirectusUrl = string | {
|
|
|
6
6
|
client: string;
|
|
7
7
|
server: string;
|
|
8
8
|
};
|
|
9
|
+
type ReadMeFields = Query<DirectusSchema, DirectusSchema['directus_users']>['fields'];
|
|
9
10
|
interface ModuleOptions {
|
|
10
11
|
/**
|
|
11
12
|
* Directus API URL
|
|
@@ -118,9 +119,9 @@ interface ModuleOptions {
|
|
|
118
119
|
/**
|
|
119
120
|
* ReadMe fields to fetch
|
|
120
121
|
* @default []
|
|
121
|
-
* @type
|
|
122
|
+
* @type ReadMeFields
|
|
122
123
|
*/
|
|
123
|
-
readMeFields?:
|
|
124
|
+
readMeFields?: ReadMeFields;
|
|
124
125
|
redirect?: {
|
|
125
126
|
/**
|
|
126
127
|
* Redirect to home page after login
|
|
@@ -171,4 +172,4 @@ declare module '@nuxt/schema' {
|
|
|
171
172
|
}
|
|
172
173
|
|
|
173
174
|
export { _default as default };
|
|
174
|
-
export type { DirectusUrl, ModuleOptions };
|
|
175
|
+
export type { DirectusUrl, ModuleOptions, ReadMeFields };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { generateTypes } from '../dist/runtime/types/index.js';
|
|
|
6
6
|
import { useUrl } from '../dist/runtime/utils/index.js';
|
|
7
7
|
|
|
8
8
|
const name = "nuxt-directus-sdk";
|
|
9
|
-
const version = "5.0.0-beta.
|
|
9
|
+
const version = "5.0.0-beta.9";
|
|
10
10
|
|
|
11
11
|
const configKey = "directus";
|
|
12
12
|
const logger = useLogger("nuxt-directus-sdk");
|
|
@@ -3,7 +3,7 @@ declare const __VLS_export: <T extends keyof DirectusSchema>(__VLS_props: NonNul
|
|
|
3
3
|
props: __VLS_PrettifyLocal<{
|
|
4
4
|
collection: T;
|
|
5
5
|
item: PrimaryKey;
|
|
6
|
-
fields?: (
|
|
6
|
+
fields?: keyof (DirectusSchema[T] extends any[] ? DirectusSchema[T][0] : DirectusSchema[T]) | (keyof (DirectusSchema[T] extends any[] ? DirectusSchema[T][0] : DirectusSchema[T]))[];
|
|
7
7
|
mode?: "drawer" | "modal" | "popover";
|
|
8
8
|
}> & import("vue").PublicProps & (typeof globalThis extends {
|
|
9
9
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -3,7 +3,7 @@ declare const __VLS_export: <T extends keyof DirectusSchema>(__VLS_props: NonNul
|
|
|
3
3
|
props: __VLS_PrettifyLocal<{
|
|
4
4
|
collection: T;
|
|
5
5
|
item: PrimaryKey;
|
|
6
|
-
fields?: (
|
|
6
|
+
fields?: keyof (DirectusSchema[T] extends any[] ? DirectusSchema[T][0] : DirectusSchema[T]) | (keyof (DirectusSchema[T] extends any[] ? DirectusSchema[T][0] : DirectusSchema[T]))[];
|
|
7
7
|
mode?: "drawer" | "modal" | "popover";
|
|
8
8
|
}> & import("vue").PublicProps & (typeof globalThis extends {
|
|
9
9
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { ComputedRef, Ref } from '#imports';
|
|
2
2
|
import type { RouteLocationRaw } from '#vue-router';
|
|
3
|
-
import type {
|
|
3
|
+
import type { LoginOptions } from '@directus/sdk';
|
|
4
4
|
import type { DirectusError, RegisterUserInput } from '@directus/types';
|
|
5
5
|
export interface DirectusAuth {
|
|
6
|
-
user: Ref<
|
|
6
|
+
user: Ref<DirectusUser | null>;
|
|
7
7
|
loggedIn: ComputedRef<boolean>;
|
|
8
|
-
readMe: () => Promise<
|
|
9
|
-
updateMe: (data: Partial<DirectusUser>) => Promise<
|
|
8
|
+
readMe: () => Promise<DirectusUser | DirectusError | null>;
|
|
9
|
+
updateMe: (data: Partial<DirectusUser>) => Promise<DirectusUser | DirectusError | null>;
|
|
10
10
|
login: (email: string, password: string, options?: LoginOptions & {
|
|
11
11
|
redirect?: boolean | RouteLocationRaw;
|
|
12
12
|
}) => Promise<DirectusUser | null>;
|
|
13
13
|
loginWithProvider: (provider: string, redirectOnLogin?: boolean | string) => Promise<void>;
|
|
14
14
|
logout: (redirect?: boolean | RouteLocationRaw) => Promise<void>;
|
|
15
|
-
createUser: (data: RegisterUserInput & Partial<Omit<DirectusUser, 'id' | 'email' | 'password'>>) => Promise<
|
|
16
|
-
register: (data: RegisterUserInput & Partial<Omit<DirectusUser, 'id' | 'email' | 'password'>>) => Promise<
|
|
15
|
+
createUser: (data: RegisterUserInput & Partial<Omit<DirectusUser, 'id' | 'email' | 'password'>>) => Promise<DirectusUser>;
|
|
16
|
+
register: (data: RegisterUserInput & Partial<Omit<DirectusUser, 'id' | 'email' | 'password'>>) => Promise<DirectusUser>;
|
|
17
17
|
inviteUser: (email: string, role: string, inviteUrl?: string | undefined) => Promise<void>;
|
|
18
18
|
acceptUserInvite: (token: string, password: string) => Promise<void>;
|
|
19
19
|
passwordRequest: (email: string, resetUrl?: string | undefined) => Promise<void>;
|
package/dist/types.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-directus-sdk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.0-beta.
|
|
4
|
+
"version": "5.0.0-beta.9",
|
|
5
5
|
"description": "A Directus nuxt module that uses the Directus SDK",
|
|
6
6
|
"author": "Matthew Rollinson <matt@rolley.io>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -18,16 +18,19 @@
|
|
|
18
18
|
"main": "./dist/module.mjs",
|
|
19
19
|
"types": "./dist/module.d.mts",
|
|
20
20
|
"bin": {
|
|
21
|
-
"directus-rules": "
|
|
22
|
-
"nuxt-directus-sdk": "
|
|
21
|
+
"directus-rules": "dist/cli/index.mjs",
|
|
22
|
+
"nuxt-directus-sdk": "dist/cli/index.mjs"
|
|
23
23
|
},
|
|
24
|
-
"files": [
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
25
27
|
"scripts": {
|
|
26
28
|
"prepack": "nuxt-module-build build",
|
|
27
29
|
"dev": "nuxi dev playground",
|
|
28
30
|
"dev:build": "nuxi build playground",
|
|
29
31
|
"dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
|
|
30
32
|
"release": "npm run lint && npm run prepack && npm publish && git push --follow-tags",
|
|
33
|
+
"release:next": "npm run lint && npm run prepack && npm publish --tag next && git push --follow-tags",
|
|
31
34
|
"lint": "eslint . --fix",
|
|
32
35
|
"test": "vitest run",
|
|
33
36
|
"test:watch": "vitest watch",
|
|
@@ -80,6 +83,8 @@
|
|
|
80
83
|
},
|
|
81
84
|
"unbuild": {
|
|
82
85
|
"failOnWarn": false,
|
|
83
|
-
"externals": [
|
|
86
|
+
"externals": [
|
|
87
|
+
"consola/utils"
|
|
88
|
+
]
|
|
84
89
|
}
|
|
85
90
|
}
|