@holo-js/adapter-nuxt 0.3.12 → 0.3.14
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.d.mts
CHANGED
|
@@ -107,6 +107,7 @@ interface NuxtOptionsWithNitro {
|
|
|
107
107
|
_holoStorageRuntimeRegistered?: boolean;
|
|
108
108
|
_holoBroadcastAuthRouteRegistered?: boolean;
|
|
109
109
|
_holoRealtimeRouteRegistered?: boolean;
|
|
110
|
+
_holoClientTransformsRegistered?: boolean;
|
|
110
111
|
_holoCoreRuntimeRegistered?: boolean;
|
|
111
112
|
_holoTypesRegistered?: boolean;
|
|
112
113
|
}
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createRealtimeClientDefinitionTransform as createRealtimeClientDefinitionTransform$1, createRealtimeClientDefinitionModule as createRealtimeClientDefinitionModule$1, compileBrowserValidation } from '@holo-js/adapter-shared/build';
|
|
1
2
|
import { lstatSync, readFileSync } from 'node:fs';
|
|
2
3
|
import { readdir, readFile, mkdir, writeFile, access } from 'node:fs/promises';
|
|
3
4
|
import { createRequire } from 'node:module';
|
|
@@ -5,7 +6,6 @@ import { resolve, extname, relative, basename, dirname, isAbsolute } from 'node:
|
|
|
5
6
|
import { defineNuxtModule, createResolver, addServerPlugin, addServerImportsDir, addServerHandler, addPlugin } from '@nuxt/kit';
|
|
6
7
|
import { loadConfigDirectory } from '@holo-js/config';
|
|
7
8
|
import '@holo-js/db/config';
|
|
8
|
-
import { createRealtimeClientDefinitionTransform as createRealtimeClientDefinitionTransform$1, createRealtimeClientDefinitionModule as createRealtimeClientDefinitionModule$1 } from '@holo-js/adapter-shared';
|
|
9
9
|
|
|
10
10
|
function createRealtimeClientDefinitionModule(source) {
|
|
11
11
|
return createRealtimeClientDefinitionModule$1(source, "@holo-js/adapter-nuxt/realtime");
|
|
@@ -279,6 +279,10 @@ function createRealtimeDefinitionVitePlugin(rootDir) {
|
|
|
279
279
|
return createRealtimeClientDefinitionModule(readFileSync(sourcePath, "utf8"));
|
|
280
280
|
},
|
|
281
281
|
transform(code, id, options) {
|
|
282
|
+
if (!options?.ssr && !id.includes("node_modules") && /\.[cm]?[jt]sx?$/.test(id)) {
|
|
283
|
+
const compiled = compileBrowserValidation(code, id);
|
|
284
|
+
if (compiled) return { code: compiled, map: null };
|
|
285
|
+
}
|
|
282
286
|
if (options?.ssr || !isRealtimeDefinitionModule(rootDir, id)) {
|
|
283
287
|
return null;
|
|
284
288
|
}
|
|
@@ -507,7 +511,7 @@ const module$1 = defineNuxtModule({
|
|
|
507
511
|
});
|
|
508
512
|
opts._holoBroadcastAuthRouteRegistered = true;
|
|
509
513
|
}
|
|
510
|
-
if (
|
|
514
|
+
if (!opts._holoClientTransformsRegistered) {
|
|
511
515
|
const realtimeDefinitionPlugin = createRealtimeDefinitionVitePlugin(rootDir);
|
|
512
516
|
opts.vite = opts.vite || {};
|
|
513
517
|
addVitePlugin(opts.vite, realtimeDefinitionPlugin);
|
|
@@ -517,6 +521,9 @@ const module$1 = defineNuxtModule({
|
|
|
517
521
|
}
|
|
518
522
|
addVitePlugin(config, realtimeDefinitionPlugin);
|
|
519
523
|
});
|
|
524
|
+
opts._holoClientTransformsRegistered = true;
|
|
525
|
+
}
|
|
526
|
+
if (hasProjectPackage(rootDir, "@holo-js/realtime") && !opts._holoRealtimeRouteRegistered) {
|
|
520
527
|
addPlugin({
|
|
521
528
|
src: resolver.resolve("./runtime/plugins/realtime"),
|
|
522
529
|
mode: "all"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { onScopeDispose, reactive, shallowRef, watchEffect } from "vue";
|
|
2
2
|
import { useCookie } from "#app";
|
|
3
|
-
import { normalizeHoloHttpError } from "@holo-js/adapter-shared";
|
|
3
|
+
import { normalizeHoloHttpError } from "@holo-js/adapter-shared/client";
|
|
4
4
|
import { DEFAULT_VALIDATION_BAG, createErrorBag } from "@holo-js/validation";
|
|
5
5
|
import {
|
|
6
6
|
createFormClient
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { onScopeDispose, reactive } from "vue";
|
|
2
|
-
import { normalizeHoloHttpError } from "@holo-js/adapter-shared";
|
|
2
|
+
import { normalizeHoloHttpError } from "@holo-js/adapter-shared/client";
|
|
3
3
|
import {
|
|
4
4
|
configureRealtimeClientRuntime,
|
|
5
5
|
configureRealtimeClientTransport,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holo-js/adapter-nuxt",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
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.
|
|
41
|
+
"@holo-js/adapter-shared": "^0.3.14",
|
|
42
42
|
"@nuxt/kit": "^4.4.4",
|
|
43
|
-
"@holo-js/config": "^0.3.
|
|
44
|
-
"@holo-js/core": "^0.3.
|
|
45
|
-
"@holo-js/db": "^0.3.
|
|
46
|
-
"@holo-js/validation": "^0.3.
|
|
43
|
+
"@holo-js/config": "^0.3.14",
|
|
44
|
+
"@holo-js/core": "^0.3.14",
|
|
45
|
+
"@holo-js/db": "^0.3.14",
|
|
46
|
+
"@holo-js/validation": "^0.3.14",
|
|
47
47
|
"h3": "^1.15.11",
|
|
48
48
|
"nitropack": "^2.13.4"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@holo-js/broadcast": "^0.3.
|
|
52
|
-
"@holo-js/forms": "^0.3.
|
|
53
|
-
"@holo-js/realtime": "^0.3.
|
|
54
|
-
"@holo-js/storage": "^0.3.
|
|
55
|
-
"@holo-js/storage-s3": "^0.3.
|
|
51
|
+
"@holo-js/broadcast": "^0.3.14",
|
|
52
|
+
"@holo-js/forms": "^0.3.14",
|
|
53
|
+
"@holo-js/realtime": "^0.3.14",
|
|
54
|
+
"@holo-js/storage": "^0.3.14",
|
|
55
|
+
"@holo-js/storage-s3": "^0.3.14"
|
|
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.
|
|
76
|
-
"@holo-js/realtime": "^0.3.
|
|
77
|
-
"@holo-js/storage-s3": "^0.3.
|
|
75
|
+
"@holo-js/broadcast": "^0.3.14",
|
|
76
|
+
"@holo-js/realtime": "^0.3.14",
|
|
77
|
+
"@holo-js/storage-s3": "^0.3.14",
|
|
78
78
|
"@nuxt/module-builder": "^1.0.2",
|
|
79
79
|
"@types/node": "^22.10.2",
|
|
80
80
|
"nuxt": "^4.4.4",
|