@arex95/vue-core 1.0.9 → 1.1.4
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/README.md +44 -1
- package/dist/composables/auth/useAuth.d.ts +13 -16
- package/dist/config/axios/axiosInstance.d.ts +1 -1
- package/dist/config/global/endpointsConfig.d.ts +14 -17
- package/dist/config/global/sessionConfig.d.ts +27 -0
- package/dist/config/global/tokenConfig.d.ts +20 -16
- package/dist/index.mjs +39 -31
- package/dist/types/AuthConfig.d.ts +5 -0
- package/dist/types/EndpointsConfig.d.ts +5 -0
- package/dist/types/SessionConfig.d.ts +3 -0
- package/dist/types/TokenConfig.d.ts +4 -0
- package/dist/types/index.d.ts +4 -0
- package/package.json +17 -7
package/README.md
CHANGED
|
@@ -4,7 +4,50 @@ Opinionated Vue Core
|
|
|
4
4
|
|
|
5
5
|
## Descripción
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Conjunto de composables y utilidades para Vue.js, diseñado para facilitar el desarrollo de aplicaciones Vue. Proporciona herramientas para manejar peticiones HTTP con Axios. Además, incluye wrappers para TanStack Vue Query, que simplifican la gestión de estados de datos asíncronos, y una implementación estándar para interactuar con APIs RESTful, facilitando la creación, lectura, actualización y eliminación de recursos.
|
|
8
|
+
|
|
9
|
+
## Arquitectura Modular Basada en Servicios
|
|
10
|
+
|
|
11
|
+
Esta arquitectura está diseñada para seguir principios sólidos de `separación de responsabilidades` y `modularidad`, implementando una estructura en la que `los servicios gestionan la lógica de negocio` relacionada con la interacción con APIs, mientras que `las vistas se encargan exclusivamente de la presentación`.
|
|
12
|
+
|
|
13
|
+
## Concepto General de la Arquitectura
|
|
14
|
+
|
|
15
|
+
1. **Separación de Responsabilidades**:
|
|
16
|
+
En este diseño, las vistas no tienen que ocuparse de la lógica de obtención o mutación de datos. Esta responsabilidad está delegada a los **servicios**, que gestionan todo el proceso de interactuar con las APIs, realizar solicitudes HTTP y manipular los modelos. Las vistas simplemente se encargan de la **presentación de los datos** y de gestionar las interacciones del usuario, como capturar eventos o mostrar resultados.
|
|
17
|
+
|
|
18
|
+
- `Vistas`: Su tarea principal es mostrar los datos que obtienen de los servicios. Se centran en la parte visual y en las interacciones de usuario.
|
|
19
|
+
- `Servicios`: Son responsables de gestionar cómo y desde dónde se obtienen los datos. Aquí es donde se realiza toda la lógica de acceso a las APIs, manejo de respuestas y errores, y mutación de modelos.
|
|
20
|
+
|
|
21
|
+
Este enfoque reduce la complejidad de las vistas, las cuales permanecen limpias y fáciles de entender. Cualquier cambio en la forma de hacer las solicitudes (como cambiar la estructura de la API o el cliente HTTP) no requiere modificaciones en las vistas, lo que mejora la mantenibilidad.
|
|
22
|
+
|
|
23
|
+
2. **Desacoplamiento de la Lógica de la API**:
|
|
24
|
+
|
|
25
|
+
Los servicios encapsulan completamente la lógica de interacción con las APIs. Las vistas no necesitan saber nada sobre cómo se hace la solicitud a la API o cómo se gestionan las respuestas. Este desacoplamiento permite que las vistas sean **más limpias** y **menos propensas a errores**, ya que no necesitan manejar la lógica de negocio ni los detalles de las peticiones HTTP. Si en el futuro la forma de interactuar con la API cambia (por ejemplo, si se cambia el cliente HTTP o se agrega un middleware), solo será necesario modificar los servicios, no las vistas.
|
|
26
|
+
|
|
27
|
+
Este enfoque también permite que los servicios sean **reutilizables** en diferentes partes de la aplicación. Por ejemplo, si varias vistas necesitan autenticar al usuario, todas pueden utilizar el servicio `AuthService`, sin necesidad de duplicar la lógica de autenticación.
|
|
28
|
+
|
|
29
|
+
3. **Reusabilidad y Modularidad**:
|
|
30
|
+
|
|
31
|
+
Al centralizar la lógica de negocio en servicios, estos pueden ser fácilmente **reutilizados** en diferentes vistas y componentes de la aplicación. Cada servicio está diseñado para encargarse de una única funcionalidad o módulo del sistema, como la autenticación, gestión de productos, gestión de categorías, etc. Este enfoque modular hace que la aplicación sea **más fácil de escalar**.
|
|
32
|
+
|
|
33
|
+
Además, la modularidad permite que cada servicio evolucione y cambie de forma independiente sin afectar a otros módulos o partes de la aplicación. Si un nuevo servicio debe ser agregado, como uno para manejar un módulo adicional (por ejemplo, pagos o notificaciones), se puede hacer sin interrumpir el flujo de trabajo de los demás servicios.
|
|
34
|
+
|
|
35
|
+
4. **Mejora en la Escalabilidad**:
|
|
36
|
+
|
|
37
|
+
Esta arquitectura facilita la escalabilidad, ya que cualquier servicio puede ser **ampliado o modificado de forma independiente** sin necesidad de reestructurar la aplicación completa. Por ejemplo, si el servicio de productos necesita cambios en la lógica de consulta, esto no afectará al servicio de autenticación o a las vistas que consumen esos servicios. Esta flexibilidad es crucial cuando el sistema crece y se añaden nuevas funcionalidades.
|
|
38
|
+
|
|
39
|
+
5. **Facilidad de Pruebas Unitarias**:
|
|
40
|
+
|
|
41
|
+
Al estar los servicios desacoplados de las vistas, es mucho más fácil realizar **pruebas unitarias** de cada servicio de manera aislada. Las vistas no necesitan ser simuladas ni involucradas en las pruebas de negocio, lo que facilita la escritura de pruebas unitarias puras para la lógica de las APIs y el manejo de los datos.
|
|
42
|
+
|
|
43
|
+
Por ejemplo, el servicio `AuthService` puede probarse por separado para verificar si maneja correctamente el proceso de inicio de sesión o si responde correctamente a los errores de autenticación, sin necesidad de preocuparse por el diseño de las vistas o la interacción con el usuario.
|
|
44
|
+
|
|
45
|
+
6. **Mantenimiento Sostenible**:
|
|
46
|
+
|
|
47
|
+
En un proyecto grande o en evolución, esta arquitectura facilita el mantenimiento del código. Si hay un error relacionado con la autenticación, se puede solucionar directamente en el servicio `AuthService`, sin tener que revisar todas las vistas que consumen este servicio. Esto hace que el código sea más fácil de entender y más fácil de depurar.
|
|
48
|
+
|
|
49
|
+
Además, si es necesario cambiar la lógica de la API (como cambiar el formato de las respuestas), solo es necesario modificar los servicios afectados. Las vistas seguirán funcionando de la misma manera, ya que están desacopladas de esta lógica.
|
|
50
|
+
|
|
8
51
|
|
|
9
52
|
## Estructura del Proyecto
|
|
10
53
|
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
+
import { AuthConfig } from "@/types";
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
3
|
+
* Configures authentication settings globally.
|
|
4
|
+
* Allows modifying default endpoints and storage keys.
|
|
4
5
|
*
|
|
5
|
-
* @param {Object} options -
|
|
6
|
-
* @param {Object} options.endpoints -
|
|
7
|
-
* @param {Object} options.storageKeys -
|
|
6
|
+
* @param {Object} options - Custom configuration options.
|
|
7
|
+
* @param {Object} [options.endpoints] - Custom endpoints for login, refresh, and logout.
|
|
8
|
+
* @param {Object} [options.storageKeys] - Custom storage keys for tokens.
|
|
9
|
+
*/
|
|
10
|
+
export declare function configureAuth(options: AuthConfig): void;
|
|
11
|
+
/**
|
|
12
|
+
* Provides authentication utilities.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} [secretKey=getSecretKey()] - Encryption key.
|
|
15
|
+
* @returns {Object} Auth composable methods and properties.
|
|
8
16
|
*/
|
|
9
|
-
export declare function configureAuth(options: {
|
|
10
|
-
endpoints?: {
|
|
11
|
-
login?: string;
|
|
12
|
-
refresh?: string;
|
|
13
|
-
logout?: string;
|
|
14
|
-
};
|
|
15
|
-
storageKeys?: {
|
|
16
|
-
token?: string;
|
|
17
|
-
refreshToken?: string;
|
|
18
|
-
};
|
|
19
|
-
}): void;
|
|
20
17
|
export declare function useAuth(secretKey?: string): {
|
|
21
18
|
jwt: import("vue").ComputedRef<string | null>;
|
|
22
19
|
refresh_token: import("vue").ComputedRef<string | null>;
|
|
@@ -3,7 +3,7 @@ import { AxiosInstance } from 'axios';
|
|
|
3
3
|
* Configures the global Axios instance with a base URL.
|
|
4
4
|
* @param {string} baseURL - The base URL for the Axios instance.
|
|
5
5
|
*/
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const configAxios: (baseURL: string) => void;
|
|
7
7
|
/**
|
|
8
8
|
* Retrieves the configured Axios instance.
|
|
9
9
|
* @returns {AxiosService} The configured Axios instance.
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
+
import { EndpointsConfig } from "@/types";
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
3
|
+
* Configures authentication endpoint URLs globally.
|
|
4
|
+
* This function freezes the object to prevent further modifications.
|
|
4
5
|
*
|
|
5
|
-
* @param {string} loginEndpoint - URL
|
|
6
|
-
* @param {string} refreshEndpoint - URL
|
|
7
|
-
* @param {string} logoutEndpoint - URL
|
|
6
|
+
* @param {string} loginEndpoint - URL of the login endpoint.
|
|
7
|
+
* @param {string} refreshEndpoint - URL of the refresh token endpoint.
|
|
8
|
+
* @param {string} logoutEndpoint - URL of the logout endpoint.
|
|
8
9
|
*
|
|
9
|
-
* @returns {void}
|
|
10
|
+
* @returns {void} Does not return anything but freezes the endpoint configuration object.
|
|
10
11
|
*/
|
|
11
|
-
export declare function
|
|
12
|
+
export declare function configEndpoints(loginEndpoint: string, refreshEndpoint: string, logoutEndpoint: string): void;
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
+
* Retrieves the configured authentication endpoint URLs.
|
|
14
15
|
*
|
|
15
|
-
* @returns {
|
|
16
|
-
* @
|
|
17
|
-
* @
|
|
18
|
-
* @
|
|
16
|
+
* @returns {EndpointsConfig} An object containing the configured authentication endpoints.
|
|
17
|
+
* @property {string} LOGIN - URL of the login endpoint.
|
|
18
|
+
* @property {string} REFRESH - URL of the refresh token endpoint.
|
|
19
|
+
* @property {string} LOGOUT - URL of the logout endpoint.
|
|
19
20
|
*/
|
|
20
|
-
export declare function getEndpointsConfig():
|
|
21
|
-
LOGIN: string;
|
|
22
|
-
REFRESH: string;
|
|
23
|
-
LOGOUT: string;
|
|
24
|
-
};
|
|
21
|
+
export declare function getEndpointsConfig(): EndpointsConfig;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configures the session identifier for the active browser session.
|
|
3
|
+
* Once configured, it cannot be modified.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} sessionIdParam - The unique session identifier.
|
|
6
|
+
*
|
|
7
|
+
* @returns {void} Does not return anything, but freezes the session configuration.
|
|
8
|
+
*/
|
|
9
|
+
export declare function configSession(sessionIdParam: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves the current session identifier configuration.
|
|
12
|
+
*
|
|
13
|
+
* @returns {string} The unique session identifier.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getSessionConfig(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Generates a new UUID for the current session.
|
|
18
|
+
*
|
|
19
|
+
* @returns {void} Does not return anything, but updates the session identifier.
|
|
20
|
+
*/
|
|
21
|
+
export declare function regenerateSessionId(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves the current session identifier.
|
|
24
|
+
*
|
|
25
|
+
* @returns {string} The unique session identifier.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getSessionId(): string;
|
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
readonly ACCESS_TOKEN: string;
|
|
3
|
-
readonly REFRESH_TOKEN: string;
|
|
4
|
-
}
|
|
1
|
+
import { TokenConfig } from "@/types";
|
|
5
2
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* @param
|
|
3
|
+
* Configures the global keys for access and refresh tokens.
|
|
4
|
+
* Once set, they cannot be modified.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} accessTokenKey - The name of the access token key.
|
|
7
|
+
* @param {string} refreshTokenKey - The name of the refresh token key.
|
|
8
|
+
*
|
|
9
|
+
* @returns {void} Does not return anything but freezes the token configuration object.
|
|
10
10
|
*/
|
|
11
|
-
export declare function
|
|
11
|
+
export declare function configTokens(accessTokenKey: string, refreshTokenKey: string): void;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* Retrieves the current token configuration.
|
|
14
|
+
*
|
|
15
|
+
* @returns {TokenConfig} The configuration of the access and refresh token keys.
|
|
15
16
|
*/
|
|
16
17
|
export declare function getTokenConfig(): TokenConfig;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
19
|
+
* Sets the secret key for use in authentication.
|
|
20
|
+
*
|
|
21
|
+
* @param {string} key - The new secret key.
|
|
22
|
+
*
|
|
23
|
+
* @returns {void} Does not return anything, but updates the secret key.
|
|
20
24
|
*/
|
|
21
25
|
export declare function setSecretKey(key: string): void;
|
|
22
26
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
27
|
+
* Retrieves the current secret key.
|
|
28
|
+
*
|
|
29
|
+
* @returns {string} The configured secret key.
|
|
25
30
|
*/
|
|
26
31
|
export declare function getSecretKey(): string;
|
|
27
|
-
export {};
|
package/dist/index.mjs
CHANGED
|
@@ -2384,61 +2384,69 @@ function inferErrorType(error) {
|
|
|
2384
2384
|
return 'error';
|
|
2385
2385
|
}
|
|
2386
2386
|
|
|
2387
|
-
let secretKey =
|
|
2387
|
+
let secretKey = "12345678901234567890123456789012";
|
|
2388
2388
|
let tokenConfig = Object.freeze({
|
|
2389
|
-
ACCESS_TOKEN:
|
|
2390
|
-
REFRESH_TOKEN:
|
|
2389
|
+
ACCESS_TOKEN: "authToken",
|
|
2390
|
+
REFRESH_TOKEN: "refreshToken",
|
|
2391
2391
|
});
|
|
2392
2392
|
/**
|
|
2393
|
-
*
|
|
2394
|
-
*
|
|
2395
|
-
*
|
|
2396
|
-
* @param
|
|
2393
|
+
* Configures the global keys for access and refresh tokens.
|
|
2394
|
+
* Once set, they cannot be modified.
|
|
2395
|
+
*
|
|
2396
|
+
* @param {string} accessTokenKey - The name of the access token key.
|
|
2397
|
+
* @param {string} refreshTokenKey - The name of the refresh token key.
|
|
2398
|
+
*
|
|
2399
|
+
* @returns {void} Does not return anything but freezes the token configuration object.
|
|
2397
2400
|
*/
|
|
2398
|
-
function
|
|
2401
|
+
function configTokens(accessTokenKey, refreshTokenKey) {
|
|
2399
2402
|
tokenConfig = Object.freeze({
|
|
2400
2403
|
ACCESS_TOKEN: accessTokenKey,
|
|
2401
2404
|
REFRESH_TOKEN: refreshTokenKey,
|
|
2402
2405
|
});
|
|
2403
2406
|
}
|
|
2404
2407
|
/**
|
|
2405
|
-
*
|
|
2406
|
-
*
|
|
2408
|
+
* Retrieves the current token configuration.
|
|
2409
|
+
*
|
|
2410
|
+
* @returns {TokenConfig} The configuration of the access and refresh token keys.
|
|
2407
2411
|
*/
|
|
2408
2412
|
function getTokenConfig() {
|
|
2409
2413
|
return tokenConfig;
|
|
2410
2414
|
}
|
|
2411
2415
|
/**
|
|
2412
|
-
*
|
|
2413
|
-
*
|
|
2416
|
+
* Sets the secret key for use in authentication.
|
|
2417
|
+
*
|
|
2418
|
+
* @param {string} key - The new secret key.
|
|
2419
|
+
*
|
|
2420
|
+
* @returns {void} Does not return anything, but updates the secret key.
|
|
2414
2421
|
*/
|
|
2415
2422
|
function setSecretKey(key) {
|
|
2416
2423
|
secretKey = key;
|
|
2417
2424
|
}
|
|
2418
2425
|
/**
|
|
2419
|
-
*
|
|
2420
|
-
*
|
|
2426
|
+
* Retrieves the current secret key.
|
|
2427
|
+
*
|
|
2428
|
+
* @returns {string} The configured secret key.
|
|
2421
2429
|
*/
|
|
2422
2430
|
function getSecretKey() {
|
|
2423
2431
|
return secretKey;
|
|
2424
2432
|
}
|
|
2425
2433
|
|
|
2426
2434
|
let endpointsConfig = {
|
|
2427
|
-
LOGIN:
|
|
2428
|
-
REFRESH:
|
|
2429
|
-
LOGOUT:
|
|
2435
|
+
LOGIN: "/login",
|
|
2436
|
+
REFRESH: "/refresh",
|
|
2437
|
+
LOGOUT: "/logout",
|
|
2430
2438
|
};
|
|
2431
2439
|
/**
|
|
2432
|
-
*
|
|
2433
|
-
*
|
|
2440
|
+
* Configures authentication endpoint URLs globally.
|
|
2441
|
+
* This function freezes the object to prevent further modifications.
|
|
2434
2442
|
*
|
|
2435
|
-
* @param {string} loginEndpoint - URL
|
|
2436
|
-
* @param {string} refreshEndpoint - URL
|
|
2437
|
-
* @param {string} logoutEndpoint - URL
|
|
2443
|
+
* @param {string} loginEndpoint - URL of the login endpoint.
|
|
2444
|
+
* @param {string} refreshEndpoint - URL of the refresh token endpoint.
|
|
2445
|
+
* @param {string} logoutEndpoint - URL of the logout endpoint.
|
|
2438
2446
|
*
|
|
2439
|
-
* @returns {void}
|
|
2447
|
+
* @returns {void} Does not return anything but freezes the endpoint configuration object.
|
|
2440
2448
|
*/
|
|
2441
|
-
function
|
|
2449
|
+
function configEndpoints(loginEndpoint, refreshEndpoint, logoutEndpoint) {
|
|
2442
2450
|
endpointsConfig = Object.freeze({
|
|
2443
2451
|
LOGIN: loginEndpoint,
|
|
2444
2452
|
REFRESH: refreshEndpoint,
|
|
@@ -2446,12 +2454,12 @@ function configureEndpoints(loginEndpoint, refreshEndpoint, logoutEndpoint) {
|
|
|
2446
2454
|
});
|
|
2447
2455
|
}
|
|
2448
2456
|
/**
|
|
2449
|
-
*
|
|
2457
|
+
* Retrieves the configured authentication endpoint URLs.
|
|
2450
2458
|
*
|
|
2451
|
-
* @returns {
|
|
2452
|
-
* @
|
|
2453
|
-
* @
|
|
2454
|
-
* @
|
|
2459
|
+
* @returns {EndpointsConfig} An object containing the configured authentication endpoints.
|
|
2460
|
+
* @property {string} LOGIN - URL of the login endpoint.
|
|
2461
|
+
* @property {string} REFRESH - URL of the refresh token endpoint.
|
|
2462
|
+
* @property {string} LOGOUT - URL of the logout endpoint.
|
|
2455
2463
|
*/
|
|
2456
2464
|
function getEndpointsConfig() {
|
|
2457
2465
|
return endpointsConfig;
|
|
@@ -2588,7 +2596,7 @@ let axiosInstance;
|
|
|
2588
2596
|
* Configures the global Axios instance with a base URL.
|
|
2589
2597
|
* @param {string} baseURL - The base URL for the Axios instance.
|
|
2590
2598
|
*/
|
|
2591
|
-
const
|
|
2599
|
+
const configAxios = (baseURL) => {
|
|
2592
2600
|
axiosInstance = new AxiosService(baseURL);
|
|
2593
2601
|
};
|
|
2594
2602
|
/**
|
|
@@ -2979,4 +2987,4 @@ function useSorter(items, criteriaList, selectedCriteria) {
|
|
|
2979
2987
|
}).value;
|
|
2980
2988
|
}
|
|
2981
2989
|
|
|
2982
|
-
export { AppTypes, ArchiveTypes, AudioTypes, AxiosService, ContentTypeEnum, DocumentTypes, ERROR_MESSAGES, ERROR_STYLES, ErrorEnum, ErrorMessages, ErrorStyles, ExceptionEnum, FontTypes, ImageTypes, KeyCodeEnum, OtherTypes, RestStd, ScreenBreakpoint, ScreenSize, StorageKeyEnum, StorageTypeEnum, TextTypes, VideoTypes, addCustomKeyboardShortcut, addDays, addDoubleClickListener, addKeyListener, ageAtDate, axiosFetch, blobToFormData, bufferToBlob, calculateAge, clickOutside, compareObject,
|
|
2990
|
+
export { AppTypes, ArchiveTypes, AudioTypes, AxiosService, ContentTypeEnum, DocumentTypes, ERROR_MESSAGES, ERROR_STYLES, ErrorEnum, ErrorMessages, ErrorStyles, ExceptionEnum, FontTypes, ImageTypes, KeyCodeEnum, OtherTypes, RestStd, ScreenBreakpoint, ScreenSize, StorageKeyEnum, StorageTypeEnum, TextTypes, VideoTypes, addCustomKeyboardShortcut, addDays, addDoubleClickListener, addKeyListener, ageAtDate, axiosFetch, blobToFormData, bufferToBlob, calculateAge, clickOutside, compareObject, configAxios, configEndpoints, configTokens, copyToClipboard, countWords, createCustomAxiosInstance, createFetch, createKeyMap, customShortcut, daysBetween, daysToNextBirthday, debounce, debounceAsync, debounceAsyncValidator, debounceAsyncWithImmediate, debounceLeading, debounceLeadingTrailing, debounceTrailing, deepClone, deepEqual, deepMerge, detectKeyHold, disableCopy, disableF12Key, disableMouseButtons, disableRightClick, disableSpecificKeys, downloadBlob, enableMouseButtons, enableRightClick, enableSpecificKeys, exportToCSV, exportToExcel, exportToJSON, exportToText, exportToXML, filterObjectByKeys, flattenObject, formDataToObject, formatDate, generateRandomString, getAxiosInstance, getEndOfMonth, getEndpointsConfig, getObjectDifferences, getObjectKeys, getQueryParam, getSecretKey, getStartOfMonth, getTokenConfig, hasNestedProperties, isEmptyObject, isLeapYear, isStrongPassword, isValidAge, isValidCreditCard, isValidDate, isValidEmail, isValidExpiryDate, isValidHexColor, isValidHexColorAlpha, isValidHexNumber, isValidIP, isValidPhoneNumber, isValidSSN, isValidTime, isValidURL, isValidUsername, isValidZIP, lowerFirst, objectToFormData, objectToFormDataEnhanced, objectToQueryString, openWindow, parseDate, proxyToPlainObject, readFileAsDataURL, readFileAsText, registerKeyboardShortcuts, removeAccent, removeClickOutside, removeCustomKeyboardShortcut, removeCustomShortcuts, removeDoubleClickListener, removeEmptyProperties, removeKeyListeners, replaceAll, reverseString, safeGet, screenMap, scrollToTop, setSecretKey, simulateKeyPress, stopDetectingKeyHold, stringToBlob, subtractDays, throttle, toCamelCase, toKebabCase, toggleTabNavigation, truncateString, unregisterKeyboardShortcuts, upperFirst, useBreakpoint, useFilter, usePagination, useSorter, useVueQuery, validateAlphanumeric, validateLetters, validateNumbers };
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arex95/vue-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Opinionated Vue Core",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
"dist"
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
|
-
"build": "rollup -c"
|
|
16
|
+
"build": "rollup -c",
|
|
17
|
+
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
|
18
|
+
"release": "npm version patch && npm run changelog && git add CHANGELOG.md package.json package-lock.json && git commit -m \"chore(release): update changelog\" && git push && npm publish --access public"
|
|
17
19
|
},
|
|
18
20
|
"repository": {
|
|
19
21
|
"type": "git",
|
|
@@ -31,28 +33,36 @@
|
|
|
31
33
|
"@tanstack/vue-query": ">=5.0.0",
|
|
32
34
|
"@vueuse/core": ">=12.8.2",
|
|
33
35
|
"axios": ">=1.6.0",
|
|
36
|
+
"uuid": ">=11.1.0",
|
|
34
37
|
"vue": ">=3.0.0",
|
|
35
38
|
"vue-router": ">=4.5.0"
|
|
36
39
|
},
|
|
37
40
|
"devDependencies": {
|
|
41
|
+
"@eslint/js": "^9.23.0",
|
|
38
42
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
39
43
|
"@rollup/plugin-json": "^6.1.0",
|
|
40
44
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
41
45
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
42
46
|
"@types/crypto-js": "^4.2.2",
|
|
43
47
|
"@types/node": "^22.13.10",
|
|
48
|
+
"conventional-changelog-cli": "^5.0.0",
|
|
49
|
+
"eslint": "^9.23.0",
|
|
50
|
+
"eslint-plugin-vue": "^10.0.0",
|
|
51
|
+
"globals": "^16.0.0",
|
|
44
52
|
"rollup": "^4.35.0",
|
|
45
53
|
"ts-node": "^10.9.2",
|
|
46
54
|
"tslib": "^2.8.1",
|
|
47
|
-
"typescript": "^5.8.2"
|
|
55
|
+
"typescript": "^5.8.2",
|
|
56
|
+
"typescript-eslint": "^8.28.0"
|
|
48
57
|
},
|
|
49
58
|
"dependencies": {
|
|
50
|
-
"crypto-js": "^4.2.0",
|
|
51
|
-
"jwt-decode": "^4.0.0",
|
|
52
|
-
"vue-router": ">=4.5.0",
|
|
53
59
|
"@tanstack/vue-query": ">=5.0.0",
|
|
54
60
|
"@vueuse/core": ">=12.8.2",
|
|
55
61
|
"axios": ">=1.6.0",
|
|
56
|
-
"
|
|
62
|
+
"crypto-js": "^4.2.0",
|
|
63
|
+
"jwt-decode": "^4.0.0",
|
|
64
|
+
"uuid": ">=11.1.0",
|
|
65
|
+
"vue": ">=3.0.0",
|
|
66
|
+
"vue-router": ">=4.5.0"
|
|
57
67
|
}
|
|
58
68
|
}
|