@inzombieland/nuxt-common 1.17.2 → 1.18.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/dist/module.json +1 -1
- package/dist/module.mjs +2 -2
- package/dist/runtime/api/index.d.ts +6 -6
- package/dist/runtime/api/index.mjs +2 -2
- package/dist/runtime/api/user-actions.d.ts +2 -2
- package/dist/runtime/api/user-actions.mjs +2 -2
- package/dist/runtime/composables/use-active-sessions.d.ts +1 -1
- package/dist/runtime/composables/use-active-sessions.mjs +1 -1
- package/dist/runtime/composables/use-app-locale.d.ts +1 -1
- package/dist/runtime/composables/use-app-locale.mjs +1 -1
- package/dist/runtime/composables/use-device.d.ts +1 -1
- package/dist/runtime/composables/use-helpers.d.ts +2 -2
- package/dist/runtime/composables/use-helpers.mjs +1 -1
- package/dist/runtime/composables/use-subscribe.d.ts +1 -1
- package/dist/runtime/composables/use-subscribe.mjs +1 -1
- package/dist/runtime/composables/use-theme-mode.d.ts +1 -1
- package/dist/runtime/composables/use-theme-mode.mjs +1 -1
- package/dist/runtime/composables/use-user.d.ts +1 -1
- package/dist/runtime/composables/use-user.mjs +1 -1
- package/dist/runtime/packages/{api → core}/package.json +2 -2
- package/dist/runtime/plugin.mjs +2 -2
- package/dist/runtime/plugins/device.d.ts +11 -11
- package/dist/runtime/plugins/device.mjs +1 -1
- package/package.json +1 -1
- /package/dist/runtime/packages/{api → core}/AppProvider.vue +0 -0
- /package/dist/runtime/packages/{api → core}/api-client.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/api-client.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/bus.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/bus.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/comet-client.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/comet-client.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/composables/use-active-sessions.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/composables/use-active-sessions.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/composables/use-api-actions.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/composables/use-api-actions.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/composables/use-app-locale.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/composables/use-app-locale.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/composables/use-subscribe.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/composables/use-subscribe.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/composables/use-theme-mode.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/composables/use-theme-mode.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/composables/use-user.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/composables/use-user.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/get-user.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/get-user.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/get-visitor.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/get-visitor.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/helpers/api-helper.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/helpers/api-helper.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/helpers/current-device.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/helpers/current-device.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/helpers/date-helper.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/helpers/date-helper.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/helpers/device-helper.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/helpers/device-helper.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/helpers/index.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/helpers/index.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/index.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/index.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/init-application.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/init-application.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/refresh-token.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/refresh-token.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/types.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/types.mjs +0 -0
- /package/dist/runtime/packages/{api → core}/user-actions.d.ts +0 -0
- /package/dist/runtime/packages/{api → core}/user-actions.mjs +0 -0
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
2
2
|
import { defineNuxtModule, createResolver, addServerHandler, addImportsDir, addPlugin, addComponent } from '@nuxt/kit';
|
|
3
3
|
|
|
4
4
|
const name = "@inzombieland/nuxt-common";
|
|
5
|
-
const version = "1.
|
|
5
|
+
const version = "1.18.0";
|
|
6
6
|
|
|
7
7
|
const module = defineNuxtModule({
|
|
8
8
|
meta: {
|
|
@@ -54,7 +54,7 @@ const module = defineNuxtModule({
|
|
|
54
54
|
addPlugin(resolve(runtimeDir, "plugins/sanitize-url"));
|
|
55
55
|
addComponent({
|
|
56
56
|
name: "NuxtAppProvider",
|
|
57
|
-
filePath: resolve(runtimeDir, "packages/
|
|
57
|
+
filePath: resolve(runtimeDir, "packages/core/AppProvider.vue")
|
|
58
58
|
});
|
|
59
59
|
addComponent({
|
|
60
60
|
name: "NuxtLayerManager",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type Fetch } from "../packages/
|
|
2
|
-
export { type ActiveSession, type Fetch, type User, type Visitor } from "../packages/
|
|
3
|
-
export { getVisitor, getVisitorId, useUser } from "../packages/
|
|
1
|
+
import { type Fetch } from "../packages/core";
|
|
2
|
+
export { type ActiveSession, type Fetch, type User, type Visitor } from "../packages/core";
|
|
3
|
+
export { getVisitor, getVisitorId, useUser } from "../packages/core";
|
|
4
4
|
export declare const config: {
|
|
5
5
|
apiBaseURL: any;
|
|
6
6
|
cometServerURL: any;
|
|
@@ -18,17 +18,17 @@ export declare const config: {
|
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
declare const fetch: Fetch, getUser: () => Promise<import("src/runtime/packages/
|
|
21
|
+
declare const fetch: Fetch, getUser: () => Promise<import("src/runtime/packages/core/types").GetUserResponse>, useApiFetch: () => Fetch, userActions: {
|
|
22
22
|
signIn: (body: {
|
|
23
23
|
username: string;
|
|
24
24
|
password: string;
|
|
25
25
|
rememberMe: boolean;
|
|
26
|
-
}) => Promise<import("src/runtime/packages/
|
|
26
|
+
}) => Promise<import("src/runtime/packages/core/types").GetUserResponse | {
|
|
27
27
|
key: string;
|
|
28
28
|
}>;
|
|
29
29
|
logout: () => Promise<void>;
|
|
30
30
|
fetchActiveSessions: () => Promise<{
|
|
31
|
-
sessions: import("src/runtime/packages/
|
|
31
|
+
sessions: import("src/runtime/packages/core/types").ActiveSession[];
|
|
32
32
|
}>;
|
|
33
33
|
};
|
|
34
34
|
export { fetch, getUser, useApiFetch, userActions };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useRequestHeaders, useRequestURL } from "#imports";
|
|
2
2
|
import { useDevice } from "../composables/use-device.mjs";
|
|
3
|
-
import { initApiFetch } from "../packages/
|
|
4
|
-
export { getVisitor, getVisitorId, useUser } from "../packages/
|
|
3
|
+
import { initApiFetch } from "../packages/core/index.mjs";
|
|
4
|
+
export { getVisitor, getVisitorId, useUser } from "../packages/core/index.mjs";
|
|
5
5
|
export const config = {
|
|
6
6
|
apiBaseURL: import.meta.env.VITE_API_BASE_URL,
|
|
7
7
|
cometServerURL: import.meta.env.VITE_COMET_SERVER_URL,
|
|
@@ -3,7 +3,7 @@ export declare const signIn: (body: {
|
|
|
3
3
|
username: string;
|
|
4
4
|
password: string;
|
|
5
5
|
rememberMe: boolean;
|
|
6
|
-
}) => Promise<import("src/runtime/packages/
|
|
6
|
+
}) => Promise<import("src/runtime/packages/core/types").GetUserResponse | {
|
|
7
7
|
key: string;
|
|
8
8
|
}>;
|
|
9
9
|
export declare const logout: () => Promise<void>;
|
|
@@ -16,7 +16,7 @@ export declare const signInByCodeVerifyCode: (body: {
|
|
|
16
16
|
key: string;
|
|
17
17
|
code: string;
|
|
18
18
|
rememberMe?: boolean;
|
|
19
|
-
}) => Promise<import("src/runtime/packages/
|
|
19
|
+
}) => Promise<import("src/runtime/packages/core/types").GetUserResponse>;
|
|
20
20
|
export declare const signUp: (body: {
|
|
21
21
|
email: string;
|
|
22
22
|
password: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCookie, useRequestHeaders } from "#imports";
|
|
2
|
-
import { useAppLocale, useThemeMode } from "../packages/
|
|
3
|
-
import { flush, setToken, updateUser } from "../packages/
|
|
2
|
+
import { useAppLocale, useThemeMode } from "../packages/core/index.mjs";
|
|
3
|
+
import { flush, setToken, updateUser } from "../packages/core/api-client.mjs";
|
|
4
4
|
import { fetch, getUser, userActions, useUser } from "./index.mjs";
|
|
5
5
|
export const signIn = userActions.signIn;
|
|
6
6
|
export const logout = userActions.logout;
|
|
@@ -2,8 +2,8 @@ import { once } from "../packages/helpers";
|
|
|
2
2
|
export declare const useHelpers: () => {
|
|
3
3
|
once: typeof once;
|
|
4
4
|
dateHelper: {
|
|
5
|
-
stringToDate: typeof import("src/runtime/packages/
|
|
6
|
-
dateFormat: typeof import("src/runtime/packages/
|
|
5
|
+
stringToDate: typeof import("src/runtime/packages/core/helpers/date-helper").stringToDate;
|
|
6
|
+
dateFormat: typeof import("src/runtime/packages/core/helpers/date-helper").dateFormat;
|
|
7
7
|
};
|
|
8
8
|
phoneHelper: {
|
|
9
9
|
getPlainPhoneNumber: typeof import("src/runtime/packages/helpers/phone-helper").getPlainPhoneNumber;
|
package/dist/runtime/plugin.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import { useNuxtApp, useRequestHeaders, useRuntimeConfig, useState } from "#impo
|
|
|
3
3
|
import { watch } from "vue";
|
|
4
4
|
import { fetch, getUser } from "./api/index.mjs";
|
|
5
5
|
import { authMiddleware, guestMiddleware, localeMiddleware } from "./middleware/index.mjs";
|
|
6
|
-
import { useThemeMode } from "./packages/
|
|
7
|
-
import { flush, setToken, setUser } from "./packages/
|
|
6
|
+
import { useThemeMode } from "./packages/core/index.mjs";
|
|
7
|
+
import { flush, setToken, setUser } from "./packages/core/api-client.mjs";
|
|
8
8
|
const useAuth = () => {
|
|
9
9
|
return useState("auth", () => null);
|
|
10
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { deviceHelper } from "../packages/
|
|
1
|
+
import { deviceHelper } from "../packages/core/helpers";
|
|
2
2
|
declare const _default: import("#app").Plugin<{
|
|
3
3
|
device: {
|
|
4
4
|
getInfo: () => Promise<string>;
|
|
@@ -33,11 +33,11 @@ declare const _default: import("#app").Plugin<{
|
|
|
33
33
|
androidTabletApp: () => boolean;
|
|
34
34
|
landscape: () => boolean;
|
|
35
35
|
portrait: () => boolean;
|
|
36
|
-
onChangeOrientation: (cb: (newOrientation: import("src/runtime/packages/
|
|
37
|
-
noConflict: (currentDevice: import("src/runtime/packages/
|
|
38
|
-
type: import("src/runtime/packages/
|
|
39
|
-
orientation: import("src/runtime/packages/
|
|
40
|
-
os: import("src/runtime/packages/
|
|
36
|
+
onChangeOrientation: (cb: (newOrientation: import("src/runtime/packages/core/helpers/device-helper").DeviceOrientation) => void) => void;
|
|
37
|
+
noConflict: (currentDevice: import("src/runtime/packages/core/helpers/device-helper").Device) => void;
|
|
38
|
+
type: import("src/runtime/packages/core/helpers/device-helper").DeviceType;
|
|
39
|
+
orientation: import("src/runtime/packages/core/helpers/device-helper").DeviceOrientation;
|
|
40
|
+
os: import("src/runtime/packages/core/helpers/device-helper").DeviceOs;
|
|
41
41
|
osName: () => string;
|
|
42
42
|
};
|
|
43
43
|
}> & import("#app").ObjectPlugin<{
|
|
@@ -74,11 +74,11 @@ declare const _default: import("#app").Plugin<{
|
|
|
74
74
|
androidTabletApp: () => boolean;
|
|
75
75
|
landscape: () => boolean;
|
|
76
76
|
portrait: () => boolean;
|
|
77
|
-
onChangeOrientation: (cb: (newOrientation: import("src/runtime/packages/
|
|
78
|
-
noConflict: (currentDevice: import("src/runtime/packages/
|
|
79
|
-
type: import("src/runtime/packages/
|
|
80
|
-
orientation: import("src/runtime/packages/
|
|
81
|
-
os: import("src/runtime/packages/
|
|
77
|
+
onChangeOrientation: (cb: (newOrientation: import("src/runtime/packages/core/helpers/device-helper").DeviceOrientation) => void) => void;
|
|
78
|
+
noConflict: (currentDevice: import("src/runtime/packages/core/helpers/device-helper").Device) => void;
|
|
79
|
+
type: import("src/runtime/packages/core/helpers/device-helper").DeviceType;
|
|
80
|
+
orientation: import("src/runtime/packages/core/helpers/device-helper").DeviceOrientation;
|
|
81
|
+
os: import("src/runtime/packages/core/helpers/device-helper").DeviceOs;
|
|
82
82
|
osName: () => string;
|
|
83
83
|
};
|
|
84
84
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineNuxtPlugin } from "#app";
|
|
2
2
|
import { useNuxtApp } from "#imports";
|
|
3
|
-
import { deviceHelper } from "../packages/
|
|
3
|
+
import { deviceHelper } from "../packages/core/helpers/index.mjs";
|
|
4
4
|
export default defineNuxtPlugin(() => {
|
|
5
5
|
const device = deviceHelper();
|
|
6
6
|
return {
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|