@regle/nuxt 1.14.4 → 1.14.5
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 +1 -1
- package/dist/module.mjs +6 -4
- package/package.json +5 -5
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -16,19 +16,21 @@ const module = defineNuxtModule({
|
|
|
16
16
|
if (options.setupFile) {
|
|
17
17
|
try {
|
|
18
18
|
const setupFilePathOS = await resolvePath(options.setupFile);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const relativePath = resolve(setupFilePath);
|
|
19
|
+
if (setupFilePathOS) {
|
|
20
|
+
const relativePath = resolve(setupFilePathOS);
|
|
22
21
|
const setupFilePathWithoutExtension = path.join(
|
|
23
22
|
path.dirname(relativePath),
|
|
24
23
|
path.basename(relativePath, path.extname(relativePath))
|
|
25
24
|
);
|
|
25
|
+
const setupFilePathWithoutExtensionCleaned = path.posix.normalize(
|
|
26
|
+
setupFilePathWithoutExtension.replaceAll(/\\/gi, "/")
|
|
27
|
+
);
|
|
26
28
|
const template = addTemplate({
|
|
27
29
|
filename: "regle-exports.ts",
|
|
28
30
|
write: true,
|
|
29
31
|
getContents: () => `
|
|
30
32
|
import type { InferRegleRules, RegleCustomFieldStatus } from '@regle/core';
|
|
31
|
-
import ReglePlugin from "${
|
|
33
|
+
import ReglePlugin from "${setupFilePathWithoutExtensionCleaned}";
|
|
32
34
|
export const { inferRules, useRegle, useCollectScope, useScopedRegle } = ReglePlugin;
|
|
33
35
|
|
|
34
36
|
export type RegleFieldStatus<
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regle/nuxt",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.5",
|
|
4
4
|
"description": "Regle nuxt module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@nuxt/kit": "4.2.1",
|
|
24
24
|
"@nuxt/schema": "4.2.1",
|
|
25
|
-
"@regle/core": "1.14.
|
|
26
|
-
"@regle/rules": "1.14.
|
|
25
|
+
"@regle/core": "1.14.5",
|
|
26
|
+
"@regle/rules": "1.14.5"
|
|
27
27
|
},
|
|
28
28
|
"optionalDependencies": {
|
|
29
|
-
"@regle/schemas": "1.14.
|
|
29
|
+
"@regle/schemas": "1.14.5"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@nuxt/module-builder": "1.0.2",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"turbo:postinstall": "pnpm exec playwright install",
|
|
62
|
-
"dev": "
|
|
62
|
+
"dev": "nuxt-module-build build --stub",
|
|
63
63
|
"dev:playground": "nuxi dev playground",
|
|
64
64
|
"dev:build": "nuxi build playground",
|
|
65
65
|
"typecheck": "pnpm dev:prepare && vue-tsc --noEmit && nuxi typecheck test/fixtures",
|