@holo-js/adapter-nuxt 0.3.17 → 0.3.19

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@holo-js/adapter-nuxt",
3
3
  "configKey": "@holo-js/adapter-nuxt",
4
- "version": "0.3.17",
4
+ "version": "0.3.19",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -6,10 +6,10 @@ import { createNuxtAuthorizationError } from "../authorization-error.js";
6
6
  import { initializeHoloAdapterProject } from "@holo-js/core";
7
7
  import { useRuntimeConfig } from "nitropack/runtime/config";
8
8
  import { defineNitroPlugin } from "nitropack/runtime/plugin";
9
- export default defineNitroPlugin(async (nitroApp) => {
9
+ export default defineNitroPlugin((nitroApp) => {
10
10
  const config = useRuntimeConfig();
11
11
  configureHoloRuntimeConfig(config);
12
- const project = await initializeHoloAdapterProject(config.holo.projectRoot?.trim() || process.cwd(), {
12
+ const project = initializeHoloAdapterProject(config.holo.projectRoot?.trim() || process.cwd(), {
13
13
  envName: config.holo.appEnv,
14
14
  preferCache: process.env.NODE_ENV === "production",
15
15
  processEnv: process.env,
@@ -18,12 +18,14 @@ export default defineNitroPlugin(async (nitroApp) => {
18
18
  createError: createNuxtAuthorizationError
19
19
  }
20
20
  });
21
- const driver = project.runtime.manager.connection().getDriver();
22
- console.log(`\u2705 Holo DB connected (${driver})`);
21
+ nitroApp.hooks.hook("request", async () => {
22
+ await project;
23
+ });
23
24
  nitroApp.hooks.hook("close", async () => {
24
25
  try {
25
- await project.runtime.shutdown();
26
+ await (await project).runtime.shutdown();
26
27
  } catch {
28
+ return;
27
29
  }
28
30
  });
29
31
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holo-js/adapter-nuxt",
3
- "version": "0.3.17",
3
+ "version": "0.3.19",
4
4
  "description": "Holo-JS Framework - Nuxt adapter",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -38,21 +38,21 @@
38
38
  "test": "vitest --run"
39
39
  },
40
40
  "dependencies": {
41
- "@holo-js/adapter-shared": "^0.3.17",
41
+ "@holo-js/adapter-shared": "^0.3.19",
42
42
  "@nuxt/kit": "^4.4.4",
43
- "@holo-js/config": "^0.3.17",
44
- "@holo-js/core": "^0.3.17",
45
- "@holo-js/db": "^0.3.17",
46
- "@holo-js/validation": "^0.3.17",
43
+ "@holo-js/config": "^0.3.19",
44
+ "@holo-js/core": "^0.3.19",
45
+ "@holo-js/db": "^0.3.19",
46
+ "@holo-js/validation": "^0.3.19",
47
47
  "h3": "^1.15.11",
48
48
  "nitropack": "^2.13.4"
49
49
  },
50
50
  "peerDependencies": {
51
- "@holo-js/broadcast": "^0.3.17",
52
- "@holo-js/forms": "^0.3.17",
53
- "@holo-js/realtime": "^0.3.17",
54
- "@holo-js/storage": "^0.3.17",
55
- "@holo-js/storage-s3": "^0.3.17"
51
+ "@holo-js/broadcast": "^0.3.19",
52
+ "@holo-js/forms": "^0.3.19",
53
+ "@holo-js/realtime": "^0.3.19",
54
+ "@holo-js/storage": "^0.3.19",
55
+ "@holo-js/storage-s3": "^0.3.19"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "@holo-js/broadcast": {
@@ -72,9 +72,9 @@
72
72
  }
73
73
  },
74
74
  "devDependencies": {
75
- "@holo-js/broadcast": "^0.3.17",
76
- "@holo-js/realtime": "^0.3.17",
77
- "@holo-js/storage-s3": "^0.3.17",
75
+ "@holo-js/broadcast": "^0.3.19",
76
+ "@holo-js/realtime": "^0.3.19",
77
+ "@holo-js/storage-s3": "^0.3.19",
78
78
  "@nuxt/module-builder": "^1.0.2",
79
79
  "@types/node": "^22.10.2",
80
80
  "nuxt": "^4.4.4",