@regle/nuxt 0.1.8
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 +28 -0
- package/dist/module.cjs +5 -0
- package/dist/module.d.mts +7 -0
- package/dist/module.d.ts +7 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +41 -0
- package/dist/types.d.mts +1 -0
- package/dist/types.d.ts +1 -0
- package/package.json +70 -0
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/victorgarciaesgi/regle/master/.github/images/regle-github-banner.png" alt="regle cover">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# Regle
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Regle \ʁɛɡl\ (French word for 'rule' ) is a Typescript-first model-based validation library for Vue 3.
|
|
9
|
+
It's heavily inspired by Vuelidate.
|
|
10
|
+
|
|
11
|
+
> ⚠️ Project is still in development, do not use it in production
|
|
12
|
+
> API or function names can still change
|
|
13
|
+
|
|
14
|
+
# 📚 Documentation
|
|
15
|
+
|
|
16
|
+
[](https://regle.vercel.app/)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## Quick Setup
|
|
20
|
+
|
|
21
|
+
Install the module to your Nuxt application with one command:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx nuxi module add regle
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
package/dist/module.cjs
ADDED
package/dist/module.d.ts
ADDED
package/dist/module.json
ADDED
package/dist/module.mjs
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineNuxtModule, createResolver, addImportsSources } from '@nuxt/kit';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
// -- Unbuild CommonJS Shims --
|
|
6
|
+
import __cjs_url__ from 'url';
|
|
7
|
+
import __cjs_path__ from 'path';
|
|
8
|
+
import __cjs_mod__ from 'module';
|
|
9
|
+
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = __cjs_path__.dirname(__filename);
|
|
11
|
+
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
12
|
+
const module = defineNuxtModule({
|
|
13
|
+
meta: {
|
|
14
|
+
name: "regle",
|
|
15
|
+
configKey: "regle"
|
|
16
|
+
},
|
|
17
|
+
defaults: {},
|
|
18
|
+
async setup(_options, _nuxt) {
|
|
19
|
+
createResolver(import.meta.url);
|
|
20
|
+
addImportsSources({
|
|
21
|
+
from: "@regle/core",
|
|
22
|
+
imports: ["useRegle", "createRule", "defineRegleConfig"]
|
|
23
|
+
});
|
|
24
|
+
addImportsSources({
|
|
25
|
+
from: "@regle/rules",
|
|
26
|
+
imports: ["ruleHelpers", "withAsync", "withMessage", "withParams"]
|
|
27
|
+
});
|
|
28
|
+
try {
|
|
29
|
+
const regleZod = require("@regle/zod");
|
|
30
|
+
if (regleZod) {
|
|
31
|
+
addImportsSources({
|
|
32
|
+
from: "@regle/zod",
|
|
33
|
+
imports: ["useZodRegle"]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
} catch (e) {
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export { module as default };
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type ModuleOptions, default } from './module.js'
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type ModuleOptions, default } from './module'
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@regle/nuxt",
|
|
3
|
+
"version": "0.1.8",
|
|
4
|
+
"description": "Regle nuxt module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/types.d.ts",
|
|
10
|
+
"import": "./dist/module.mjs",
|
|
11
|
+
"require": "./dist/module.cjs"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"main": "./dist/module.cjs",
|
|
15
|
+
"types": "./dist/types.d.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"prepack": "nuxt-module-build build",
|
|
21
|
+
"dev": "nuxi dev playground",
|
|
22
|
+
"dev:build": "nuxi build playground",
|
|
23
|
+
"typecheck": "nuxi typecheck",
|
|
24
|
+
"build": "nuxt-module-build build",
|
|
25
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
26
|
+
"release": "pnpm publish --report-summary",
|
|
27
|
+
"lint": "eslint .",
|
|
28
|
+
"test": "echo 'no test'",
|
|
29
|
+
"test:watch": "vitest watch",
|
|
30
|
+
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@nuxt/kit": "^3.14.1592",
|
|
34
|
+
"@regle/core": "workspace:*",
|
|
35
|
+
"@regle/rules": "workspace:*"
|
|
36
|
+
},
|
|
37
|
+
"optionalDependencies": {
|
|
38
|
+
"@regle/zod": "workspace:*"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"eslint": "9.14.0",
|
|
42
|
+
"eslint-config-prettier": "9.1.0",
|
|
43
|
+
"eslint-plugin-vue": "9.30.0",
|
|
44
|
+
"prettier": "3.3.3",
|
|
45
|
+
"tsup": "8.3.5",
|
|
46
|
+
"type-fest": "4.26.1",
|
|
47
|
+
"typescript": "5.6.3",
|
|
48
|
+
"vitest": "2.1.4",
|
|
49
|
+
"vue-tsc": "2.1.10",
|
|
50
|
+
"@regle/zod": "workspace:*",
|
|
51
|
+
"@nuxt/devtools": "^1.6.0",
|
|
52
|
+
"@nuxt/eslint-config": "^0.7.1",
|
|
53
|
+
"@nuxt/module-builder": "^0.8.4",
|
|
54
|
+
"@nuxt/schema": "^3.14.1592",
|
|
55
|
+
"@nuxt/test-utils": "^3.14.4",
|
|
56
|
+
"@types/node": "latest",
|
|
57
|
+
"changelogen": "^0.5.7",
|
|
58
|
+
"nuxt": "^3.14.1592",
|
|
59
|
+
"c12": "2.0.1"
|
|
60
|
+
},
|
|
61
|
+
"author": {
|
|
62
|
+
"name": "Victor Garcia",
|
|
63
|
+
"url": "https://github.com/victorgarciaesgi"
|
|
64
|
+
},
|
|
65
|
+
"homepage": "https://regle.vercel.app/",
|
|
66
|
+
"repository": {
|
|
67
|
+
"type": "git",
|
|
68
|
+
"url": "git+https://github.com/victorgarciaesgi/regle.git"
|
|
69
|
+
}
|
|
70
|
+
}
|