@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.
Files changed (2) hide show
  1. package/dist/index.mjs +5 -5
  2. 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$1;
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$1 = new AxiosService(baseURL);
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$1) {
2610
+ if (!axiosInstance) {
2611
2611
  throw new Error('Axios instance not configured. Call configureAxios first.');
2612
2612
  }
2613
- return axiosInstance$1.getAxiosInstance();
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.12",
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
- "uuid": ">=11.1.0",
37
- "vue": ">=3.0.0",
38
- "vue-router": ">=4.5.0",
39
- "crypto-js": "^4.2.0",
40
- "jwt-decode": "^4.0.0"
41
- },
42
- "devDependencies": {
43
- "@eslint/js": "^9.23.0",
44
- "@rollup/plugin-commonjs": "^28.0.3",
45
- "@rollup/plugin-json": "^6.1.0",
46
- "@rollup/plugin-node-resolve": "^16.0.0",
47
- "@rollup/plugin-typescript": "^12.1.2",
48
- "@types/crypto-js": "^4.2.2",
49
- "@types/node": "^22.13.10",
50
- "conventional-changelog-cli": "^5.0.0",
51
- "eslint": "^9.23.0",
52
- "eslint-plugin-vue": "^10.0.0",
53
- "globals": "^16.0.0",
54
- "rollup": "^4.35.0",
55
- "ts-node": "^10.9.2",
56
- "tslib": "^2.8.1",
57
- "typescript": "^5.8.2",
58
- "typescript-eslint": "^8.28.0"
59
- },
60
- "dependencies": {
61
- "@tanstack/vue-query": ">=5.0.0",
62
- "@vueuse/core": ">=12.8.2",
63
- "axios": ">=1.6.0",
64
- "crypto-js": "^4.2.0",
65
- "jwt-decode": "^4.0.0",
66
- "uuid": ">=11.1.0",
67
- "vue": ">=3.0.0",
68
- "vue-router": ">=4.5.0"
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
+ }