@holo-js/adapter-nuxt 0.3.21 → 0.3.23

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.21",
4
+ "version": "0.3.23",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createRealtimeClientDefinitionTransform as createRealtimeClientDefinitionTransform$1, createRealtimeClientDefinitionModule as createRealtimeClientDefinitionModule$1, compileBrowserValidation } from '@holo-js/adapter-shared/build';
2
- import { lstatSync, readFileSync } from 'node:fs';
3
- import { readdir, readFile, mkdir, writeFile, access } from 'node:fs/promises';
2
+ import { existsSync, lstatSync, readFileSync } from 'node:fs';
3
+ import { writeFile, readdir, readFile, mkdir, access } from 'node:fs/promises';
4
4
  import { createRequire } from 'node:module';
5
5
  import { resolve, extname, relative, basename, dirname, isAbsolute } from 'node:path';
6
6
  import { defineNuxtModule, createResolver, addServerPlugin, addServerImportsDir, addServerHandler, addPlugin } from '@nuxt/kit';
@@ -481,7 +481,21 @@ const module$1 = defineNuxtModule({
481
481
  }
482
482
  applyStorageRuntimeConfig(opts.runtimeConfig, normalizedStorage);
483
483
  if (!opts._holoCoreRuntimeRegistered) {
484
- addServerPlugin(resolver.resolve("./runtime/plugins/init"));
484
+ if (existsSync(resolve(rootDir, ".holo-js/generated/definition-importer.ts"))) {
485
+ const initPluginPath = resolve(rootDir, ".holo-js/generated/nuxt-init.ts");
486
+ await writeFile(initPluginPath, [
487
+ `import init from ${JSON.stringify(resolver.resolve("./runtime/plugins/init"))}`,
488
+ "import { installProjectDefinitionImporter } from './definition-importer'",
489
+ "",
490
+ `installProjectDefinitionImporter(${JSON.stringify(rootDir)})`,
491
+ "",
492
+ "export default init",
493
+ ""
494
+ ].join("\n"), "utf8");
495
+ addServerPlugin(initPluginPath);
496
+ } else {
497
+ addServerPlugin(resolver.resolve("./runtime/plugins/init"));
498
+ }
485
499
  addServerPlugin(resolver.resolve("./runtime/plugins/forms"));
486
500
  addServerImportsDir(resolver.resolve("./runtime/server/auto-imports"));
487
501
  const serverModelImports = await createServerModelImports(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holo-js/adapter-nuxt",
3
- "version": "0.3.21",
3
+ "version": "0.3.23",
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.21",
41
+ "@holo-js/adapter-shared": "^0.3.23",
42
42
  "@nuxt/kit": "^4.4.4",
43
- "@holo-js/config": "^0.3.21",
44
- "@holo-js/core": "^0.3.21",
45
- "@holo-js/db": "^0.3.21",
46
- "@holo-js/validation": "^0.3.21",
43
+ "@holo-js/config": "^0.3.23",
44
+ "@holo-js/core": "^0.3.23",
45
+ "@holo-js/db": "^0.3.23",
46
+ "@holo-js/validation": "^0.3.23",
47
47
  "h3": "^1.15.11",
48
48
  "nitropack": "^2.13.4"
49
49
  },
50
50
  "peerDependencies": {
51
- "@holo-js/broadcast": "^0.3.21",
52
- "@holo-js/forms": "^0.3.21",
53
- "@holo-js/realtime": "^0.3.21",
54
- "@holo-js/storage": "^0.3.21",
55
- "@holo-js/storage-s3": "^0.3.21"
51
+ "@holo-js/broadcast": "^0.3.23",
52
+ "@holo-js/forms": "^0.3.23",
53
+ "@holo-js/realtime": "^0.3.23",
54
+ "@holo-js/storage": "^0.3.23",
55
+ "@holo-js/storage-s3": "^0.3.23"
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.21",
76
- "@holo-js/realtime": "^0.3.21",
77
- "@holo-js/storage-s3": "^0.3.21",
75
+ "@holo-js/broadcast": "^0.3.23",
76
+ "@holo-js/realtime": "^0.3.23",
77
+ "@holo-js/storage-s3": "^0.3.23",
78
78
  "@nuxt/module-builder": "^1.0.2",
79
79
  "@types/node": "^22.10.2",
80
80
  "nuxt": "^4.4.4",