Fixed #6708 - Forms: Could not resolve "valibot"
parent
97b50aea57
commit
cb7e707f03
|
@ -43,7 +43,6 @@ const ALIAS_ENTRIES = [
|
||||||
return targetFile ? path.join(folderPath, targetFile) : null;
|
return targetFile ? path.join(folderPath, targetFile) : null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ find: '@primevue/forms/resolvers', replacement: path.resolve(__dirname, './src/resolvers/index.js') },
|
|
||||||
{ find: '@primevue/forms/useform', replacement: path.resolve(__dirname, './src/useform/index.js') }
|
{ find: '@primevue/forms/useform', replacement: path.resolve(__dirname, './src/useform/index.js') }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -211,7 +210,20 @@ function addStyle() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function addResolvers() {
|
function addResolvers() {
|
||||||
ENTRY.format.es({ input: process.env.INPUT_DIR + 'resolvers/index.js', output: process.env.OUTPUT_DIR + 'resolvers/index' });
|
fs.readdirSync(path.resolve(__dirname, process.env.INPUT_DIR + 'resolvers'), { withFileTypes: true })
|
||||||
|
.filter((dir) => dir.isDirectory())
|
||||||
|
.forEach(({ name: folderName }) => {
|
||||||
|
fs.readdirSync(path.resolve(__dirname, process.env.INPUT_DIR + 'resolvers/' + folderName)).forEach((file) => {
|
||||||
|
let name = file.split(/(.vue)$|(.js)$/)[0].toLowerCase();
|
||||||
|
|
||||||
|
if (name === 'index') {
|
||||||
|
const input = process.env.INPUT_DIR + 'resolvers/' + folderName + '/' + file;
|
||||||
|
const output = process.env.OUTPUT_DIR + 'resolvers/' + folderName + '/index';
|
||||||
|
|
||||||
|
ENTRY.format.es({ input, output });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function addUseForm() {
|
function addUseForm() {
|
||||||
|
|
|
@ -5,7 +5,11 @@ import { clearPackageJson, copyDependencies, renameDTSFile, resolvePath } from '
|
||||||
const { __dirname, __workspace, INPUT_DIR, OUTPUT_DIR } = resolvePath(import.meta.url);
|
const { __dirname, __workspace, INPUT_DIR, OUTPUT_DIR } = resolvePath(import.meta.url);
|
||||||
|
|
||||||
copyDependencies(INPUT_DIR, OUTPUT_DIR, '/style');
|
copyDependencies(INPUT_DIR, OUTPUT_DIR, '/style');
|
||||||
renameDTSFile(OUTPUT_DIR, 'index');
|
renameDTSFile(OUTPUT_DIR, 'index', (name) => {
|
||||||
|
return name !== 'types.d.ts';
|
||||||
|
});
|
||||||
|
|
||||||
|
fs.copySync(path.resolve(__dirname, '../src/types.d.ts'), `${OUTPUT_DIR}/types.d.ts`);
|
||||||
|
|
||||||
fs.copySync(path.resolve(__dirname, '../package.json'), `${OUTPUT_DIR}/package.json`);
|
fs.copySync(path.resolve(__dirname, '../package.json'), `${OUTPUT_DIR}/package.json`);
|
||||||
fs.copySync(path.resolve(__dirname, '../README.md'), `${OUTPUT_DIR}/README.md`);
|
fs.copySync(path.resolve(__dirname, '../README.md'), `${OUTPUT_DIR}/README.md`);
|
||||||
|
|
|
@ -10,16 +10,7 @@
|
||||||
import type { DefineComponent, DesignToken, EmitFn, PassThrough } from '@primevue/core';
|
import type { DefineComponent, DesignToken, EmitFn, PassThrough } from '@primevue/core';
|
||||||
import type { ComponentHooks } from '@primevue/core/basecomponent';
|
import type { ComponentHooks } from '@primevue/core/basecomponent';
|
||||||
import { VNode } from 'vue';
|
import { VNode } from 'vue';
|
||||||
|
import type { PassThroughOptions } from '../types';
|
||||||
/**
|
|
||||||
* From primevue/passthrough/index.d.ts
|
|
||||||
*/
|
|
||||||
export declare type PassThroughMergePropsType = ((...args: any) => object | undefined) | boolean | undefined;
|
|
||||||
|
|
||||||
export interface PassThroughOptions {
|
|
||||||
mergeSections?: boolean | undefined;
|
|
||||||
mergeProps?: PassThroughMergePropsType;
|
|
||||||
}
|
|
||||||
|
|
||||||
export declare type FormPassThroughOptionType = FormPassThroughAttributes | ((options: FormPassThroughMethodOptions) => FormPassThroughAttributes | string) | string | null | undefined;
|
export declare type FormPassThroughOptionType = FormPassThroughAttributes | ((options: FormPassThroughMethodOptions) => FormPassThroughAttributes | string) | string | null | undefined;
|
||||||
|
|
||||||
|
|
|
@ -9,16 +9,7 @@
|
||||||
import type { DefineComponent, DesignToken, EmitFn, PassThrough } from '@primevue/core';
|
import type { DefineComponent, DesignToken, EmitFn, PassThrough } from '@primevue/core';
|
||||||
import type { ComponentHooks } from '@primevue/core/basecomponent';
|
import type { ComponentHooks } from '@primevue/core/basecomponent';
|
||||||
import { Component, VNode } from 'vue';
|
import { Component, VNode } from 'vue';
|
||||||
|
import type { PassThroughOptions } from '../types';
|
||||||
/**
|
|
||||||
* From primevue/passthrough/index.d.ts
|
|
||||||
*/
|
|
||||||
export declare type PassThroughMergePropsType = ((...args: any) => object | undefined) | boolean | undefined;
|
|
||||||
|
|
||||||
export interface PassThroughOptions {
|
|
||||||
mergeSections?: boolean | undefined;
|
|
||||||
mergeProps?: PassThroughMergePropsType;
|
|
||||||
}
|
|
||||||
|
|
||||||
export declare type FormFieldPassThroughOptionType = FormFieldPassThroughAttributes | ((options: FormFieldPassThroughMethodOptions) => FormFieldPassThroughAttributes | string) | string | null | undefined;
|
export declare type FormFieldPassThroughOptionType = FormFieldPassThroughAttributes | ((options: FormFieldPassThroughMethodOptions) => FormFieldPassThroughAttributes | string) | string | null | undefined;
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
export * from '@primeuix/forms/resolvers';
|
|
|
@ -1 +0,0 @@
|
||||||
export * from '@primeuix/forms/resolvers';
|
|
|
@ -0,0 +1 @@
|
||||||
|
export * from '@primeuix/forms/resolvers/joi';
|
|
@ -0,0 +1 @@
|
||||||
|
export * from '@primeuix/forms/resolvers/joi';
|
|
@ -0,0 +1 @@
|
||||||
|
export * from '@primeuix/forms/resolvers/superstruct';
|
|
@ -0,0 +1 @@
|
||||||
|
export * from '@primeuix/forms/resolvers/superstruct';
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"main": "./index.js",
|
||||||
|
"module": "./index.js",
|
||||||
|
"types": "./index.d.ts"
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
export * from '@primeuix/forms/resolvers/valibot';
|
|
@ -0,0 +1 @@
|
||||||
|
export * from '@primeuix/forms/resolvers/valibot';
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"main": "./index.js",
|
||||||
|
"module": "./index.js",
|
||||||
|
"types": "./index.d.ts"
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
export * from '@primeuix/forms/resolvers/yup';
|
|
@ -0,0 +1 @@
|
||||||
|
export * from '@primeuix/forms/resolvers/yup';
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"main": "./index.js",
|
||||||
|
"module": "./index.js",
|
||||||
|
"types": "./index.d.ts"
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
export * from '@primeuix/forms/resolvers/zod';
|
|
@ -0,0 +1 @@
|
||||||
|
export * from '@primeuix/forms/resolvers/zod';
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"main": "./index.js",
|
||||||
|
"module": "./index.js",
|
||||||
|
"types": "./index.d.ts"
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
/**
|
||||||
|
* From primevue/passthrough/index.d.ts
|
||||||
|
*/
|
||||||
|
export declare type PassThroughMergePropsType = ((...args: any) => object | undefined) | boolean | undefined;
|
||||||
|
|
||||||
|
export interface PassThroughOptions {
|
||||||
|
mergeSections?: boolean | undefined;
|
||||||
|
mergeProps?: PassThroughMergePropsType;
|
||||||
|
}
|
Loading…
Reference in New Issue