@ciwergrp/nuxid 1.0.3-release → 1.0.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/README.md +2 -2
- package/bin/{kiban.mjs → nuxid.mjs} +3 -3
- package/console/request.mjs +12 -12
- package/dist/module.json +3 -3
- package/dist/module.mjs +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Nuxid – Nuxt Essentials
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Nuxid bundles a handful of productivity helpers for Nuxt projects: icon defaults, lodash auto-imports, Element Plus validation helpers, and a flexible form composable. Enable the pieces you need and keep the rest off.
|
|
4
4
|
|
|
5
5
|
## Quick start
|
|
6
6
|
|
|
@@ -9,11 +9,11 @@ const __dirname = path.dirname(__filename);
|
|
|
9
9
|
const args = process.argv.slice(2);
|
|
10
10
|
|
|
11
11
|
function printHelp() {
|
|
12
|
-
console.log('\
|
|
13
|
-
console.log('Usage: pnpm
|
|
12
|
+
console.log('\nnuxid - helper wrapper for console scripts\n');
|
|
13
|
+
console.log('Usage: pnpm nuxid <command> [options]\n');
|
|
14
14
|
console.log('Commands:');
|
|
15
15
|
console.log(' make:request <name> Interactive generator for request validation files');
|
|
16
|
-
console.log('\nUse `pnpm
|
|
16
|
+
console.log('\nUse `pnpm nuxid <command> --help` for more information.\n');
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
if (args.length === 0) {
|
package/console/request.mjs
CHANGED
|
@@ -59,8 +59,8 @@ function getTemplate(name, definitions) {
|
|
|
59
59
|
.map(([field, rules]) => ` ${field}: [${rules.map(r => `'${r}'`).join(', ')}],`)
|
|
60
60
|
.join('\n');
|
|
61
61
|
|
|
62
|
-
return `import type { ValidationRule, ValidationOptions } from '
|
|
63
|
-
import { createValidationRules } from '
|
|
62
|
+
return `import type { ValidationRule, ValidationOptions } from 'nuxid' // Adjust this import path if needed
|
|
63
|
+
import { createValidationRules } from 'nuxid' // Adjust this import path if needed
|
|
64
64
|
// import { useI18n } from 'vue-i18n' // Uncomment if you use i18n
|
|
65
65
|
|
|
66
66
|
/**
|
|
@@ -139,12 +139,12 @@ function displayHeader(title) {
|
|
|
139
139
|
|
|
140
140
|
function loadPrefixFromProjectConfig() {
|
|
141
141
|
const candidates = [
|
|
142
|
-
'
|
|
143
|
-
'
|
|
144
|
-
'
|
|
145
|
-
'
|
|
146
|
-
'
|
|
147
|
-
'
|
|
142
|
+
'nuxid.mjs',
|
|
143
|
+
'nuxid.cjs',
|
|
144
|
+
'nuxid.js',
|
|
145
|
+
'nuxid.ts',
|
|
146
|
+
'nuxid.json',
|
|
147
|
+
'nuxid.config.json',
|
|
148
148
|
'artisan.mjs',
|
|
149
149
|
'artisan.cjs',
|
|
150
150
|
'artisan.js',
|
|
@@ -165,8 +165,8 @@ function loadPrefixFromProjectConfig() {
|
|
|
165
165
|
const raw = fs.readFileSync(p, 'utf8');
|
|
166
166
|
const obj = JSON.parse(raw);
|
|
167
167
|
if (file === 'package.json') {
|
|
168
|
-
if (obj?.
|
|
169
|
-
return obj.
|
|
168
|
+
if (obj?.nuxid && typeof obj.nuxid.prefix === 'string') {
|
|
169
|
+
return obj.nuxid.prefix;
|
|
170
170
|
}
|
|
171
171
|
if (obj?.artisan && typeof obj.artisan.prefix === 'string') {
|
|
172
172
|
return obj.artisan.prefix;
|
|
@@ -217,12 +217,12 @@ function runLinter(filePath) {
|
|
|
217
217
|
async function run() {
|
|
218
218
|
const globalArgs = process.argv.slice(2);
|
|
219
219
|
if (globalArgs.includes('--help') || globalArgs.includes('-h')) {
|
|
220
|
-
console.log('\nUsage: pnpm
|
|
220
|
+
console.log('\nUsage: pnpm nuxid make:request [options]\n');
|
|
221
221
|
console.log('Options:');
|
|
222
222
|
console.log(' -p, --prefix <dir> Override the target prefix (default: project\'s config or \'app\')');
|
|
223
223
|
console.log(' -h, --help Show this help message\n');
|
|
224
224
|
console.log('Examples:');
|
|
225
|
-
console.log(' pnpm
|
|
225
|
+
console.log(' pnpm nuxid make:request login --prefix=src\n');
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
228
228
|
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -144,7 +144,7 @@ function registerFormFeature(options, { from }) {
|
|
|
144
144
|
}
|
|
145
145
|
addImports({ name: "default", as: "useForm", from });
|
|
146
146
|
addImports({ name: "UseForm", as: "UseForm", from, type: true });
|
|
147
|
-
addImports({ name: "
|
|
147
|
+
addImports({ name: "NuxidFormOptions", as: "NuxidFormOptions", from, type: true });
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
const elementPlusDefaults = {
|
|
@@ -375,8 +375,8 @@ function registerPiniaFeature(options, nuxt, { runtimeDir, payload, plugin, comp
|
|
|
375
375
|
|
|
376
376
|
const module$1 = defineNuxtModule({
|
|
377
377
|
meta: {
|
|
378
|
-
name: "nuxid",
|
|
379
|
-
configKey: "
|
|
378
|
+
name: "@ciwergrp/nuxid",
|
|
379
|
+
configKey: "nuxid"
|
|
380
380
|
},
|
|
381
381
|
moduleDependencies() {
|
|
382
382
|
const dependencies = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ciwergrp/nuxid",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "All-in-one essential modules for Nuxt",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"bin": {
|
|
35
|
-
"
|
|
35
|
+
"nuxid": "./bin/nuxid.mjs"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"dist",
|