@sfxcode/nuxt-mongocamp-server 1.4.2 → 1.4.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 CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  Install node:
10
10
 
11
- **Latest node LTS version required (20)**
11
+ **Latest node LTS version required (24)**
12
12
  Use node manager like **nvm** to install.
13
13
 
14
14
  Install pnpm:
@@ -22,12 +22,13 @@ pnpm install
22
22
 
23
23
  ### Environment
24
24
 
25
- Create .env file in playground with your MongoCamp Parameter
25
+ Create .env file in playground with your MongoCamp Parameter for client authentication and API access.
26
26
 
27
27
  ```
28
28
  MONGOCAMP_URL=
29
29
  MONGOCAMP_ADMIN_USER=
30
30
  MONGOCAMP_ADMIN_PASSWORD=
31
+ NITRO_MONGOCAMP_API_KEY=
31
32
  ```
32
33
 
33
34
  ### Run
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sfxcode/nuxt-mongocamp-server",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "configKey": "mongocamp",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.16.0"
package/dist/module.mjs CHANGED
@@ -632,7 +632,7 @@ function createConsola(options = {}) {
632
632
  const consola = createConsola();
633
633
 
634
634
  const name = "@sfxcode/nuxt-mongocamp-server";
635
- const version = "1.4.2";
635
+ const version = "1.4.4";
636
636
 
637
637
  const module$1 = defineNuxtModule({
638
638
  meta: {
@@ -33,7 +33,7 @@ export function useMongocampAuth() {
33
33
  const login2 = { userId: loginId, password: loginPassword };
34
34
  const result = await authApi.login({ login: login2 });
35
35
  updateUserState(result);
36
- if (refreshToken) {
36
+ if (refreshToken && import.meta.client) {
37
37
  updateTokenInterval = window.setInterval(updateToken, tokenRefreshIntervall);
38
38
  }
39
39
  return result.userProfile;
@@ -43,16 +43,18 @@ export function useMongocampAuth() {
43
43
  const profile = { user: "", isAdmin: false };
44
44
  state.value.profile = profile;
45
45
  user.value = profile;
46
- if (refreshToken) {
46
+ if (refreshToken && import.meta.client) {
47
47
  window.clearInterval(updateTokenInterval);
48
48
  }
49
49
  };
50
50
  const isLoggedIn = computed(() => {
51
51
  const result = state.value?.token?.length > 0;
52
- if (result && refreshToken && !updateTokenInterval) {
53
- updateTokenInterval = window.setInterval(updateToken, tokenRefreshIntervall);
54
- } else if (!result && updateTokenInterval) {
55
- window.clearInterval(updateTokenInterval);
52
+ if (import.meta.client) {
53
+ if (result && refreshToken && !updateTokenInterval) {
54
+ updateTokenInterval = window.setInterval(updateToken, tokenRefreshIntervall);
55
+ } else if (!result && updateTokenInterval) {
56
+ window.clearInterval(updateTokenInterval);
57
+ }
56
58
  }
57
59
  return result;
58
60
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sfxcode/nuxt-mongocamp-server",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -39,22 +39,22 @@
39
39
  "api-codegen": "openapi-generator-cli generate -i ./openapi/docs.yaml -g typescript-fetch -o src/runtime/api --additional-properties=typescriptThreePlus=true,supportsES6=true"
40
40
  },
41
41
  "dependencies": {
42
- "@nuxt/kit": "^4.4.2",
43
- "@vueuse/nuxt": "^14.2.1"
42
+ "@nuxt/kit": "^4.4.8",
43
+ "@vueuse/nuxt": "^14.3.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@nuxt/devtools": "4.0.0-alpha.4",
47
- "@nuxt/eslint-config": "^1.15.2",
46
+ "@nuxt/devtools": "4.0.0-alpha.7",
47
+ "@nuxt/eslint-config": "^1.16.0",
48
48
  "@nuxt/module-builder": "^1.0.2",
49
- "@nuxt/schema": "^4.4.2",
50
- "@nuxt/test-utils": "^4.0.2",
51
- "@openapitools/openapi-generator-cli": "^2.31.1",
52
- "@types/node": "^25.6.0",
53
- "@unocss/nuxt": "66.6.8",
49
+ "@nuxt/schema": "^4.4.8",
50
+ "@nuxt/test-utils": "^4.0.3",
51
+ "@openapitools/openapi-generator-cli": "^2.39.0",
52
+ "@types/node": "^26.0.0",
53
+ "@unocss/nuxt": "66.7.2",
54
54
  "changelogen": "^0.6.2",
55
- "eslint": "^10.2.1",
56
- "nuxt": "^4.4.2",
57
- "vitest": "^4.1.4"
55
+ "eslint": "^10.5.0",
56
+ "nuxt": "^4.4.8",
57
+ "vitest": "^4.1.9"
58
58
  },
59
59
  "packageManager": "pnpm@10.30.0+sha512.2b5753de015d480eeb88f5b5b61e0051f05b4301808a82ec8b840c9d2adf7748eb352c83f5c1593ca703ff1017295bc3fdd3119abb9686efc96b9fcb18200937"
60
60
  }