@arex95/vue-core 1.1.12 → 1.1.13
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/index.mjs +5 -5
- package/package.json +68 -70
package/dist/index.mjs
CHANGED
|
@@ -2593,13 +2593,13 @@ class AxiosService {
|
|
|
2593
2593
|
}
|
|
2594
2594
|
}
|
|
2595
2595
|
|
|
2596
|
-
let axiosInstance
|
|
2596
|
+
let axiosInstance;
|
|
2597
2597
|
/**
|
|
2598
2598
|
* Configures the global Axios instance with a base URL.
|
|
2599
2599
|
* @param {string} baseURL - The base URL for the Axios instance.
|
|
2600
2600
|
*/
|
|
2601
2601
|
const configAxios = (baseURL) => {
|
|
2602
|
-
axiosInstance
|
|
2602
|
+
axiosInstance = new AxiosService(baseURL);
|
|
2603
2603
|
};
|
|
2604
2604
|
/**
|
|
2605
2605
|
* Retrieves the configured Axios instance.
|
|
@@ -2607,10 +2607,10 @@ const configAxios = (baseURL) => {
|
|
|
2607
2607
|
* @throws Will throw an error if the Axios instance is not configured.
|
|
2608
2608
|
*/
|
|
2609
2609
|
const getAxiosInstance = () => {
|
|
2610
|
-
if (!axiosInstance
|
|
2610
|
+
if (!axiosInstance) {
|
|
2611
2611
|
throw new Error('Axios instance not configured. Call configureAxios first.');
|
|
2612
2612
|
}
|
|
2613
|
-
return axiosInstance
|
|
2613
|
+
return axiosInstance.getAxiosInstance();
|
|
2614
2614
|
};
|
|
2615
2615
|
/**
|
|
2616
2616
|
* Creates a new AxiosService instance with custom headers.
|
|
@@ -2989,7 +2989,6 @@ function useSorter(items, criteriaList, selectedCriteria) {
|
|
|
2989
2989
|
}).value;
|
|
2990
2990
|
}
|
|
2991
2991
|
|
|
2992
|
-
const axiosInstance = getAxiosInstance();
|
|
2993
2992
|
const tokensConfig = getTokenConfig();
|
|
2994
2993
|
const endpointsConfig = getEndpointsConfig();
|
|
2995
2994
|
const config = {
|
|
@@ -3120,6 +3119,7 @@ async function getDecryptedValue(key, secretKey, isRememberMe) {
|
|
|
3120
3119
|
* @returns {Object} Auth composable methods and properties.
|
|
3121
3120
|
*/
|
|
3122
3121
|
function useAuth(secretKey = getSecretKey()) {
|
|
3122
|
+
const axiosInstance = getAxiosInstance();
|
|
3123
3123
|
const jwt = computedAsync(async () => await getDecryptedValue(config.storageKeys.ACCESS_TOKEN, secretKey), null);
|
|
3124
3124
|
const refresh_token = computedAsync(async () => await getDecryptedValue(config.storageKeys.REFRESH_TOKEN, secretKey), null);
|
|
3125
3125
|
/**
|
package/package.json
CHANGED
|
@@ -1,70 +1,68 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@arex95/vue-core",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Opinionated Vue Core",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"exports": {
|
|
8
|
-
"import": "./dist/index.mjs"
|
|
9
|
-
},
|
|
10
|
-
"types": "dist/index.d.ts",
|
|
11
|
-
"type": "module",
|
|
12
|
-
"files": [
|
|
13
|
-
"dist"
|
|
14
|
-
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "rollup -c",
|
|
17
|
-
"changelog": "conventional-changelog -p angular -o CHANGELOG.md -r 0",
|
|
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"
|
|
19
|
-
},
|
|
20
|
-
"repository": {
|
|
21
|
-
"type": "git",
|
|
22
|
-
"url": "https://github.com/Arex95/npm-arex-core.git"
|
|
23
|
-
},
|
|
24
|
-
"keywords": [
|
|
25
|
-
"vue",
|
|
26
|
-
"composables",
|
|
27
|
-
"core",
|
|
28
|
-
"npm"
|
|
29
|
-
],
|
|
30
|
-
"author": "Arturo Rafael Serrano Girón",
|
|
31
|
-
"license": "MIT",
|
|
32
|
-
"peerDependencies": {
|
|
33
|
-
"@tanstack/vue-query": ">=5.0.0",
|
|
34
|
-
"@vueuse/core": ">=12.8.2",
|
|
35
|
-
"axios": ">=1.6.0",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"vue
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"@
|
|
44
|
-
"@rollup/plugin-
|
|
45
|
-
"@rollup/plugin-
|
|
46
|
-
"@rollup/plugin-
|
|
47
|
-
"@
|
|
48
|
-
"@types/
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"eslint": "^
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"typescript": "^
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"@
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@arex95/vue-core",
|
|
3
|
+
"version": "1.1.13",
|
|
4
|
+
"description": "Opinionated Vue Core",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"exports": {
|
|
8
|
+
"import": "./dist/index.mjs"
|
|
9
|
+
},
|
|
10
|
+
"types": "dist/index.d.ts",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "rollup -c",
|
|
17
|
+
"changelog": "conventional-changelog -p angular -o CHANGELOG.md -r 0",
|
|
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"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/Arex95/npm-arex-core.git"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"vue",
|
|
26
|
+
"composables",
|
|
27
|
+
"core",
|
|
28
|
+
"npm"
|
|
29
|
+
],
|
|
30
|
+
"author": "Arturo Rafael Serrano Girón",
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@tanstack/vue-query": ">=5.0.0",
|
|
34
|
+
"@vueuse/core": ">=12.8.2",
|
|
35
|
+
"axios": ">=1.6.0",
|
|
36
|
+
"jwt-decode": "^4.0.0",
|
|
37
|
+
"uuid": ">=11.1.0",
|
|
38
|
+
"vue": ">=3.0.0",
|
|
39
|
+
"vue-router": ">=4.5.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@eslint/js": "^9.23.0",
|
|
43
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
44
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
45
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
46
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
47
|
+
"@types/crypto-js": "^4.2.2",
|
|
48
|
+
"@types/node": "^22.13.10",
|
|
49
|
+
"conventional-changelog-cli": "^5.0.0",
|
|
50
|
+
"eslint": "^9.23.0",
|
|
51
|
+
"eslint-plugin-vue": "^10.0.0",
|
|
52
|
+
"globals": "^16.0.0",
|
|
53
|
+
"rollup": "^4.35.0",
|
|
54
|
+
"ts-node": "^10.9.2",
|
|
55
|
+
"tslib": "^2.8.1",
|
|
56
|
+
"typescript": "^5.8.2",
|
|
57
|
+
"typescript-eslint": "^8.28.0"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@tanstack/vue-query": ">=5.0.0",
|
|
61
|
+
"@vueuse/core": ">=12.8.2",
|
|
62
|
+
"axios": ">=1.6.0",
|
|
63
|
+
"jwt-decode": "^4.0.0",
|
|
64
|
+
"uuid": ">=11.1.0",
|
|
65
|
+
"vue": ">=3.0.0",
|
|
66
|
+
"vue-router": ">=4.5.0"
|
|
67
|
+
}
|
|
68
|
+
}
|