@arex95/vue-core 1.1.37 → 1.1.38

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.d.ts CHANGED
@@ -12,7 +12,7 @@ export declare const ArexVueCore: {
12
12
  * @param app The Vue application instance.
13
13
  * @param options The configuration options provided by the user.
14
14
  */
15
- install: (app: App, options: ArexVueCoreOptions) => void;
15
+ install: (app: App, options: ArexVueCoreOptions) => Promise<void>;
16
16
  };
17
17
  export * from "./rest";
18
18
  export * from "./composables";
package/dist/index.mjs CHANGED
@@ -3498,26 +3498,37 @@ const ArexVueCore = {
3498
3498
  * @param app The Vue application instance.
3499
3499
  * @param options The configuration options provided by the user.
3500
3500
  */
3501
- install: (app, options) => {
3501
+ install: async (app, options) => {
3502
3502
  if (!options) {
3503
3503
  console.warn("ArexVueCore: No configuration options were provided. The library may not function correctly.");
3504
3504
  return;
3505
3505
  }
3506
- configAppKey({
3507
- appKey: options.appKey
3508
- });
3509
- configTokenKeys({
3510
- accessTokenKey: options.tokenKeys.accessToken,
3511
- refreshTokenKey: options.tokenKeys.refreshToken
3512
- });
3513
- configAxios({
3514
- baseURL: options.apiUrl,
3515
- });
3516
- configEndpoints({
3517
- loginEndpoint: options.endpoints.login,
3518
- refreshEndpoint: options.endpoints.refresh,
3519
- logoutEndpoint: options.endpoints.logout,
3520
- });
3506
+ try {
3507
+ console.log("Starting configuration process...");
3508
+ await configAppKey({
3509
+ appKey: options.appKey
3510
+ });
3511
+ console.log("[1/4]-configAppKey executed successfully.");
3512
+ await configTokenKeys({
3513
+ accessTokenKey: options.tokenKeys.accessToken,
3514
+ refreshTokenKey: options.tokenKeys.refreshToken
3515
+ });
3516
+ console.log("[2/4]-configTokenKeys executed successfully.");
3517
+ await configEndpoints({
3518
+ loginEndpoint: options.endpoints.login,
3519
+ refreshEndpoint: options.endpoints.refresh,
3520
+ logoutEndpoint: options.endpoints.logout,
3521
+ });
3522
+ console.log("[3/4]-configEndpoints executed successfully.");
3523
+ await configAxios({
3524
+ baseURL: options.apiUrl,
3525
+ });
3526
+ console.log("[4/4]-configAxios executed successfully.");
3527
+ console.log("All configurations completed in the correct order.");
3528
+ }
3529
+ catch (error) {
3530
+ console.error("Configuration failed:", error);
3531
+ }
3521
3532
  },
3522
3533
  };
3523
3534
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arex95/vue-core",
3
- "version": "1.1.37",
3
+ "version": "1.1.38",
4
4
  "description": "Opinionated Vue Core",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",